mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
feat(templates): the shared form and delete pages in a centred column
The pages many views share were a horizontal form whose Cancel went back in a primary colour beside a green Save, and a delete question in a yellow alert squeezed into half the width, which wrapped word by word on a phone. Both now sit in a centred column with their heading: the form's fields with their labels above in a card, Cancel outlined and Save the primary action; the delete page asks "Delete <name>?" in a card with a red edge, says what deleting does, and offers Cancel and Delete. The form for a user's rights on a VM names them as the VM's Users tab does: Change settings, Delete the VM, and Change console settings, which only counts together with Change settings.
This commit is contained in:
parent
9790da9931
commit
488a77b3c7
5 changed files with 49 additions and 33 deletions
|
|
@ -32,6 +32,10 @@ class UserInstanceForm(ModelForm):
|
|||
class Meta:
|
||||
model = UserInstance
|
||||
fields = "__all__"
|
||||
# the rights beyond power and console, as the VM's Users tab names them
|
||||
labels = {"is_change": _("Change settings"), "is_delete": _("Delete the VM"),
|
||||
"is_vnc": _("Change console settings")}
|
||||
help_texts = {"is_vnc": _("Only together with Change settings")}
|
||||
|
||||
|
||||
class UniqueEmailMixin:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue