mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
[php][js][css] fixing all little issues and making forms work. Removed all unnecessary elements for Firsta Release
This commit is contained in:
parent
b7710ee5da
commit
230c93fbe1
13 changed files with 3466 additions and 3323 deletions
|
@ -366,14 +366,13 @@ App.Actions.save_form = function(evt) {
|
|||
if (!confirmed) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
var values = App.Helpers.getFormValues(elm);
|
||||
if(App.Validate.form(values, $('#'+elm_id))) {
|
||||
App.Model.add(values, source);
|
||||
var form_id = App.Constants[App.Env.world + '_FORM_ID'];
|
||||
$('#'+form_id).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var values = App.Helpers.getFormValues(elm);
|
||||
if(App.Validate.form(values, $('#'+elm_id))) {
|
||||
App.Model.add(values, source);
|
||||
var form_id = App.Constants[App.Env.world + '_FORM_ID'];
|
||||
$('#'+form_id).remove();
|
||||
}
|
||||
}
|
||||
else { // OLD ITEM, UPDATING IT
|
||||
|
|
|
@ -95,6 +95,7 @@ App.HTML.Build.user_form = function (options, id) {
|
|||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
}
|
||||
options = !App.Helpers.isEmpty(options) ? options : App.Empty.USER;
|
||||
|
||||
if (in_edit == true) {
|
||||
options.PASSWORD = App.Settings.PASSWORD_IMMUTE;
|
||||
var ns = [];
|
||||
|
@ -109,7 +110,7 @@ App.HTML.Build.user_form = function (options, id) {
|
|||
ns[ns.length++] = App.Templates.get('PLUS_ONE_NS', 'user').finalize();
|
||||
tpl.set(':NS', ns.done());
|
||||
} else {
|
||||
tpl.set(':NS', '');
|
||||
// tpl.set(':NS', '');
|
||||
}
|
||||
tpl = App.HTML.setTplKeys(tpl, options, true);
|
||||
tpl = App.HTML.Build.user_selects(tpl, options);
|
||||
|
@ -146,6 +147,15 @@ App.HTML.Build.web_domain_form = function (options, id) {
|
|||
tpl.set(':title', 'Edit WEB domain');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
tpl.set(':DELETE_ACTION', App.Templates.get('DELETE_ACTION', 'general').finalize());
|
||||
|
||||
if(options.SSL_CRT == '' || options.SSL_KEY == ''){
|
||||
options.SSL = '';
|
||||
options.SSL_HOME = '';
|
||||
options.SSL_CRT = '';
|
||||
options.SSL_KEY = '';
|
||||
options.SSL_CA = '';
|
||||
}
|
||||
|
||||
if (options.SSL == 'on') {
|
||||
tpl.set(':ssl_checked', 'checked="checked"');
|
||||
}
|
||||
|
@ -167,7 +177,7 @@ App.HTML.Build.web_domain_form = function (options, id) {
|
|||
tpl = App.HTML.setTplKeys(tpl, options, true);
|
||||
tpl = App.HTML.Build.web_domain_selects(tpl, options);
|
||||
tpl = App.HTML.toggle_suspended_form(tpl, options);
|
||||
if (options.CGI == 'yes') {
|
||||
if (options.CGI == 'yes' || !in_edit) {
|
||||
tpl.set(':CHECKED_CGI', 'checked="checked"');
|
||||
}
|
||||
if (options.ELOG == 'yes') {
|
||||
|
@ -384,8 +394,11 @@ App.HTML.Build.web_domain_entry = function (o, key) {
|
|||
'DISK_QUOTA_MEASURE': App.Helpers.getMbHumanMeasure(App.Env.initialParams.user_data.DISK_QUOTA),
|
||||
'BANDWIDTH_MEASURE': App.Helpers.getMbHumanMeasure(App.Env.initialParams.user_data.BANDWIDTH),
|
||||
'BANDWIDTH': App.Helpers.getMbHuman(App.Env.initialParams.user_data.BANDWIDTH),
|
||||
'DISK_QUOTA': App.Helpers.getMbHuman(App.Env.initialParams.user_data.DISK_QUOTA)
|
||||
'DISK_QUOTA': App.Helpers.getMbHuman(App.Env.initialParams.user_data.DISK_QUOTA),
|
||||
'SSL': (o.SSL_CRT == '' || o.SSL_KEY == '' || o.SSL != 'on') ? 'off' : 'on'
|
||||
};
|
||||
|
||||
|
||||
var o = $.extend(o, processed_data);
|
||||
o.U_DISK_PERCENTAGE_2 = o.U_DISK_PERCENTAGE;
|
||||
o.U_DISK_PERCENTAGE_3 = o.U_DISK_PERCENTAGE;
|
||||
|
@ -691,9 +704,11 @@ App.HTML.Build.dns_selects = function (tpl, options) {
|
|||
$.each(App.Env.initialParams.DNS.TPL, function (key) {
|
||||
obj[key] = key;
|
||||
});
|
||||
var opts = App.HTML.Build.options(obj, options.PACKAGE);
|
||||
|
||||
var opts = App.HTML.Build.options(obj, options.TPL);
|
||||
tpl.set(':TPL', opts);
|
||||
tpl.set(':TPL_DEFAULT_VALUE', options.TPL || App.Helpers.getFirstKey(obj));
|
||||
// tpl.set(':TPL_DEFAULT_VALUE', options.TPL || App.Helpers.getFirstKey(obj));
|
||||
|
||||
} catch (e) {
|
||||
return tpl;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="form-row dns-template-box cc">\
|
||||
<label for="#" class="field-label">Template:</label>\
|
||||
<span class="select" id="selecttemplate">~!:TPL_DEFAULT_VALUE~!</span>\
|
||||
<span class="select" id="selecttemplate">~!:TPL_DEFAULT_VALUE~! t </span>\
|
||||
<select name="TPL" class="styled tpl-item">\
|
||||
~!:TPL~!\
|
||||
</select>\
|
||||
|
@ -286,10 +286,10 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">Associated DNS Name:</label>\
|
||||
<input type="text" name="NAME" value="~!:NAME~!" class="text-field rule-domain">\
|
||||
</div>\
|
||||
<div class="form-row suspended cc">\
|
||||
<!-- div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND"/>\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row buttons-row cc">\
|
||||
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
|
||||
<span class="cancel-btn do_action_cancel_form">Cancel</span>\
|
||||
|
@ -403,12 +403,12 @@ App.Templates.html = {
|
|||
~!:PACKAGE_OPTIONS~!\
|
||||
</select>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Shell:</label>\
|
||||
<select class="styled disabled" name="SHELL">\
|
||||
~!:SHELL_OPTIONS~!\
|
||||
</select>\
|
||||
</div>\
|
||||
</div -->\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">role:</label>\
|
||||
<select class="styled" name="ROLE">\
|
||||
|
@ -474,9 +474,9 @@ App.Templates.html = {
|
|||
<span class="prop-value">~!:FULLNAME~!</span>\
|
||||
</span>\ </div>\
|
||||
<div class="user-details-box">\
|
||||
<span class="prop-box prop-box_group-values cc user-details do_action_login_as">\
|
||||
<!-- span class="prop-box prop-box_group-values cc user-details do_action_login_as">\
|
||||
<span class="prop-value login-as do_action_login_as">login as</span>\
|
||||
</span>\
|
||||
</span -->\
|
||||
<span class="prop-box prop-box_group-values cc user-details">\
|
||||
<span class="prop-title">email:</span>\
|
||||
<span class="group-values">\
|
||||
|
@ -716,7 +716,7 @@ App.Templates.html = {
|
|||
</div>\
|
||||
</div><!-- Mail options -->\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">create DNS domain:</label>\
|
||||
<label for="#" class="field-label">Create DNS domain also:</label>\
|
||||
<input type="checkbox" value="" name="DNS_DOMAIN" class="styled">\
|
||||
</div>\
|
||||
<div class="form-row buttons-row cc">\
|
||||
|
@ -846,7 +846,7 @@ App.Templates.html = {
|
|||
<select name="TYPE" class="styled">~!:TYPE_OPTIONS~!</select>\
|
||||
</div>\
|
||||
<div class="form-row cc">\
|
||||
<label for="#" class="field-label">Name:</label>\
|
||||
<label for="#" class="field-label">DB name:</label>\
|
||||
<input type="text" class="text-field" name="DB" value="~!:DB~!">\
|
||||
</div>\
|
||||
<div class="db-credentials ">\
|
||||
|
@ -864,10 +864,10 @@ App.Templates.html = {
|
|||
<label for="#" class="field-label">Host:</label>\
|
||||
<select name="HOST" class="styled">~!:HOST_OPTIONS~!</select>\
|
||||
</div -->\
|
||||
<div class="form-row cc">\
|
||||
<!-- div class="form-row cc">\
|
||||
<label for="#" class="field-label">Encoding:</label>\
|
||||
<select name="ENCODING" class="styled">~!:ENCODING_OPTIONS~!</select>\
|
||||
</div>\
|
||||
</div -->\
|
||||
<div class="form-row suspended cc">\
|
||||
<label for="#" class="field-label">Suspended:</label>\
|
||||
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
|
||||
|
@ -912,10 +912,10 @@ App.Templates.html = {
|
|||
</div>\
|
||||
<div class="props-ext">\
|
||||
<!-- span class="backup-db do_action_backup_db">backup</span-->\
|
||||
<span class="prop-box">\
|
||||
<!-- span class="prop-box">\
|
||||
<span class="prop-title">encoding:</span>\
|
||||
<span class="prop-value">~!:ENCODING~!</span>\
|
||||
</span>\
|
||||
</span -->\
|
||||
<!-- disk usage block -->\
|
||||
<div class="b-usage-box disk-usage cc">\
|
||||
<div class="usage-box">\
|
||||
|
@ -1075,13 +1075,13 @@ App.Templates.html = {
|
|||
<a class="backup-url" href="return alert(\'Not available at the time\');">download</a>\
|
||||
</div>\
|
||||
<div class="props-ext">\
|
||||
<div class="backup-actions">\
|
||||
<!-- div class="backup-actions">\
|
||||
<a class="backup-actions-url restore-url" href="return alert(\'Not available at the time\');">restore</a>\
|
||||
<a class="backup-actions-url detailed-restore-url" href="return alert(\'Not available at the time\');">\
|
||||
<span class="detailed-restore-title">detailed</span>\
|
||||
<span class="detailed-restore-ext">restore</span>\
|
||||
</a>\
|
||||
</div>\
|
||||
</div -->\
|
||||
</div> \
|
||||
</div><!-- // .row-details -->\
|
||||
</div><!-- // .row 1 -->']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue