Skip to content

Commit

Permalink
add required asterisk
Browse files Browse the repository at this point in the history
  • Loading branch information
mrothauer committed Dec 13, 2023
1 parent 3be9af8 commit 6bab9a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/MyHtmlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function getGenders()

function generateGenericRadioButton($form, $formField)
{
$result = '<div class="form-fields-checkbox-wrapper dependent-form-field '.$formField->identifier.'">'.
$result = '<div class="required form-fields-checkbox-wrapper dependent-form-field '.$formField->identifier.'">'.
'<label>'.$formField->name.'</label>'.
$form->control('InfoSheets.' . $formField->identifier, [
'type' => 'radio',
Expand Down
2 changes: 1 addition & 1 deletion templates/InfoSheets/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<div class="edit<?php echo !$this->request->getSession()->read('isMobile') ? ' column-2' : ''; ?>">
<?php
echo $this->Form->fieldset(
$this->Form->control('InfoSheets.defect_description', ['type' => 'textarea', 'label' => 'Fehlerbeschreibung:', 'placeholder' => 'Helft mit einer genauen Fehlerbeschreibung, wiederkehrende Defekte herauszufinden und so Schwachstellen in der Konstruktion von Geräten zu identifizieren! Maximal 1.000 Zeichen.', 'maxlength' => 1000]).
$this->Form->control('InfoSheets.defect_description', ['required' => true, 'type' => 'textarea', 'label' => 'Fehlerbeschreibung:', 'placeholder' => 'Helft mit einer genauen Fehlerbeschreibung, wiederkehrende Defekte herauszufinden und so Schwachstellen in der Konstruktion von Geräten zu identifizieren! Maximal 1.000 Zeichen.', 'maxlength' => 1000]).
$this->Html->generateGenericRadioButton($this->Form, $defectFoundReasonFormField).
$this->Html->generateGenericRadioButton($this->Form, $repairPostponedReasonFormField).
$this->Html->generateGenericRadioButton($this->Form, $noRepairReasonFormField).
Expand Down
3 changes: 3 additions & 0 deletions webroot/css/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,9 @@ div.admin div.edit.column-1 textarea {
#infoSheetEditForm .input.textarea .error-message {
margin-top: -5px;
}
#infoSheetEditForm .input.radio label::after {
content: ''; /* hide required asterisk after radio buttons */
}
#eventEditForm .custom-coordinates-wrapper,
#workshopEditForm .custom-coordinates-wrapper {
display: none;
Expand Down

0 comments on commit 6bab9a9

Please sign in to comment.