Fix edit
This commit is contained in:
parent
ab6a862aee
commit
e223366183
|
@ -1,6 +1,6 @@
|
||||||
<%
|
<%
|
||||||
// Assume aclEntry is passed to this view with all fields
|
// Assume aclEntry is passed to this view with all fields
|
||||||
// doorsList is an array of door names, e.g. ['Door1', 'Door2', ...]
|
// doorsList is an object of door names to grant access, e.g. { "Door1": 1, "Door2": 0, ... }
|
||||||
%>
|
%>
|
||||||
<form id="acl-edit-form" method="post" action="/acl/<%= aclEntry.CardNumber %>?_method=PATCH">
|
<form id="acl-edit-form" method="post" action="/acl/<%= aclEntry.CardNumber %>?_method=PATCH">
|
||||||
<div>
|
<div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Doors</legend>
|
<legend>Doors</legend>
|
||||||
<% doorsList.forEach(function(door) { %>
|
<% Object.keys(doorsList).forEach(function(door) { %>
|
||||||
<div>
|
<div>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="doors[<%= door %>]" value="1"
|
<input type="checkbox" name="doors[<%= door %>]" value="1"
|
||||||
|
|
Loading…
Reference in a new issue