Import default subject/body for e-mails templates; fixes #496
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de> Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
committed by
Michael Kaufmann (d00p)
parent
b0d5049e68
commit
6bfa95f8a8
@@ -32,16 +32,19 @@ return array(
|
||||
),
|
||||
'template' => array(
|
||||
'label' => $lng['admin']['templates']['action'],
|
||||
'type' => 'select',
|
||||
'select_var' => $template_options
|
||||
'type' => 'hidden',
|
||||
'value' => $template,
|
||||
'display' => $lng['admin']['templates'][$template]
|
||||
),
|
||||
'subject' => array(
|
||||
'label' => $lng['admin']['templates']['subject'],
|
||||
'type' => 'text'
|
||||
'type' => 'text',
|
||||
'value' => $subject
|
||||
),
|
||||
'mailbody' => array(
|
||||
'label' => $lng['admin']['templates']['mailbody'],
|
||||
'type' => 'textarea',
|
||||
'value' => $body,
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* @author Florian Lippert <flo@syscp.org>
|
||||
*/
|
||||
|
||||
function makeoption($title, $value, $selvalue = NULL, $title_trusted = false, $value_trusted = false)
|
||||
function makeoption($title, $value, $selvalue = NULL, $title_trusted = false, $value_trusted = false, $id = NULL)
|
||||
{
|
||||
if($selvalue !== NULL
|
||||
&& ((is_array($selvalue) && in_array($value, $selvalue)) || $value == $selvalue))
|
||||
@@ -51,6 +51,11 @@ function makeoption($title, $value, $selvalue = NULL, $title_trusted = false, $v
|
||||
$value = htmlspecialchars($value);
|
||||
}
|
||||
|
||||
$option = '<option value="' . $value . '" ' . $selected . ' >' . $title . '</option>';
|
||||
$id_str = ' ';
|
||||
if($id !== NULL) {
|
||||
$id_str = 'id="' . $id . '"';
|
||||
}
|
||||
|
||||
$option = '<option value="' . $value . '" ' . $id_str . $selected . ' >' . $title . '</option>';
|
||||
return $option;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user