Skip to content

Commit

Permalink
Merge pull request #56 from imi-ms/1-include-selenium-tests
Browse files Browse the repository at this point in the history
Frontend adjustments for selenium tests
  • Loading branch information
ywarnecke authored Sep 5, 2024
2 parents be058b5 + c4f3018 commit cf7cb30
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
27 changes: 14 additions & 13 deletions src/main/webapp/WEB-INF/bundle/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
id="errors"
class="alert alert-danger"
style="width: 100%"
th:text="${messages.get(#locale, 'bundle.error.notModifiable',
th:text="${messages.get(#locale, 'bundle.error.notModifiable',
'This bundle is not editable due to at least one unfinished encounter associated to this bundle.')}"
>
</div>
Expand Down Expand Up @@ -64,7 +64,7 @@
<input
layout:replace="~{fragments/forms :: inputWithLabel(
for='name', required=true, path='name',
clazz='form-control', showErrors=true,
clazz='form-control', showErrors=true,
text=${messages.get(#locale, 'bundle.label.bundleName', 'Name')})}"

/>
Expand All @@ -73,7 +73,7 @@
<textarea
layout:replace="~{fragments/forms :: textareaWithLabel(
for='description', required=true, path='description',
clazz='wysiwyg', showErrors=true,
clazz='wysiwyg', showErrors=true,
text=${messages.get(#locale, 'bundle.label.description', 'Description')})}"
>
</textarea>
Expand All @@ -85,7 +85,7 @@
collection=${bundleDTO.localizedWelcomeText},
collapsableId='localizedWelcomeTextCollapsableText',
inputType='textarea',
inputClazz='form-control wysiwyg localablePostElement',
inputClazz='form-control wysiwyg localablePostElement',
path='localizedWelcomeText[#INDEXFIELD]',
firstRequiredLocalableElement=true)}"
>
Expand All @@ -104,7 +104,7 @@
collection=${bundleDTO.localizedWelcomeText},
collapsableId='localizedFinalTextCollapsableText',
inputType='textarea',
inputClazz='form-control wysiwyg localablePostElement',
inputClazz='form-control wysiwyg localablePostElement',
path='localizedFinalText[#INDEXFIELD]')}"
>
<th:block layout:fragment="collapseLabel">
Expand Down Expand Up @@ -160,14 +160,14 @@
<div class="row removableFlex list-group-item">
<div class="col-7 drag-n-drop-header-item">
<th:block
th:text="${messages.get(#locale, 'bundle.heading.assignedQuestionnaires',
th:text="${messages.get(#locale, 'bundle.heading.assignedQuestionnaires',
'Assigned questionnaires')}"
>
</th:block>
<span
class="bi bi-info-circle-fill"
style="display: inline-block"
th:title="${messages.get(#locale, 'bundle.heading.assignedQuestionnaireInfo',
th:title="${messages.get(#locale, 'bundle.heading.assignedQuestionnaireInfo',
'For each questionnaire it is possible to enable the export templates to be exported')}"
>
</span>
Expand All @@ -185,6 +185,7 @@
<a
data-bs-toggle="collapse"
class="bi bi-plus-lg"
id="moreQuestionnaire"
onclick="DragNDropList.toggleCollapseTable(this)"
>
</a>
Expand Down Expand Up @@ -661,7 +662,7 @@
</div>
</div>

<div
<div
class="d-none"
id="draggableContainer"
></div>
Expand Down Expand Up @@ -757,21 +758,21 @@

$(".sortable").sortable({
group: "questionnaires",
sort: true,
sort: true,
animation:150,
easing: "cubic-bezier(1, 0, 0, 1)",
draggable: ".list-group-item",
filter: ".notDraggable",
onStart: function(e) {
startTable = $(e.from);
targetTable = $(e.from);
targetTable = $(e.from);
},
onEnd: function(e) {
checkPublishingState();
checkPublishingState();
},
onChange: function(e) {
DragNDropList.onChange(e);
}
DragNDropList.onChange(e);
}

});
</script>
Expand Down
40 changes: 20 additions & 20 deletions src/main/webapp/WEB-INF/clinic/edit.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--/*
* View to create a new clinic entry or edit an existing one
* View to create a new clinic entry or edit an existing one
*/-->

<th:block
Expand Down Expand Up @@ -177,7 +177,7 @@
th:each="bundleClinicDTO, loop: ${clinicDTO.bundleClinicDTOs}"
>
<div
class="row removableFlex list-group-item draggable bundle"
class="row removableFlex list-group-item draggable bundle" th:classappend="${#strings.replace(bundleClinicDTO.bundleDTO.name, ' ', '')}"
>
<input
type="hidden"
Expand Down Expand Up @@ -316,10 +316,10 @@
</div>
</div>

<!--/*
* if there is no bundle available (anymore),
* the heading of this table does not have to be
* presented; instead, a message like 'no bundles available' is shown
<!--/*
* if there is no bundle available (anymore),
* the heading of this table does not have to be
* presented; instead, a message like 'no bundles available' is shown
*/-->
<th:block th:if="${#lists.isEmpty(availableBundleDTOs)}">
<div
Expand Down Expand Up @@ -352,8 +352,8 @@
</div>
</th:block>
<!--/*
* at least one bundle is available, thus the heading of this table
* is presented; the message 'no bundles available' is hidden instead
* at least one bundle is available, thus the heading of this table
* is presented; the message 'no bundles available' is hidden instead
*/-->
<th:block
th:unless="${#lists.isEmpty(availableBundleDTOs)}"
Expand All @@ -375,7 +375,7 @@
th:each="bundleDTO, loop: ${availableBundleDTOs}"
>
<div
class="row removableFlex list-group-item draggable bundle"
class="row removableFlex list-group-item draggable bundle" th:classappend="${#strings.replace(bundleDTO.name, ' ', '')}"
>
<input
disabled="true"
Expand Down Expand Up @@ -546,7 +546,7 @@
th:each="user, loop: ${clinicDTO.assignedUserDTOs}"
>
<div
class="row removableFlex list-group-item draggable user"
class="row removableFlex list-group-item draggable username" th:classappend="${user.username}"
>
<div class="col-11">
<span>
Expand Down Expand Up @@ -697,7 +697,7 @@
<!--/* iterating over the users available to be assigned to the clinic */-->
<th:block th:each="item, loop: ${availableUserDTOs}">
<div
class="row removableFlex list-group-item draggable user"
class="row removableFlex list-group-item draggable username" th:classappend="${item.username}"
>
<div class="col-1">
<a
Expand Down Expand Up @@ -805,38 +805,38 @@
$("#assignedBundlesTable, #availableBundlesTable").each(function(i) {
$(this).sortable({
group: "bundles",
sort: true,
sort: true,
animation:150,
easing: "cubic-bezier(1, 0, 0, 1)",
draggable: ".list-group-item",
filter: ".notDraggable",
onStart: function(e) {
startTable = $(e.from);
targetTable = $(e.from);
targetTable = $(e.from);
},

onChange: function(e) {
DragNDropList.onChange(e);
}
DragNDropList.onChange(e);
}

});
});

$("#assignedUsersTable, #availableUsersTable").each(function(i) {
$(this).sortable({
group: "users",
sort: true,
sort: true,
animation:150,
easing: "cubic-bezier(1, 0, 0, 1)",
draggable: ".list-group-item",
filter: ".notDraggable",
onStart: function(e) {
startTable = $(e.from);
targetTable = $(e.from);
targetTable = $(e.from);
},
onChange: function(e) {
DragNDropList.onChange(e);
}
DragNDropList.onChange(e);
}

});
});
Expand Down
4 changes: 3 additions & 1 deletion src/main/webapp/WEB-INF/mobile/user/password.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
th:value="${session.LAST_USERNAME}"
/>

<th:block
<div class="error">
<th:block
th:if="${not #strings.isEmpty(error)}"
th:text="|${error}.|"
/>
</div>
<a
class="btn-link mobile-link"
index="2"
Expand Down

0 comments on commit cf7cb30

Please sign in to comment.