Skip to content

Commit

Permalink
Add label-required to mark fields as required on sign-up form
Browse files Browse the repository at this point in the history
  • Loading branch information
tomudding committed Sep 9, 2023
1 parent 59ec6a2 commit 0f862b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion module/Activity/view/partial/signupForm.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function formElementRender(
}

$result = '<div class="form-group' . (count($element->getMessages()) > 0 ? ' has-error' : '') . '">';
$result .= '<label for="' . $element->getAttribute('id') . '" class="control-label">' . $label . '</label>';
$result .= '<label for="' . $element->getAttribute('id') . '" class="control-label label-required">' . $label . '</label>';

if (in_array($elementType, ['Radio'])) {
$context->formRadio()->setSeparator('</div><div class="radio">');
Expand All @@ -78,6 +78,7 @@ function formElementRender(

<?php
$form->setAttribute('action', $submitUrl);
$form->setAttribute('class', 'form-signup');
$form->prepare();
echo $this->form()->openTag($form);
?>
Expand Down
2 changes: 1 addition & 1 deletion public/css/gewis-theme.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions public/scss/modules/_activity-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
@import 'form';
}

.form-signup {
@import 'form';
}

.container > section {
padding: 0;
}

0 comments on commit 0f862b1

Please sign in to comment.