Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
03df3233
Commit
03df3233
authored
10 years ago
by
Jared Hancock
Committed by
Peter Rotich
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rework the layout of the email template edit page
parent
dd9d30a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/class.template.php
+2
-1
2 additions, 1 deletion
include/class.template.php
include/staff/tpl.inc.php
+32
-37
32 additions, 37 deletions
include/staff/tpl.inc.php
scp/js/tips.js
+8
-2
8 additions, 2 deletions
scp/js/tips.js
with
42 additions
and
40 deletions
include/class.template.php
+
2
−
1
View file @
03df3233
...
@@ -518,7 +518,8 @@ class EmailTemplate {
...
@@ -518,7 +518,8 @@ class EmailTemplate {
$inst
=
self
::
lookup
(
self
::
create
(
$vars
,
$errors
));
$inst
=
self
::
lookup
(
self
::
create
(
$vars
,
$errors
));
// Inline images (attached to the draft)
// Inline images (attached to the draft)
$inst
->
attachments
->
upload
(
Draft
::
getAttachmentIds
(
$inst
->
getBody
()),
true
);
if
(
$inst
)
$inst
->
attachments
->
upload
(
Draft
::
getAttachmentIds
(
$inst
->
getBody
()),
true
);
return
$inst
;
return
$inst
;
}
}
...
...
This diff is collapsed.
Click to expand it.
include/staff/tpl.inc.php
+
32
−
37
View file @
03df3233
...
@@ -34,12 +34,12 @@ if (is_a($template, EmailTemplateGroup)) {
...
@@ -34,12 +34,12 @@ if (is_a($template, EmailTemplateGroup)) {
$tpl
=
$msgtemplates
[
$selected
];
$tpl
=
$msgtemplates
[
$selected
];
?>
?>
<h2>
Email Template Message -
<span>
<?php
echo
$name
;
?>
</span></h2>
<form
method=
"get"
action=
"templates.php?"
>
<div
style=
"padding-top:10px;padding-bottom:5px;"
>
<h2><span>
Email Template Set
/
<span><a
href=
"templates.php?tpl_id=
<?php
echo
$tpl_id
;
?>
"
>
<?php
echo
$name
;
?>
</a>
<form
method=
"get"
action=
"templates.php?"
>
<input
type=
"hidden"
name=
"a"
value=
"manage"
>
<input
type=
"hidden"
name=
"a"
value=
"manage"
>
<input
type=
"hidden"
name=
"tpl_id"
value=
"
<?php
echo
$tpl_id
;
?>
"
>
<input
type=
"hidden"
name=
"tpl_id"
value=
"
<?php
echo
$tpl_id
;
?>
"
>
Message Template:
<div
class=
"pull-right"
>
<span
style=
"font-size:10pt"
>
Viewing:
</span>
<select
id=
"tpl_options"
name=
"id"
style=
"width:300px;"
>
<select
id=
"tpl_options"
name=
"id"
style=
"width:300px;"
>
<option
value=
""
>
—
Select Setting Group
—
</option>
<option
value=
""
>
—
Select Setting Group
—
</option>
<?php
<?php
...
@@ -70,9 +70,10 @@ $tpl=$msgtemplates[$selected];
...
@@ -70,9 +70,10 @@ $tpl=$msgtemplates[$selected];
?>
?>
</select>
</select>
<input
type=
"submit"
value=
"Go"
>
<input
type=
"submit"
value=
"Go"
>
<font
color=
"red"
>
<?php
echo
$errors
[
'tpl'
];
?>
</font>
</div>
</form>
</h2>
</div>
</form>
<hr/>
<form
action=
"templates.php?id=
<?php
echo
$id
;
?>
&a=manage"
method=
"post"
id=
"save"
>
<form
action=
"templates.php?id=
<?php
echo
$id
;
?>
&a=manage"
method=
"post"
id=
"save"
>
<?php
csrf_token
();
?>
<?php
csrf_token
();
?>
<?php
foreach
(
$extras
as
$k
=>
$v
)
{
?>
<?php
foreach
(
$extras
as
$k
=>
$v
)
{
?>
...
@@ -82,36 +83,30 @@ $tpl=$msgtemplates[$selected];
...
@@ -82,36 +83,30 @@ $tpl=$msgtemplates[$selected];
<input
type=
"hidden"
name=
"a"
value=
"manage"
>
<input
type=
"hidden"
name=
"a"
value=
"manage"
>
<input
type=
"hidden"
name=
"do"
value=
"
<?php
echo
$action
;
?>
"
>
<input
type=
"hidden"
name=
"do"
value=
"
<?php
echo
$action
;
?>
"
>
<table
class=
"form_table settings_table"
width=
"940"
border=
"0"
cellspacing=
"0"
cellpadding=
"2"
>
<p>
<thead>
<h3
style=
"font-size:12pt;"
>
<?php
echo
$desc
[
'name'
];
?>
<tr>
<i
class=
"help-tip icon-question-sign"
<th
colspan=
"2"
>
data-content=
"
<?php
echo
Format
::
htmlchars
(
$desc
[
'desc'
]);
?>
"
<h4>
<?php
echo
Format
::
htmlchars
(
$desc
[
'desc'
]);
?>
</h4>
data-title=
"
<?php
echo
Format
::
htmlchars
(
$desc
[
'name'
]);
?>
"
></i>
<em>
Subject and body required.
<a
class=
"tip"
href=
"#ticket_variables.txt"
>
Supported Variables
</a>
.
</em>
<a
style=
"font-size:10pt"
class=
"tip pull-right"
href=
"#ticket_variables.txt"
>
Supported Variables
</a>
</th>
</h3>
</tr>
<?php
if
(
$errors
)
{
?>
</thead>
<font
class=
"error"
>
<?php
echo
$errors
[
'subject'
];
?>
<?php
echo
$errors
[
'body'
];
?>
</font>
<tbody>
<?php
}
?>
<tr>
</p>
<td
colspan=
2
>
<strong>
Message Subject:
</strong>
<em>
Email message subject
</em>
<font
class=
"error"
>
*
<?php
echo
$errors
[
'subject'
];
?>
</font><br>
<div>
<input
type=
"text"
name=
"subject"
size=
"60"
value=
"
<?php
echo
$info
[
'subject'
];
?>
"
>
<input
type=
"text"
name=
"subject"
size=
"65"
value=
"
<?php
echo
$info
[
'subject'
];
?>
"
</td>
style=
"font-size:14pt"
>
</tr>
<div
style=
"margin-bottom:0.5em;margin-top:0.5em"
>
<tr>
</div>
<td
colspan=
"2"
>
<input
type=
"hidden"
name=
"draft_id"
value=
""
/>
<div
style=
"margin-bottom:0.5em;margin-top:0.5em"
>
<textarea
name=
"body"
cols=
"21"
rows=
"16"
style=
"width:98%;"
wrap=
"soft"
<strong>
Message Body:
</strong>
<em>
Email message body.
</em>
<font
class=
"error"
>
*
<?php
echo
$errors
[
'body'
];
?>
</font>
class=
"richtext draft"
data-draft-namespace=
"tpl.
<?php
echo
$selected
;
?>
"
</div>
data-draft-object-id=
"
<?php
echo
$tpl_id
;
?>
"
>
<?php
echo
$info
[
'body'
];
?>
</textarea>
<input
type=
"hidden"
name=
"draft_id"
value=
""
/>
</div>
<textarea
name=
"body"
cols=
"21"
rows=
"16"
style=
"width:98%;"
wrap=
"soft"
class=
"richtext draft"
data-draft-namespace=
"tpl.
<?php
echo
$selected
;
?>
"
<p
style=
"text-align:center"
>
data-draft-object-id=
"
<?php
echo
$tpl_id
;
?>
"
>
<?php
echo
$info
[
'body'
];
?>
</textarea>
</td>
</tr>
</tbody>
</table>
<p
style=
"padding-left:210px;"
>
<input
class=
"button"
type=
"submit"
name=
"submit"
value=
"Save Changes"
>
<input
class=
"button"
type=
"submit"
name=
"submit"
value=
"Save Changes"
>
<input
class=
"button"
type=
"reset"
name=
"reset"
value=
"Reset Changes"
onclick=
"javascript:
<input
class=
"button"
type=
"reset"
name=
"reset"
value=
"Reset Changes"
onclick=
"javascript:
setTimeout('location.reload()', 25);"
/>
setTimeout('location.reload()', 25);"
/>
...
...
This diff is collapsed.
Click to expand it.
scp/js/tips.js
+
8
−
2
View file @
03df3233
...
@@ -111,8 +111,14 @@ jQuery(function() {
...
@@ -111,8 +111,14 @@ jQuery(function() {
});
});
getHelpTips
().
then
(
function
(
tips
)
{
getHelpTips
().
then
(
function
(
tips
)
{
var
section
=
tips
[
elem
.
attr
(
'
href
'
).
substr
(
1
)];
var
href
=
elem
.
attr
(
'
href
'
);
if
(
!
section
)
{
if
(
href
)
{
section
=
tips
[
elem
.
attr
(
'
href
'
).
substr
(
1
)];
}
else
if
(
elem
.
data
(
'
content
'
))
{
section
=
{
title
:
elem
.
data
(
'
title
'
),
content
:
elem
.
data
(
'
content
'
)};
}
else
{
elem
.
remove
();
elem
.
remove
();
clearTimeout
(
tip_timer
);
clearTimeout
(
tip_timer
);
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment