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

Sat, 15 Jul 2023 13:45:48 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 15 Jul 2023 13:45:48 +0200
changeset 276
2a169e4d1d13
parent 227
f0ede8046b59
permissions
-rw-r--r--

fix typo in component node field name - fixes #268

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@134 31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ComponentEditView" scope="request" />
universe@134 32 <c:set var="component" scope="page" value="${viewmodel.component}"/>
universe@128 33 <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/>
universe@80 34
universe@184 35 <form action="./projects/${project.node}/components/-/commit" method="post">
universe@134 36 <table class="formtable" style="width: 70ch">
universe@51 37 <colgroup>
universe@51 38 <col>
universe@51 39 <col style="width: 100%">
universe@51 40 </colgroup>
universe@51 41 <tbody>
universe@51 42 <tr>
universe@181 43 <th><fmt:message key="project"/></th>
universe@76 44 <td>
universe@128 45 <c:out value="${project.name}" />
universe@184 46 <input type="hidden" name="projectid" value="${project.id}" />
universe@76 47 </td>
universe@76 48 </tr>
universe@76 49 <tr>
universe@227 50 <th><label for="component-name"><fmt:message key="component"/></label></th>
universe@227 51 <td><input id="component-name" name="name" type="text" maxlength="20" required value="<c:out value="${component.name}"/>" /></td>
universe@51 52 </tr>
universe@138 53 <tr title="<fmt:message key="node.tooltip"/>">
universe@227 54 <th><label for="component-node"><fmt:message key="node"/></label></th>
universe@276 55 <td><input id="component-node" name="node" type="text" maxlength="20" value="<c:out value="${component.node}"/>" /></td>
universe@138 56 </tr>
universe@51 57 <tr>
universe@227 58 <th><label for="component-color"><fmt:message key="component.color"/></label></th>
universe@227 59 <td><input id="component-color" name="color" type="color" required value="${component.color}" /></td>
universe@134 60 </tr>
universe@134 61 <tr>
universe@227 62 <th><label for="component-lead"><fmt:message key="component.lead"/></label></th>
universe@59 63 <td>
universe@227 64 <select id="component-lead" name="lead">
universe@134 65 <option value="-1"><fmt:message key="placeholder.null-lead"/></option>
universe@134 66 <c:forEach var="user" items="${viewmodel.users}">
universe@72 67 <option
universe@134 68 <c:if test="${not empty component.lead and user eq component.lead}">selected</c:if>
universe@134 69 value="${user.id}"><c:out value="${user.displayname}"/></option>
universe@59 70 </c:forEach>
universe@59 71 </select>
universe@59 72 </td>
universe@51 73 </tr>
universe@181 74 <tr title="<fmt:message key="ordinal.tooltip" />">
universe@227 75 <th><label for="component-ordinal"><fmt:message key="ordinal"/></label></th>
universe@59 76 <td>
universe@227 77 <input id="component-ordinal" name="ordinal" type="number" value="${component.ordinal}"/>
universe@134 78 </td>
universe@134 79 </tr>
universe@134 80 <tr>
universe@227 81 <th class="vtop"><label for="component-description"><fmt:message key="description"/></label></th>
universe@134 82 <td>
universe@227 83 <textarea id="component-description" name="description" rows="5"><c:out value="${component.description}"/></textarea>
universe@227 84 </td>
universe@227 85 </tr>
universe@227 86 <tr>
universe@227 87 <th><label for="component-active"><fmt:message key="component.active"/></label></th>
universe@227 88 <td>
universe@227 89 <input type="checkbox" id="component-active" name="active" <c:if test="${component.active}">checked</c:if> >
universe@59 90 </td>
universe@51 91 </tr>
universe@51 92 </tbody>
universe@51 93 <tfoot>
universe@51 94 <tr>
universe@51 95 <td colspan="2">
universe@134 96 <input type="hidden" name="id" value="${component.id}"/>
universe@134 97 <a href="./projects/${project.node}/components/" class="button">
universe@180 98 <fmt:message key="button.cancel"/>
universe@75 99 </a>
universe@180 100 <button type="submit"><fmt:message key="button.okay"/></button>
universe@51 101 </td>
universe@51 102 </tr>
universe@51 103 </tfoot>
universe@51 104 </table>
universe@51 105 </form>

mercurial