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

Mon, 04 Jan 2021 15:34:41 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 04 Jan 2021 15:34:41 +0100
changeset 177
9884941a6d79
parent 152
7761c37c5e61
child 180
009700915269
permissions
-rw-r--r--

ordinals may be signed

     1 <%--
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4 Copyright 2020 Mike Becker. All rights reserved.
     6 Redistribution and use in source and binary forms, with or without
     7 modification, are permitted provided that the following conditions are met:
     9 1. Redistributions of source code must retain the above copyright
    10 notice, this list of conditions and the following disclaimer.
    12 2. Redistributions in binary form must reproduce the above copyright
    13 notice, this list of conditions and the following disclaimer in the
    14 documentation and/or other materials provided with the distribution.
    16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    26 --%>
    27 <%@page pageEncoding="UTF-8" %>
    28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ComponentEditView" scope="request" />
    32 <c:set var="component" scope="page" value="${viewmodel.component}"/>
    33 <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/>
    35 <form action="./projects/commit-component" method="post">
    36     <table class="formtable" style="width: 70ch">
    37         <colgroup>
    38             <col>
    39             <col style="width: 100%">
    40         </colgroup>
    41         <tbody>
    42         <tr>
    43             <th><fmt:message key="component.project"/></th>
    44             <td>
    45                 <c:out value="${project.name}" />
    46                 <input type="hidden" name="pid" value="${project.id}" />
    47             </td>
    48         </tr>
    49         <tr>
    50             <th><fmt:message key="component.name"/></th>
    51             <td><input name="name" type="text" maxlength="20" required value="<c:out value="${component.name}"/>" /></td>
    52         </tr>
    53         <tr title="<fmt:message key="node.tooltip"/>">
    54             <th><fmt:message key="node"/></th>
    55             <td><input name="node" type="text" maxlength="20" value="<c:out value="${component.node}"/>" /></td>
    56         </tr>
    57         <tr>
    58             <th><fmt:message key="component.color"/></th>
    59             <td><input name="color" type="color" required value="${component.color}" /></td>
    60         </tr>
    61         <tr>
    62             <th><fmt:message key="component.lead"/></th>
    63             <td>
    64                 <select name="lead">
    65                     <option value="-1"><fmt:message key="placeholder.null-lead"/></option>
    66                     <c:forEach var="user" items="${viewmodel.users}">
    67                         <option
    68                                 <c:if test="${not empty component.lead and user eq component.lead}">selected</c:if>
    69                                 value="${user.id}"><c:out value="${user.displayname}"/></option>
    70                     </c:forEach>
    71                 </select>
    72             </td>
    73         </tr>
    74         <tr title="<fmt:message key="tooltip.ordinal" />">
    75             <th><fmt:message key="component.ordinal"/></th>
    76             <td>
    77                 <input name="ordinal" type="number" value="${component.ordinal}"/>
    78             </td>
    79         </tr>
    80         <tr>
    81             <th class="vtop"><fmt:message key="component.description"/></th>
    82             <td>
    83                 <textarea name="description" rows="5"><c:out value="${component.description}"/></textarea>
    84             </td>
    85         </tr>
    86         </tbody>
    87         <tfoot>
    88         <tr>
    89             <td colspan="2">
    90                 <input type="hidden" name="id" value="${component.id}"/>
    91                 <a href="./projects/${project.node}/components/" class="button">
    92                     <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
    93                 </a>
    94                 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
    95             </td>
    96         </tr>
    97         </tfoot>
    98     </table>
    99 </form>

mercurial