admin: put Cancel before Save in the editors
The editors led with Save while every dialog ended there;
now Cancel comes first on both pages, the order they all share.
Assisted-by: Claude Opus 5 via Claude Code
diff --git a/lib/pro_tacts/admin/contacts_edit.rb b/lib/pro_tacts/admin/contacts_edit.rb
index c32d1e3..e68a2a3 100644
--- a/lib/pro_tacts/admin/contacts_edit.rb
+++ b/lib/pro_tacts/admin/contacts_edit.rb
@@ -202,8 +202,8 @@ module ProTacts
# link in Gloss's `.btn` contract, which is what an
# anchor that acts like a button opts into.
div(class: "form-actions") do
- button(type: "submit", data: {variant: "primary"}) { "Save" }
a(href: "/contacts/#{@contact.id}", class: "btn") { "Cancel" }
+ button(type: "submit", data: {variant: "primary"}) { "Save" }
end
end
end
diff --git a/lib/pro_tacts/admin/groups_edit.rb b/lib/pro_tacts/admin/groups_edit.rb
index 070fec1..2840679 100644
--- a/lib/pro_tacts/admin/groups_edit.rb
+++ b/lib/pro_tacts/admin/groups_edit.rb
@@ -69,8 +69,8 @@ module ProTacts
placeholder: note ? "removed on save" : nil) { note.to_s }
end
div(class: "form-actions") do
- button(type: "submit", data: {variant: "primary"}) { "Save" }
a(href: "/groups/#{@group.id}", class: "btn") { "Cancel" }
+ button(type: "submit", data: {variant: "primary"}) { "Save" }
end
end
end
diff --git a/public/admin.css b/public/admin.css
index 99bd535..f1d5bfb 100644
--- a/public/admin.css
+++ b/public/admin.css
@@ -282,7 +282,9 @@
/* The editor's submit row: the buttons sit beside each other under
the fields, rather than in the stack's own gap, and start at the
- value column so the form keeps one edge down its whole height. */
+ value column so the form keeps one edge down its whole height.
+ Cancel comes first and the primary action last, the order every
+ dialog's footer uses. */
.form-actions {
display: flex;
gap: var(--gl-space-2xs);