From 408d77f3b64bda878a038132b515aa4e1050e8be Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Mon, 17 Apr 2023 13:10:23 -0400 Subject: [PATCH] cancel create buttons --- views/lot-edit.ejs | 544 ++++++++++++++++++------------------ views/lotOccupancy-edit.ejs | 8 +- views/map-edit.ejs | 154 +++++----- views/workOrder-edit.ejs | 54 ++-- 4 files changed, 392 insertions(+), 368 deletions(-) diff --git a/views/lot-edit.ejs b/views/lot-edit.ejs index 6bc8b40d..1b53211b 100644 --- a/views/lot-edit.ejs +++ b/views/lot-edit.ejs @@ -45,25 +45,31 @@ <% } %>
- <% if (!isCreate) { %> + <% if (isCreate) { %> + + <% } else { %>
<% } %> @@ -86,256 +92,256 @@
-
-
- -
- - pattern="<%= configFunctions.getProperty("settings.lot.lotNamePattern").source %>" - <% } %> - maxlength="100" - required - accesskey="f" - <%= (isCreate ? " autofocus" : "") %> /> -
- <% if (configFunctions.getProperty("settings.lot.lotNameHelpText")) { %> -

- <%- configFunctions.getProperty("settings.lot.lotNameHelpText").replace(/\n/g, "
") %> -

- <% } %> -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
- -
-
-
-
-
-
- <% if (isCreate) { %> -
-

- Select the <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type to load the available fields. -

-
- <% } else if (lot.lotFields.length === 0) { %> -
-

- The current <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type has no additional fields. -

-
- <% } else { %> - <% let lotTypeFieldIds = ""; %> - <% for (const lotField of lot.lotFields) { %> - <% lotTypeFieldIds += "," + lotField.lotTypeFieldId; %> -
- -
- <% if (!lotField.lotTypeFieldValues || lotField.lotTypeFieldValues === "") { %> - - pattern="<%= lotField.pattern %>" - <% } %> - minlength="<%= lotField.minimumLength %>" - maxlength="<%= lotField.maximumLength %>" - <%= lotField.isRequired ? " required" : "" %> /> - <% } else { %> - <% - const fieldValues = lotField.lotTypeFieldValues.split("\n"); - let valueFound = false; - %> -
- -
- <% } %> -
-
- <% } %> - - <% } %> -
-
+
+
+ +
+ + pattern="<%= configFunctions.getProperty("settings.lot.lotNamePattern").source %>" + <% } %> + maxlength="100" + required + accesskey="f" + <%= (isCreate ? " autofocus" : "") %> /> +
+ <% if (configFunctions.getProperty("settings.lot.lotNameHelpText")) { %> +

+ <%- configFunctions.getProperty("settings.lot.lotNameHelpText").replace(/\n/g, "
") %> +

+ <% } %> +
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+ <% if (isCreate) { %> +
+

+ Select the <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type to load the available fields. +

+
+ <% } else if (lot.lotFields.length === 0) { %> +
+

+ The current <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type has no additional fields. +

+
+ <% } else { %> + <% let lotTypeFieldIds = ""; %> + <% for (const lotField of lot.lotFields) { %> + <% lotTypeFieldIds += "," + lotField.lotTypeFieldId; %> +
+ +
+ <% if (!lotField.lotTypeFieldValues || lotField.lotTypeFieldValues === "") { %> + + pattern="<%= lotField.pattern %>" + <% } %> + minlength="<%= lotField.minimumLength %>" + maxlength="<%= lotField.maximumLength %>" + <%= lotField.isRequired ? " required" : "" %> /> + <% } else { %> + <% + const fieldValues = lotField.lotTypeFieldValues.split("\n"); + let valueFound = false; + %> +
+ +
+ <% } %> +
+
+ <% } %> + + <% } %> +
+
-
-

Geographic Location

-
-
- -
- -
-
-
- -
- -
-
-
-
+
+

Geographic Location

+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
-
-

Image

-
- -
-
-
- + class="is-readonly" + <% } %> + id="lot--mapId" name="mapId"> + + <% let mapIsFound = false; %> + <% for (const map of maps) { %> + <% + if (lot.mapId === map.mapId) { + mapIsFound = true; + } + %> + - <% let mapIsFound = false; %> - <% for (const map of maps) { %> - <% - if (lot.mapId === map.mapId) { - mapIsFound = true; - } - %> - - <% } %> - <% if (lot.mapId && !mapIsFound) { %> - - <% } %> - -
-
-
- + <% } %> + <% if (lot.mapId && !mapIsFound) { %> + + <% } %> +
- -
- -
- -
-

- - - What is the SVG ID? - -

+
+
+ +
+ +
+ +
+

+ + + What is the SVG ID? + +

+
+
@@ -349,23 +355,23 @@ <% } else { %>
-
-
-
-

- Comments -

-
-
-
-
- -
-
-
+
+
+
+

+ Comments +

+
+
+
+
+ +
+
+
diff --git a/views/lotOccupancy-edit.ejs b/views/lotOccupancy-edit.ejs index df789b5c..4c56ad2b 100644 --- a/views/lotOccupancy-edit.ejs +++ b/views/lotOccupancy-edit.ejs @@ -88,7 +88,13 @@
<% } %> <% } %> - <% if (!isCreate) { %> + <% if (isCreate) { %> + + <% } else { %>