Commit 1d3bd675 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed #4289 ISPConfig shows a warning when an additional template is added to a client

parent 21ee812c
......@@ -22,7 +22,7 @@
</select></div>
</div>
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
<button id="tpl_add_btn" class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
</div></div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='active_template_additional_txt'}</label>
......@@ -471,9 +471,9 @@ $('div.panel_client')
.find('div.pnl_formsarea')
.find('fieldset')
.find('input,select,button')
.not('#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id,#reseller')
.not('#template_master,#template_additional,#default_mailserver,#tpl_add_btn,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id,#reseller')
.click(function(e) {
if(custom_template_selected()) return true;
if(custom_template_selected()) return true;
e.preventDefault();
alert('{tmpl_var name="err_msg_master_tpl_set"}');
})
......
......@@ -544,7 +544,7 @@ var ISPConfig = {
newVal[newVal.length] = 'n' + ISPConfig.new_tpl_add_id + ':' + addTplId;
$('<li>' + addTplText + '</li>').attr('rel', 'n' + ISPConfig.new_tpl_add_id).append(delbtn).appendTo('#template_additional_list ul');
$('#template_additional').val(newVal.join('/'));
alert('additional template ' + addTplText + ' added to customer');
//alert('additional template ' + addTplText + ' added to customer');
} else {
alert('no additional template selcted');
}
......@@ -566,7 +566,7 @@ var ISPConfig = {
newVal[newVal.length] = oldVal[i];
}
$('#template_additional').val(newVal.join('/'));
alert('additional template ' + addTplText + ' deleted from customer');
//alert('additional template ' + addTplText + ' deleted from customer');
} else if(tpl_add != '') {
// old style
var addTemplate = document.getElementById('tpl_add_select').value.split('|',2);
......@@ -587,7 +587,7 @@ var ISPConfig = {
newVal = newVal.replace(repl, '');
newVal = newVal.replace('//', '/');
$('#template_additional').val(newVal);
alert('additional template ' + addTplText + ' deleted from customer');
//alert('additional template ' + addTplText + ' deleted from customer');
} else {
alert('no additional template selcted');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment