diff --git a/include/class.forms.php b/include/class.forms.php index 4e56c0f12c2ebddda36f0ae4c79543b2e2c6d750..2b9101ed265dc3c412338640660a671e9a93e439 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1332,7 +1332,6 @@ class FormField { } function getEditForm($source=null) { - $fields = array( 'field' => $this, 'comments' => new TextareaField(array( diff --git a/include/staff/templates/dynamic-form.tmpl.php b/include/staff/templates/dynamic-form.tmpl.php index 4cf5162dfcd0adab28d308bea7aee22b46ffa5e0..0690d7e291c3322765ee527b6bbde610abdb93d7 100644 --- a/include/staff/templates/dynamic-form.tmpl.php +++ b/include/staff/templates/dynamic-form.tmpl.php @@ -84,7 +84,7 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?> ?>" data-entry-id="<?php echo $field->getAnswer()->get('entry_id'); ?>"> <i class="icon-trash"></i> </a></div><?php } - if ($a && !$a->getValue() && $field->isRequiredForClose()) { + if ($a && !$a->getValue() && $field->isRequiredForClose() && get_class($field) != 'BooleanField') { ?><i class="icon-warning-sign help-tip warning" data-title="<?php echo __('Required to close ticket'); ?>" data-content="<?php echo __('Data is required in this field in order to close the related ticket'); ?>" diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index b35421c44f9c38514184bc6349c7f6656f0833eb..cc488ceb2ff0171105f26664dba6bd9f10a21235 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -649,6 +649,13 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { } else echo $v; + + $a = $field->getAnswer(); + $hint = ($field->isRequiredForClose() && $a && !$a->getValue() && get_class($field) != 'BooleanField') ? + sprintf('<i class="icon-warning-sign help-tip warning field-label" data-title="%s" data-content="%s" + /></i>', __('Required to close ticket'), + __('Data is required in this field in order to close the related ticket')) : ''; + echo $hint; ?> </a> <?php