backoffice: always display submission sidebar if associated user is set (#45712)
This commit is contained in:
parent
05931348df
commit
38ad83615d
|
@ -3364,6 +3364,10 @@ def test_backoffice_submission_with_nameid_and_channel(pub, local_user):
|
|||
resp = resp.follow() # redirect to created draft
|
||||
resp = resp.follow() # redirect to ?mt=
|
||||
|
||||
# check user is mentioned in sidebar
|
||||
assert '<h3>Associated User</h3>' in resp
|
||||
assert '<p>%s</p>' % local_user.get_display_name() in resp
|
||||
|
||||
assert resp.form['f1'].value == local_user.email # prefill with form_user_email
|
||||
resp.form['f2'] = 'baz'
|
||||
resp.form['f3'] = 'C'
|
||||
|
|
|
@ -168,7 +168,7 @@ class FormFillPage(PublicFormFillPage):
|
|||
r += htmltext('<p>-</p>')
|
||||
|
||||
welco_url = get_publisher().get_site_option('welco_url', 'options')
|
||||
if formdata and formdata.submission_context:
|
||||
if formdata and (formdata.submission_context or formdata.user_id):
|
||||
from .management import FormBackOfficeStatusPage
|
||||
r += FormBackOfficeStatusPage(self.formdef, formdata).get_extra_context_bar()
|
||||
elif not welco_url and not self.edit_mode:
|
||||
|
|
Loading…
Reference in New Issue