Commit cfc84755 authored by Till Brehm's avatar Till Brehm

Fixed #4055 can't add/delete Addon Template

parent 785bf953
......@@ -149,7 +149,7 @@ class page_action extends tform_actions {
if (trim($item['client_template_id']) != ''){
if ($text != '') $text .= '';
$text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']];
$text .= '<a href="#" class="button icons16 icoDelete"></a>';
$text .= '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a>';
$tmp = new stdClass();
$tmp->id = $item['assigned_template_id'];
$tmp->data = '';
......@@ -173,7 +173,7 @@ class page_action extends tform_actions {
foreach($tplAdd as $item){
if (trim($item) != ''){
if ($text != '') $text .= '';
$text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
$text .= '<li>' . $tpl[$item]. '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a></li>';
}
}
}
......
......@@ -143,7 +143,7 @@ class page_action extends tform_actions {
if (trim($item['client_template_id']) != ''){
if ($text != '') $text .= '';
$text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']];
$text .= '<a href="#" class="button icons16 icoDelete"></a>';
$text .= '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a>';
$tmp = new stdClass();
$tmp->id = $item['assigned_template_id'];
$tmp->data = '';
......@@ -167,7 +167,7 @@ class page_action extends tform_actions {
foreach($tplAdd as $item){
if (trim($item) != ''){
if ($text != '') $text .= '';
$text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
$text .= '<li>' . $tpl[$item]. '&nbsp;<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></a></li>';
}
}
}
......
......@@ -502,12 +502,12 @@ var ISPConfig = {
if(addTplId > 0) {
var newVal = tpl_add.split('/');
ISPConfig.new_tpl_add_id += 1;
var delbtn = $('<a href="#"></a>').attr('class', 'button icons16 icoDelete').click(function(e) {
var delbtn = $('&nbsp;<a href="#"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span></a>').attr('class', 'btn btn-danger btn-xs').click(function(e) {
e.preventDefault();
ISPConfig.delAdditionalTemplate($(this).parent().attr('rel'));
});
newVal[newVal.length] = 'n' + ISPConfig.new_tpl_add_id + ':' + addTplId;
$('<li>' + addTplText + '</li>').attr('rel', 'n' + new_tpl_add_id).append(delbtn).appendTo('#template_additional_list ul');
$('<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');
} else {
......
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