fixes pre-selection in combo boxes

Sun, 17 May 2020 16:28:13 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 17 May 2020 16:28:13 +0200
changeset 60
ed51c5b1f3e5
parent 59
c759c60507a2
child 61
3e287f361c7a

fixes pre-selection in combo boxes

src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/version-form.jsp file | annotate | diff | comparison | revisions
--- a/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp	Sun May 17 16:23:39 2020 +0200
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp	Sun May 17 16:28:13 2020 +0200
@@ -59,7 +59,7 @@
                 <select name="owner">
                     <option value="-1"><fmt:message key="placeholder.null-owner" /> </option>
                     <c:forEach var="user" items="${users}">
-                        <option value="${user.id}">${user.displayname}</option>
+                        <option <c:if test="${not empty project.owner and user.id eq project.owner.id}">selected</c:if> value="${user.id}"><c:out value="${user.displayname}"/></option>
                     </c:forEach>
                 </select>
             </td>
--- a/src/main/webapp/WEB-INF/dynamic_fragments/version-form.jsp	Sun May 17 16:23:39 2020 +0200
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/version-form.jsp	Sun May 17 16:28:13 2020 +0200
@@ -51,7 +51,7 @@
             <td>
                 <select name="status" required>
                     <c:forEach var="elem" items="${versionStatusEnum}">
-                        <option value="${elem}"><fmt:message key="version.status.${elem}" /> </option>
+                        <option <c:if test="${elem eq version.status}">selected</c:if> value="${elem}"><fmt:message key="version.status.${elem}" /> </option>
                     </c:forEach>
                 </select>
             </td>

mercurial