Skip to content

Commit

Permalink
Search form: maxlength for inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerning committed Sep 21, 2023
1 parent 52aabc7 commit 36b7d7c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/resources/templates/fragments/search/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<fieldset class="form-group row">
<label class="col-form-label col-xl-2" th:text="#{field_label_lemma_id}" for="id-search-lemma">Lemma ID</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 lemma-id" type="text" th:field="*{id}" placeholder="80"
<input class="form-control mb-sm-1 lemma-id" type="text" maxlength="10" th:field="*{id}" placeholder="80"
th:id="id-search-lemma" th:list="id-search-lemma-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-lemma')"></script>
</input>
Expand All @@ -25,7 +25,7 @@
<fieldset class="form-group row">
<label class="col-form-label col-xl-2" th:text="#{field_label_token_id}" for="id-search-token">Token ID</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 token-id" type="text" th:field="*{id}"
<input class="form-control mb-sm-1 token-id" type="text" maxlength="50" th:field="*{id}"
th:id="id-search-token" th:list="id-search-token-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-token')"></script>
</input>
Expand All @@ -41,7 +41,7 @@
Sentence ID
</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 sentence-id" type="text" th:field="*{id}"
<input class="form-control mb-sm-1 sentence-id" type="text" maxlength="50" th:field="*{id}"
th:id="id-search-sentence" th:list="id-search-sentence-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-sentence')"></script>
</input>
Expand All @@ -57,7 +57,7 @@
Sentence ID
</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 text-id" type="text" th:field="*{id}"
<input class="form-control mb-sm-1 text-id" type="text" maxlength="50" th:field="*{id}"
th:id="id-search-text" th:list="id-search-text-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-text')"></script>
</input>
Expand All @@ -73,7 +73,7 @@
Sentence ID
</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 object-id" type="text" th:field="*{id}"
<input class="form-control mb-sm-1 object-id" type="text" maxlength="50" th:field="*{id}"
th:id="id-search-object" th:list="id-search-object-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-object')"></script>
</input>
Expand All @@ -89,7 +89,7 @@
Sentence ID
</label>
<div class="col-xl-10">
<input class="form-control mb-sm-1 ths-id" type="text" th:field="*{id}"
<input class="form-control mb-sm-1 ths-id" type="text" maxlength="50" th:field="*{id}"
th:id="id-search-ths" th:list="id-search-ths-suggestions">
<script th:replace="fragments/search/tools :: autocomplete('id-search-ths')"></script>
</input>
Expand Down Expand Up @@ -127,7 +127,7 @@
<!--<label class="col-form-label col-xl-1" th:text="${token.empty}"></label>-->
<div class="col-xl-10">

<input class="form-control mb-sm-3 lemma-id" type="text" th:field="*{tokens[__${i.index}__].lemma.id}"
<input class="form-control mb-sm-3 lemma-id" type="text" maxlength="10" th:field="*{tokens[__${i.index}__].lemma.id}"
th:id="|token-${i.index}-lemma|" th:list="|token-${i.index}-lemma-suggestions|">
<script th:replace="fragments/search/tools :: autocomplete(__|token-${i.index}-lemma|__)"></script>
</input>
Expand All @@ -136,7 +136,7 @@

<label class="col-form-label col-xl-2" th:text="#{field_label_hieroglyphs}">Hieroglyphs</label>
<div class="col-xl-10">
<input class="form-control mb-sm-3" type="text" th:field="*{tokens[__${i.index}__].glyphs}"/>
<input class="form-control mb-sm-3" type="text" maxlength="100" th:field="*{tokens[__${i.index}__].glyphs}"/>
</div>
<div th:replace=" :: translation-spec('token-__${i.index}__', 'sentenceSearchForm.tokens[__${i.index}__]', ${allTranslationLanguages})"/>
</fieldset>
Expand All @@ -154,15 +154,15 @@
<span th:text="#{field_label_collocation_lemma_1}">Lemma ID 1</span>
</label>
<div class="col-xl-9">
<input class="form-control" type="text" th:field="*{tokens[0].lemma.id}" id="collocation_lemma_1" placeholder="69040"/>
<input class="form-control" type="text" maxlength="10" th:field="*{tokens[0].lemma.id}" id="collocation_lemma_1" placeholder="69040"/>
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-xl-3" for="collocation_lemma_2">
<span th:text="#{field_label_collocation_lemma_2}">Lemma ID 2</span>
</label>
<div class="col-xl-9">
<input class="form-control" type="text" th:field="*{tokens[1].lemma.id}" id="collocation_lemma_2" placeholder="32820"/>
<input class="form-control" type="text" maxlength="10" th:field="*{tokens[1].lemma.id}" id="collocation_lemma_2" placeholder="32820"/>
</div>
</div>

Expand Down Expand Up @@ -216,7 +216,7 @@


<div class="col-xl-9">
<input class="bbaw-libertine form-control mb-sm-3 keyboardInput" type="text" th:field="*{root}" lang="egy"/>
<input class="bbaw-libertine form-control mb-sm-3 keyboardInput" type="text" maxlength="10" th:field="*{root}" lang="egy"/>
<div class="form-check form-check-inline">
<input class="form-check-input transcription-enc-btn" type="radio" name="root_enc" id="root_enc_unicode" value="unicode" checked disabled>
<label class="form-check-label" for="root_enc_unicode" th:text="#{field_value_label_enc_unicode_only}">Unicode (only)</label>
Expand Down Expand Up @@ -250,7 +250,7 @@
<a class="transliteration-help" href="#" role="button" data-toggle="modal" data-target="#bibliography-help"><i class="fas fa-info-circle"></i></a>
</label>
<div class="col-xl-9">
<input class="form-control" type="text" th:field="*{bibliography}" placeholder="Wb 1, 7.15"/>
<input class="form-control" type="text" maxlength="100" th:field="*{bibliography}" placeholder="Wb 1, 7.15"/>
</div>
</div>

Expand Down Expand Up @@ -399,7 +399,7 @@ <h5 class="modal-title" id="exampleModalCenterTitle" th:text="#{modal_bibliograp
Translation
</label>
<div class="col-xl-9">
<input class="form-control mb-sm-3" type="text" th:field="*{translation.text}" th:id="|field-label-translation-${key}|" th:placeholder="#{field_label_translation_placeholder}"/>
<input class="form-control mb-sm-3" type="text" maxlength="100" th:field="*{translation.text}" th:id="|field-label-translation-${key}|" th:placeholder="#{field_label_translation_placeholder}"/>
<div th:each="lang : ${languages}" class="form-check form-check-inline">
<input class="form-check-input" type="radio" th:field="*{translation.lang}" th:value="${lang}"
th:id="|field-value-translation-checkbox-${lang}-${key}|"/>
Expand All @@ -418,7 +418,7 @@ <h5 class="modal-title" id="exampleModalCenterTitle" th:text="#{modal_bibliograp
Encodings -->

<div class="col-xl-9" th:fragment="transcription-spec(key, bind, encodings)" th:object="${__${bind}__}">
<input type="text" class="bbaw-libertine form-control mb-sm-3 keyboardInput" th:field="*{transcription.text}" th:id="dict-search-transcription" rows="3"
<input type="text" maxlength="100" class="bbaw-libertine form-control mb-sm-3 keyboardInput" th:field="*{transcription.text}" th:id="dict-search-transcription" rows="3"
placeholder="ꜣbw" name="transcription" lang="egy"/>
<div th:each="enc : ${encodings}" class="form-check form-check-inline">

Expand Down

0 comments on commit 36b7d7c

Please sign in to comment.