diff --git a/include/class.forms.php b/include/class.forms.php index eb5aa52ef18b77075c92bf0e5916b72f96b7e18d..fb5b3cf6f32136e8005a7a04256f30e9642bc10e 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -2023,8 +2023,8 @@ class DatetimePickerWidget extends Widget { class SectionBreakWidget extends Widget { function render($mode=false) { ?><div class="form-header section-break"><h3><?php - echo Format::htmlchars($this->field->get('label')); - ?></h3><em><?php echo Format::htmlchars($this->field->get('hint')); + echo Format::htmlchars($this->field->getLocal('label')); + ?></h3><em><?php echo Format::htmlchars($this->field->getLocal('hint')); ?></em></div> <?php } @@ -2044,6 +2044,9 @@ class ThreadEntryWidget extends Widget { } list($draft, $attrs) = Draft::getDraftAndDataAttrs($namespace, $object_id, $this->value); ?> + <span class="required"><?php + echo Format::htmlchars($this->field->getLocal('label')); + ?>: <span class="error">*</span></span><br/> <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'; @@ -2189,9 +2192,9 @@ class FreeTextWidget extends Widget { function render($mode=false) { $config = $this->field->getConfiguration(); ?><div class=""><h3><?php - echo Format::htmlchars($this->field->get('label')); + echo Format::htmlchars($this->field->getLocal('label')); ?></h3><em><?php - echo Format::htmlchars($this->field->get('hint')); + echo Format::htmlchars($this->field->getLocal('hint')); ?></em><div><?php echo Format::viewableImages($config['content']); ?></div> </div> diff --git a/include/client/templates/dynamic-form.tmpl.php b/include/client/templates/dynamic-form.tmpl.php index fff9aa3a769b8ed9a366f39aa1f1d0831571f544..66b957a49100562520e1bb11a765a27d13120d1d 100644 --- a/include/client/templates/dynamic-form.tmpl.php +++ b/include/client/templates/dynamic-form.tmpl.php @@ -21,21 +21,23 @@ ?> <tr> <td colspan="2" style="padding-top:8px;"> + <?php if (!$field->isBlockLevel()) { ?> <label for="<?php echo $field->getFormName(); ?>"><span class="<?php if ($field->get('required')) echo 'required'; ?>"> <?php echo Format::htmlchars($field->getLocal('label')); ?> <?php if ($field->get('required')) { ?> <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->getLocal('hint')); ?></em> - <?php - } ?> + if ($field->get('hint')) { ?> + <br /><em style="color:gray;display:inline-block"><?php + echo Format::htmlchars($field->getLocal('hint')); ?></em> + <?php + } ?> <br/> <?php + } $field->render('client'); ?></label><?php foreach ($field->errors() as $e) { ?> diff --git a/include/staff/templates/dynamic-form.tmpl.php b/include/staff/templates/dynamic-form.tmpl.php index 2066056d4b6f1579566d5931f09c808c524a3b1c..f0db379b8459e9735babff88c969e0a4ad249277 100644 --- a/include/staff/templates/dynamic-form.tmpl.php +++ b/include/staff/templates/dynamic-form.tmpl.php @@ -47,9 +47,6 @@ 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 { ?> @@ -60,8 +57,8 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?> <td><div style="position:relative"><?php } $field->render(); ?> - <?php if ($field->get('required')) { ?> - <font class="error">*</font> + <?php if (!$field->isBlockLevel() && $field->get('required')) { ?> + <span class="error">*</span> <?php } if (($a = $field->getAnswer()) && $a->isDeleted()) {