Implemented functional method to add a new system to a new through web app
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="updateSystemModal_<%=system.replaceAll(" ", "_")%>">Update <%=system%></h1>
|
||||
<h1 class="modal-title fs-5" id="updateSystemModal_<%=system.replaceAll(" ", "_")%>"><%if (!system == "New System") {%>Update<%} else {%>Add a<%}%> <%=system%></h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -12,7 +12,7 @@
|
||||
<form>
|
||||
<div class="row gx-3 mb-3">
|
||||
<label class="small mb-1 fs-6" for="systemName">System Name</label>
|
||||
<input class="form-control" id="systemName" type="text" value="<%= system %>"></input>
|
||||
<input class="form-control" id="systemName" type="text" value="<%if (!system == "New System") {%><%= system %><%} else {%>Local Radio System<%}%>"></input>
|
||||
</div>
|
||||
<div class="row gx-3 mb-3" id="frequencyRow_<%=system.replaceAll(" ", "_")%>">
|
||||
<label class="small mb-1 fs-6" for="systemFreq">Frequencies</label>
|
||||
@@ -36,12 +36,15 @@
|
||||
<label class="small mb-1 fs-6" for="<%=system%>_systemMode">Mode</label>
|
||||
<br>
|
||||
<select class="custom-select" id="<%=system%>_systemMode">
|
||||
<option value="<%= node.nearbySystems[system].mode %>" selected><span class="text-uppercase"><%= node.nearbySystems[system].mode %></span></option>
|
||||
<% if(node.nearbySystems[system].mode == "p25") { %>
|
||||
<option value="<%= mode ?? 'select' %>" selected><span class="text-uppercase"><%= mode ?? 'Select' %></span></option>
|
||||
<% if(mode == "p25") { %>
|
||||
<option value="nbfm">NBFM</option>
|
||||
<% } else if (node.nearbySystems[system].mode == "nbfm") { %>
|
||||
<% } else if (mode == "nbfm") { %>
|
||||
<option value="p25">P25</option>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<option value="nbfm">NBFM</option>
|
||||
<option value="p25">P25</option>
|
||||
<%}%>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,7 +54,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick="location.reload()">Close</button>
|
||||
<button type="button" class="btn btn-primary" onclick="updateSystem('<%=system%>')">Save changes</button>
|
||||
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" <%if(!system == "New System") {%>onclick="updateSystem('<%=system%>')"<%} else {%>onclick="addNewSystem('<%=system%>')"<%}%>>Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user