diff --git a/assets/default/css/theme.css b/assets/default/css/theme.css index e50724e19283d088aceb3acfd64cf4feb51acc8a..156d65da13eb2711d4dfe5c5505926ea83a61d85 100644 --- a/assets/default/css/theme.css +++ b/assets/default/css/theme.css @@ -544,7 +544,7 @@ body { #clientLogin div label { display: block; } -label.required { +label.required, span.required { font-weight: bold; } #ticketForm div label.required, diff --git a/include/class.forms.php b/include/class.forms.php index 1d7f95031193175f8a0c363b6e50739f34489375..77248c8287705b7b5abb6b9ba8cf40a8f9d13e24 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -2045,10 +2045,7 @@ class ThreadEntryWidget extends Widget { $object_id = substr(session_id(), -12); } list($draft, $attrs) = Draft::getDraftAndDataAttrs($namespace, $object_id, $this->value); - ?><div style="margin-bottom:0.5em;margin-top:0.5em"><strong><?php - echo Format::htmlchars($this->field->get('label')); - ?></strong>:</div> - + ?> <textarea style="width:100%;" name="<?php echo $this->field->get('name'); ?>" placeholder="<?php echo Format::htmlchars($this->field->get('hint')); ?>" class="<?php if ($cfg->isHtmlThreadEnabled()) echo 'richtext'; diff --git a/include/class.topic.php b/include/class.topic.php index 395e482ad52722cfa886ef346d0d9e7444009bcd..e628919c01c1f2f1f08cd3a2b7157596ca3776d4 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -436,6 +436,8 @@ class Topic { } static function updateSortOrder() { + global $cfg; + // Fetch (un)sorted names if (!($names = static::getHelpTopics(false, true, false))) return; diff --git a/include/client/templates/dynamic-form.tmpl.php b/include/client/templates/dynamic-form.tmpl.php index 12b3944075e71ad3788be4be515fadb5478a56e8..fff9aa3a769b8ed9a366f39aa1f1d0831571f544 100644 --- a/include/client/templates/dynamic-form.tmpl.php +++ b/include/client/templates/dynamic-form.tmpl.php @@ -20,26 +20,24 @@ continue; ?> <tr> - <?php if ($field->isBlockLevel()) { ?> - <td colspan="2"> - <?php - } - else { ?> - <td><label for="<?php echo $field->getFormName(); ?>" class="<?php + <td colspan="2" style="padding-top:8px;"> + <label for="<?php echo $field->getFormName(); ?>"><span class="<?php if ($field->get('required')) echo 'required'; ?>"> - <?php echo Format::htmlchars($field->get('label')); ?>:</label></td><td> - <?php - } - $field->render('client'); ?> + <?php echo Format::htmlchars($field->getLocal('label')); ?> <?php if ($field->get('required')) { ?> - <font class="error">*</font> + <span class="error">*</span> <?php } + ?></span><?php if ($field->get('hint') && !$field->isBlockLevel()) { ?> <br /><em style="color:gray;display:inline-block"><?php - echo Format::htmlchars($field->get('hint')); ?></em> + echo Format::htmlchars($field->getLocal('hint')); ?></em> <?php - } + } ?> + <br/> + <?php + $field->render('client'); + ?></label><?php foreach ($field->errors() as $e) { ?> <br /> <font class="error"><?php echo $e; ?></font> diff --git a/include/staff/templates/dynamic-form.tmpl.php b/include/staff/templates/dynamic-form.tmpl.php index 6d0e15121a93b5d77bfee69335397e345a4da70a..2066056d4b6f1579566d5931f09c808c524a3b1c 100644 --- a/include/staff/templates/dynamic-form.tmpl.php +++ b/include/staff/templates/dynamic-form.tmpl.php @@ -47,6 +47,9 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?> ?> <tr><?php if ($field->isBlockLevel()) { ?> <td colspan="2"> + <div style="margin-bottom:0.5em;margin-top:0.5em"><strong><?php + echo Format::htmlchars($field->getLocal('label')); + ?></strong>:</div> <?php } else { ?>