src/main/webapp/WEB-INF/jsp/user-form.jsp

Thu, 13 May 2021 10:23:37 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 13 May 2021 10:23:37 +0200
changeset 194
2b3b7d0a885e
parent 184
e8eecee6aadf
child 209
c9c6abf167c7
permissions
-rw-r--r--

fixes wrong default component selection

universe@51 1 <%--
universe@51 2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@51 3
universe@180 4 Copyright 2021 Mike Becker. All rights reserved.
universe@51 5
universe@51 6 Redistribution and use in source and binary forms, with or without
universe@51 7 modification, are permitted provided that the following conditions are met:
universe@51 8
universe@51 9 1. Redistributions of source code must retain the above copyright
universe@51 10 notice, this list of conditions and the following disclaimer.
universe@51 11
universe@51 12 2. Redistributions in binary form must reproduce the above copyright
universe@51 13 notice, this list of conditions and the following disclaimer in the
universe@51 14 documentation and/or other materials provided with the distribution.
universe@51 15
universe@51 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@51 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@51 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
universe@51 19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
universe@51 20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
universe@51 21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
universe@51 22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
universe@51 23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
universe@51 24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
universe@51 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
universe@51 26 --%>
universe@51 27 <%@page pageEncoding="UTF-8" %>
universe@51 28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
universe@51 29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
universe@51 30
universe@184 31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.UserEditView" scope="request"/>
universe@86 32 <c:set var="user" scope="page" value="${viewmodel.user}" />
universe@51 33
universe@184 34 <form action="./users/-/commit" method="post">
universe@69 35 <table class="formtable">
universe@51 36 <colgroup>
universe@51 37 <col>
universe@69 38 <col style="width: 50ch">
universe@51 39 </colgroup>
universe@51 40 <tbody>
universe@51 41 <tr>
universe@82 42 <th><fmt:message key="username"/></th>
universe@75 43 <td><input name="username" type="text" maxlength="50" required value="<c:out value="${user.username}"/>"
universe@72 44 <c:if test="${user.id ge 0}">readonly</c:if> /></td>
universe@51 45 </tr>
universe@51 46 <tr>
universe@181 47 <th><fmt:message key="user.givenname"/></th>
universe@75 48 <td><input name="givenname" type="text" maxlength="50" value="<c:out value="${user.givenname}"/>" /></td>
universe@51 49 </tr>
universe@51 50 <tr>
universe@181 51 <th><fmt:message key="user.lastname"/></th>
universe@75 52 <td><input name="lastname" type="text" maxlength="50" value="<c:out value="${user.lastname}"/>" /></td>
universe@51 53 </tr>
universe@51 54 <tr>
universe@181 55 <th><fmt:message key="user.mail"/></th>
universe@75 56 <td><input name="mail" type="email" maxlength="50" value="<c:out value="${user.mail}"/>" /></td>
universe@51 57 </tr>
universe@51 58 </tbody>
universe@51 59 <tfoot>
universe@184 60 <c:if test="${not empty viewmodel.errorText}">
universe@184 61 <tr>
universe@184 62 <td colspan="2">
universe@184 63 <div class="error-box">
universe@184 64 <fmt:message key="${viewmodel.errorText}"/>
universe@184 65 </div>
universe@184 66 </td>
universe@184 67 </tr>
universe@184 68 </c:if>
universe@51 69 <tr>
universe@51 70 <td colspan="2">
universe@72 71 <input type="hidden" name="userid" value="${user.id}"/>
universe@184 72 <a href="./users/" class="button">
universe@180 73 <fmt:message key="button.cancel"/>
universe@78 74 </a>
universe@180 75 <button type="submit"><fmt:message key="button.okay"/></button>
universe@51 76 </td>
universe@51 77 </tr>
universe@51 78 </tfoot>
universe@51 79 </table>
universe@51 80 </form>

mercurial