|
1 <%-- |
|
2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
|
3 |
|
4 Copyright 2021 Mike Becker. All rights reserved. |
|
5 |
|
6 Redistribution and use in source and binary forms, with or without |
|
7 modification, are permitted provided that the following conditions are met: |
|
8 |
|
9 1. Redistributions of source code must retain the above copyright |
|
10 notice, this list of conditions and the following disclaimer. |
|
11 |
|
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. |
|
15 |
|
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" %> |
|
30 |
|
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.VariantEditView" scope="request" /> |
|
32 <c:set var="variant" scope="page" value="${viewmodel.variant}"/> |
|
33 <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/> |
|
34 |
|
35 <form action="./projects/${project.node}/variants/-/commit" 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="project"/></th> |
|
44 <td> |
|
45 <c:out value="${project.name}" /> |
|
46 <input type="hidden" name="projectid" value="${project.id}" /> |
|
47 </td> |
|
48 </tr> |
|
49 <tr> |
|
50 <th><label for="variant-name"><fmt:message key="variant"/></label></th> |
|
51 <td><input id="variant-name" name="name" type="text" maxlength="20" required value="<c:out value="${variant.name}"/>" /></td> |
|
52 </tr> |
|
53 <tr title="<fmt:message key="node.tooltip"/>"> |
|
54 <th><label for="variant-node"><fmt:message key="node"/></label></th> |
|
55 <td><input id="variant-node" name="node" type="text" maxlength="20" value="<c:out value="${variant.node}"/>" /></td> |
|
56 </tr> |
|
57 <tr> |
|
58 <th><label for="variant-color"><fmt:message key="variant.color"/></label></th> |
|
59 <td><input id="variant-color" name="color" type="color" required value="${variant.color}" /></td> |
|
60 </tr> |
|
61 <tr title="<fmt:message key="ordinal.tooltip" />"> |
|
62 <th><label for="variant-ordinal"><fmt:message key="ordinal"/></label></th> |
|
63 <td> |
|
64 <input id="variant-ordinal" name="ordinal" type="number" value="${variant.ordinal}"/> |
|
65 </td> |
|
66 </tr> |
|
67 <tr> |
|
68 <th class="vtop"><label for="variant-description"><fmt:message key="description"/></label></th> |
|
69 <td> |
|
70 <textarea id="variant-description" name="description" rows="5"><c:out value="${variant.description}"/></textarea> |
|
71 </td> |
|
72 </tr> |
|
73 <tr> |
|
74 <th><label for="variant-active"><fmt:message key="variant.active"/></label></th> |
|
75 <td> |
|
76 <input type="checkbox" id="variant-active" name="active" <c:if test="${variant.active}">checked</c:if> > |
|
77 </td> |
|
78 </tr> |
|
79 </tbody> |
|
80 <tfoot> |
|
81 <tr> |
|
82 <td colspan="2"> |
|
83 <input type="hidden" name="id" value="${variant.id}"/> |
|
84 <a href="./projects/${project.node}/variants/" class="button"> |
|
85 <fmt:message key="button.cancel"/> |
|
86 </a> |
|
87 <button type="submit"><fmt:message key="button.okay"/></button> |
|
88 </td> |
|
89 </tr> |
|
90 </tfoot> |
|
91 </table> |
|
92 </form> |