fix
This commit is contained in:
parent
dc062767ac
commit
ba2a682bb8
|
|
@ -175,17 +175,7 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<%
|
||||
// Three UI states for the password field:
|
||||
// 1. New page or no password set → bare input, "leave blank for public"
|
||||
// 2. Existing page with password set → "Password is set" badge + Change/Remove buttons
|
||||
// 3. State (2), then user clicks Change → input revealed
|
||||
// The hidden `remove_password` flag is set by the Remove button so the
|
||||
// dashboard handler can forward an explicit `password: null` to the API.
|
||||
// Without that flag, an empty input means "leave the existing password
|
||||
// alone" (the form post handler drops empty strings on purpose).
|
||||
const hasPassword = !it.isNew && p.password_hash;
|
||||
%>
|
||||
<% const hasPassword = !it.isNew && p.password_hash; %>
|
||||
<div data-password-section>
|
||||
<label class="block text-sm text-gray-400 mb-1.5">Password <span class="text-gray-600">(optional)</span></label>
|
||||
<% if (hasPassword) { %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue