backoffice: open delete category confirmation in a popup (#57993)

This commit is contained in:
Frédéric Péters 2021-10-19 20:39:05 +02:00
parent aa6e53a12f
commit 16fa5cf0e3
2 changed files with 2 additions and 0 deletions

View File

@ -145,6 +145,7 @@ def test_categories_delete(pub):
FormDef.wipe()
app = login(get_app(pub))
resp = app.get('/backoffice/forms/categories/1/')
assert 'popup.js' in resp.text
resp = resp.click(href='delete')
resp = resp.forms[0].submit('cancel')

View File

@ -172,6 +172,7 @@ class CategoryPage(Directory):
def _q_index(self):
html_top('categories', title=self.category.name)
get_response().add_javascript(['popup.js'])
return template.QommonTemplateResponse(
templates=['wcs/backoffice/category.html'],
context={'view': self, 'category': self.category},