<%- include("partials/state-button", {
type: "submit",
states: [
{ id: "idle", text: "Save settings" },
{ id: "loading", text: "Saving", spinner: true },
{ id: "success", text: "Saved" }
]
}) %>
<%- include("partials/state-button", {
type: "submit",
classes: "subtle",
attrs: "formaction=\"/admin/check-update\" formmethod=\"post\"",
states: [
{ id: "idle", text: "Check for updates" },
{ id: "loading", text: "Checking", spinner: true },
{ id: "success", text: "Checked" }
]
}) %>
<%- include("partials/state-button", {
type: "submit",
classes: "subtle",
attrs: "formaction=\"/admin/update\" formmethod=\"post\" data-confirm-mode=\"modal\" data-confirm-title=\"Update from git\" data-confirm-text=\"Pull updates from the configured remote and branch, then restart Lumi if the update succeeds.\" data-confirm-label=\"Update from git\"",
states: [
{ id: "idle", text: "Update from git" },
{ id: "loading", text: "Updating", spinner: true },
{ id: "success", text: "Updated" }
]
}) %>
Git update checks use the configured remote and branch.
Advanced JSON
The builder writes JSON into hidden fields before save. Edit only if you need a field the builder does not expose.
<%- include("partials/state-button", {
type: "submit",
states: [
{ id: "idle", text: "Save settings" },
{ id: "loading", text: "Saving", spinner: true },
{ id: "success", text: "Saved" }
]
}) %>