diff --git a/app/src/View/Helper/FieldHelper.php b/app/src/View/Helper/FieldHelper.php index 28d64ae03..fd4b88c23 100644 --- a/app/src/View/Helper/FieldHelper.php +++ b/app/src/View/Helper/FieldHelper.php @@ -576,20 +576,16 @@ protected function formNameDiv(string $fieldName, break; } } - + return '
' - . '
' - . (!($labelIsTextOnly) && ($fieldType != 'boolean') - ? $this->Form->label($fn, $label) - : $label) - . ($this->editable - && in_array($fn, $this->reqFields) - ? ' ' - . '' . __d('field','required') . '' - : '') . ' -
- ' . ($desc ? '
' . $desc . '
' : '') .' -
'; + . '
' + // Form Label + . (!($labelIsTextOnly) && ($fieldType != 'boolean') ? $this->Form->label($fn, $label) : $label) + . ($this->editable && in_array($fn, $this->reqFields) ? $this->requiredSpanElement() : '') + . '
' // field-title div + // Description element + . ($desc ? '
' . $desc . '
' : '') .' + '; } /** @@ -663,6 +659,17 @@ public function peopleAutocompleteControl(string $fieldName, string $type = 'cop } } + /** + * Static required Span Element + * + * @return string + * @since COmanage Registry v5.0.0 + */ + protected function requiredSpanElement() { + return "" + . "{__d('field', 'required')}"; + } + /** * Emit a source control for an MVEA that has a source_foo_id field pointing * to an External Identity attribute. @@ -720,14 +727,15 @@ public function sourceControl($entity): string { /** * Generate a status control (a read only status with an optional link button). - * - * @since Registry Registry v5.0.0 - * @param string $fieldName Form field - * @param string $status Status text - * @param array $link Link information, including 'url', 'label', 'class', 'confirm' - * @param string $labelText Label text (fieldName language key used by default) - * @param boolean $labelIsTextOnly true if