Skip to content

Commit

Permalink
Fixed issue: Partial missing frontend validation on answer option codes
Browse files Browse the repository at this point in the history
Dev Also added hint icon how the code should look like
  • Loading branch information
c-schmitz committed Feb 15, 2024
1 parent c189adf commit bccddcf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Expand Up @@ -55,6 +55,7 @@
class='code code-title'
value="{{ answerOption.code }}"
maxlength='5'
pattern="[a-zA-Z0-9]+" // Only letters and numbers

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Feb 23, 2024

Collaborator

Capture du 2024-02-23 18-51-38

PHP comment on html ;)

required='required'
onfocusout="LS.questionEditor.showAnswerOptionCodeUniqueError(this);"
/>
Expand Down
7 changes: 6 additions & 1 deletion application/views/questionAdministration/answerOptions.twig
Expand Up @@ -29,7 +29,12 @@
<thead>
<tr>
<th></th>
<th class='col-lg-1'>{{ gT("Code") }}</th>
<th class='col-lg-1'>{{ gT("Code") }}
<i
class="ri-information-fill"
data-bs-toggle="tooltip"
title="{{ gT("A mandatory unique alpha-numeric code for each answer option (1-5 characters)") }}"
> </i> </th>

{% if assessmentvisible %}
<th class='col-lg-1'>
Expand Down
2 changes: 1 addition & 1 deletion application/views/questionAdministration/subquestions.twig
Expand Up @@ -44,7 +44,7 @@
<i
class="ri-information-fill"
data-bs-toggle="tooltip"
title="{{ gT("A mandatory unique alpha-numeric code for each answer option (1-5 characters)") }}"
title="{{ gT("A mandatory unique alpha-numeric code for each subquestion (1-20 characters)") }}"
> </i>
</th>
<th>
Expand Down

0 comments on commit bccddcf

Please sign in to comment.