Public Access
Fixed Pin
This commit is contained in:
1 parent
ef0686a63e
commit
06b4616356
5 files changed
+74
-4
No files matched your search
@@ -445,3 +445,9 @@ pre.raw {
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.pin-inline {
|
||||
font-family: ui-monospace, Menlo, Consolas, monospace;
|
||||
letter-spacing: 0.12em;
|
||||
color: var(--deep);
|
||||
}
|
||||
+10
-3
@@ -502,7 +502,13 @@ function openRecurringModal(person = null) {
|
||||
<select name="siteId">${siteOptions(person?.siteId)}</select></label>
|
||||
<label class="modal-field"><span>Usually visiting</span>
|
||||
<select name="defaultHostId">${hostOptions(person?.defaultHostId)}</select></label>
|
||||
${field('PIN (leave blank to generate one)', 'pin', '')}
|
||||
${
|
||||
editing
|
||||
? `<label class="modal-field"><span>PIN — currently <b class="pin-inline">${esc(person.pin || '????')}</b></span>
|
||||
<input name="pin" type="text" inputmode="numeric" maxlength="4" value=""
|
||||
placeholder="Type 4 digits to change it, or leave blank"></label>`
|
||||
: field('PIN (leave blank to generate one)', 'pin', '')
|
||||
}
|
||||
${field('Notes', 'notes', person?.notes)}
|
||||
<h4 class="modal-section">Photo on file</h4>
|
||||
${photoEditorMarkup(person)}
|
||||
@@ -519,8 +525,9 @@ function openRecurringModal(person = null) {
|
||||
? await api(`/frequent/${person.id}`, { method: 'PATCH', body: payload })
|
||||
: await api('/frequent', { method: 'POST', body: payload });
|
||||
loadRecurring();
|
||||
if (editing) toast('Saved.');
|
||||
else showPin(saved.pin, saved.id);
|
||||
if (!editing) showPin(saved.pin, saved.id);
|
||||
else if (saved.pinChanged) showPin(saved.pin, saved.id);
|
||||
else toast('Saved.');
|
||||
} catch (err) {
|
||||
toast(err.message, true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user