Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François GrizzlyDev
ISPConfig 3
Commits
cfc84755
Commit
cfc84755
authored
Jul 28, 2016
by
Till Brehm
Browse files
Fixed #4055 can't add/delete Addon Template
parent
785bf953
Changes
3
Hide whitespace changes
Inline
Side-by-side
interface/web/client/client_edit.php
View file @
cfc84755
...
...
@@ -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="b
utton icons16 icoDelet
e"></a>'
;
$text
.
=
'
<a href="#" class="b
tn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="tru
e"></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="b
utton icons16 icoDelet
e"></a></li>'
;
$text
.
=
'<li>'
.
$tpl
[
$item
]
.
'
<a href="#" class="b
tn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="tru
e"></a></li>'
;
}
}
}
...
...
interface/web/client/reseller_edit.php
View file @
cfc84755
...
...
@@ -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="b
utton icons16 icoDelet
e"></a>'
;
$text
.
=
'
<a href="#" class="b
tn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="tru
e"></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="b
utton icons16 icoDelet
e"></a></li>'
;
$text
.
=
'<li>'
.
$tpl
[
$item
]
.
'
<a href="#" class="b
tn btn-danger btn-xs"><span class="glyphicon glyphicon-remove-circle" aria-hidden="tru
e"></a></li>'
;
}
}
}
...
...
interface/web/themes/default/assets/javascripts/ispconfig.js
View file @
cfc84755
...
...
@@ -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
=
$
(
'
<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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment