Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
e1585fb0
Commit
e1585fb0
authored
Sep 30, 2010
by
filip
Browse files
Added ability to reply support messages
Simple threaded support messages (via RE: in subject)
parent
f612f1eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
interface/web/help/form/support_message.tform.php
View file @
e1585fb0
...
...
@@ -32,7 +32,7 @@ $form["list_default"] = "support_message_list.php";
//* be set to yes in most cases
$form
[
"auth"
]
=
'yes'
;
// yes / no
//* Authent
o
cation presets. The defaults below does not need to be changed in most cases.
//* Authent
i
cation presets. The defaults below does not need to be changed in most cases.
$form
[
"auth_preset"
][
"userid"
]
=
0
;
// 0 = id of the user, > 0 id must match with id of current user
$form
[
"auth_preset"
][
"groupid"
]
=
0
;
// 0 = default groupid of the user, > 0 id must match with groupid of current user
$form
[
"auth_preset"
][
"perm_user"
]
=
'riud'
;
//r = read, i = insert, u = update, d = delete
...
...
@@ -40,6 +40,20 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update,
$form
[
"auth_preset"
][
"perm_other"
]
=
''
;
//r = read, i = insert, u = update, d = delete
//* Maybe we're writing in a response to another message
$sm_default_recipient_id
=
''
;
$sm_default_subject
=
''
;
if
(
isset
(
$_GET
[
'reply'
]))
{
$sm_msg_id
=
preg_replace
(
"/[^0-9]/"
,
""
,
$_GET
[
'reply'
]);
$res
=
$app
->
db
->
queryOneRecord
(
"SELECT sender_id, subject FROM support_message WHERE support_message_id=
$sm_msg_id
"
);
if
(
$res
[
'sender_id'
])
{
$sm_default_recipient_id
=
$res
[
'sender_id'
];
$sm_default_subject
=
(
preg_match
(
"/^Re:/"
,
$res
[
'subject'
])
?
""
:
"Re: "
)
.
$res
[
'subject'
];
}
}
//* Begin of the form definition of the first tab. The name of the tab is called "message". We refer
//* to this name in the $form["tab_default"] setting above.
$form
[
"tabs"
][
'message'
]
=
array
(
...
...
@@ -53,7 +67,7 @@ $form["tabs"]['message'] = array (
'recipient_id'
=>
array
(
'datatype'
=>
'INTEGER'
,
'formtype'
=>
'SELECT'
,
'default'
=>
''
,
'default'
=>
$sm_default_recipient_id
,
'datasource'
=>
array
(
'type'
=>
'SQL'
,
'querystring'
=>
'SELECT userid,username FROM sys_user WHERE userid != 1 AND {AUTHSQL} ORDER BY username'
,
'keyfield'
=>
'userid'
,
...
...
@@ -84,7 +98,7 @@ $form["tabs"]['message'] = array (
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'NOTEMPTY'
,
'errmsg'
=>
'subject_is_empty'
),
),
'default'
=>
''
,
'default'
=>
$sm_default_subject
,
'value'
=>
''
,
'width'
=>
'30'
,
'maxlength'
=>
'255'
...
...
@@ -117,4 +131,4 @@ $form["tabs"]['message'] = array (
?>
\ No newline at end of file
?>
interface/web/help/lib/lang/cz_support_message.lng
View file @
e1585fb0
...
...
@@ -4,4 +4,5 @@ $wb['sender_id_txt'] = 'ID Odesílatele';
$wb
[
'subject_txt'
]
=
'Předmět'
;
$wb
[
'message_txt'
]
=
'Zpráva'
;
$wb
[
'tstamp_txt'
]
=
'Časové razítko'
;
$wb
[
'reply_txt'
]
=
'Odpovědět'
;
?>
interface/web/help/lib/lang/en_support_message.lng
View file @
e1585fb0
...
...
@@ -4,4 +4,5 @@ $wb['sender_id_txt'] = 'Sender ID';
$wb
[
'subject_txt'
]
=
'Subject'
;
$wb
[
'message_txt'
]
=
'Message'
;
$wb
[
'tstamp_txt'
]
=
'Timestamp'
;
$wb
[
'reply_txt'
]
=
'Reply'
;
?>
interface/web/help/templates/support_message_view.htm
View file @
e1585fb0
...
...
@@ -14,6 +14,11 @@
<p>
{tmpl_var name='message'}
</p>
</div>
</fieldset>
<div
class=
"buttonHolder buttons"
>
<button
class=
"positive iconstxt icoPositive"
type=
"button"
value=
"{tmpl_var name='reply_txt'}"
onClick=
"loadContent('help/support_message_edit.php?reply={tmpl_var name='id'}');"
><span>
{tmpl_var name='reply_txt'}
</span></button>
</div>
</div>
</div>
</div>
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