workflows: add an id to the action form (#13990)

This commit is contained in:
Frédéric Péters 2016-11-16 13:26:28 +01:00
parent 5a6ce97a5e
commit 2d3631f755
2 changed files with 4 additions and 3 deletions

View File

@ -2636,7 +2636,7 @@ def test_backoffice_advisory_lock(pub):
resp = app.get('/backoffice/management/form-title/' + first_link)
assert not 'Be warned forms of this user are also being looked' in resp.body
assert 'button_commentable' in resp.body
assert len(resp.forms) == 1
assert len(resp.forms)
resp = app2.get('/backoffice/management/form-title/' + first_link)
assert 'Be warned forms of this user are also being looked' in resp.body
assert not 'button_commentable' in resp.body
@ -2654,7 +2654,7 @@ def test_backoffice_advisory_lock(pub):
assert 'Be warned forms of this user are also being looked' in resp.body
assert 'button_commentable' in resp.body
assert not '(unlock actions)' in resp.body
assert len(resp.forms) == 1
assert len(resp.forms)
# submit action form
resp.form['comment'] = 'HELLO'

View File

@ -1300,7 +1300,8 @@ class WorkflowStatus(object):
raise KeyError()
def get_action_form(self, filled, user):
form = Form(enctype='multipart/form-data', use_tokens = False)
form = Form(enctype='multipart/form-data', use_tokens=False)
form.attrs['id'] = 'wf-actions'
for item in self.items:
if not item.check_auth(filled, user):
continue