mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +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
|
|
@ -34,7 +34,7 @@ class DeletePageTests(TestCase):
|
|||
self.client.force_login(admin)
|
||||
for url, consequence in pages.items():
|
||||
with self.subTest(url=url):
|
||||
alert = html.fromstring(self.client.get(url).content).xpath("//div[contains(@class, 'alert-warning')]")
|
||||
self.assertEqual(len(alert), 1)
|
||||
self.assertIn(consequence, alert[0].text_content())
|
||||
self.assertNotIn("Are you sure", alert[0].text_content())
|
||||
card = html.fromstring(self.client.get(url).content).xpath("//div[contains(@class, 'border-danger')]")
|
||||
self.assertEqual(len(card), 1)
|
||||
self.assertIn(consequence, card[0].text_content())
|
||||
self.assertNotIn("Are you sure", card[0].text_content())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue