mirror of
https://github.com/myvesta/vesta
synced 2025-07-10 23:33:13 -07:00
Delete button removed from "new" forms. Closes #26
This commit is contained in:
parent
1ee46998fb
commit
2a6e6ab688
2 changed files with 79 additions and 57 deletions
|
@ -29,9 +29,11 @@ App.HTML.Build.dns_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New dns domain');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit dns domain');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
tpl.set(':id', id || '');
|
||||
tpl.set(':DNS_DOMAIN', options.DNS_DOMAIN || '');
|
||||
|
@ -55,9 +57,11 @@ App.HTML.Build.ip_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New ip address');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit ip address');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
tpl.set(':id', id || '');
|
||||
tpl.set(':IP_ADDRESS', options.IP_ADDRESS || '');
|
||||
|
@ -84,9 +88,11 @@ App.HTML.Build.user_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New user');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit user');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
options = !App.Helpers.isEmpty(options) ? options : App.Empty.USER;
|
||||
if (in_edit == true) {
|
||||
|
@ -135,9 +141,11 @@ App.HTML.Build.web_domain_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New WEB domain');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit WEB domain');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
options = !App.Helpers.isEmpty(options) ? options : App.Empty.WEB_DOMAIN;
|
||||
if (in_edit == true) {
|
||||
|
@ -180,9 +188,11 @@ App.HTML.Build.db_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New database');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit database "' + options.DB + '"');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
options = !App.Helpers.isEmpty(options) ? options : App.Empty.DB;
|
||||
if (in_edit == true) {
|
||||
|
@ -206,9 +216,11 @@ App.HTML.Build.cron_form = function (options, id) {
|
|||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New cron job');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
tpl.set(':DELETE_ACTION', '');
|
||||
} else {
|
||||
tpl.set(':title', 'Edit cron job');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
options = !App.Helpers.isEmpty(options) ? options : {
|
||||
DAY: '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue