backoffice: use "discard" when talking about removing a draft (#69442)
This commit is contained in:
parent
24eec03694
commit
954f5fc648
|
@ -356,8 +356,8 @@ def test_backoffice_submission_with_return_url(pub):
|
|||
resp = resp.follow().follow()
|
||||
resp.form['f1'] = 'test submission'
|
||||
resp = resp.form.submit('submit') # -> to validation
|
||||
resp = resp.click('Delete this form')
|
||||
resp = resp.form.submit('delete')
|
||||
resp = resp.click('Discard this form')
|
||||
resp = resp.form.submit('discard')
|
||||
assert resp.location == 'https://example.org'
|
||||
|
||||
|
||||
|
@ -698,7 +698,7 @@ def test_backoffice_submission_remove_drafts(pub):
|
|||
resp = resp.follow()
|
||||
|
||||
# and try to delete the form (but cancel)
|
||||
resp = resp.click('Delete this form')
|
||||
resp = resp.click('Discard this form')
|
||||
resp = resp.form.submit('cancel')
|
||||
assert resp.location == 'http://example.net/backoffice/submission/'
|
||||
assert data_class.count() == 1
|
||||
|
@ -708,8 +708,8 @@ def test_backoffice_submission_remove_drafts(pub):
|
|||
resp = app.get('/backoffice/submission/')
|
||||
resp = resp.click('#%s' % formdata_no)
|
||||
resp = resp.follow()
|
||||
resp = resp.click('Delete this form')
|
||||
resp = resp.form.submit('delete')
|
||||
resp = resp.click('Discard this form')
|
||||
resp = resp.form.submit('discard')
|
||||
assert resp.location == 'http://example.net/backoffice/submission/'
|
||||
assert data_class.count() == 0
|
||||
assert pub.tracking_code_class().count() == 0
|
||||
|
|
|
@ -53,17 +53,17 @@ class RemoveDraftDirectory(Directory):
|
|||
if self.parent_directory.edit_mode:
|
||||
raise errors.AccessForbiddenError()
|
||||
|
||||
self.parent_directory.html_top(title=_('Remove'))
|
||||
self.parent_directory.html_top(title=_('Discard'))
|
||||
|
||||
form = Form(enctype='multipart/form-data')
|
||||
form.widgets.append(HtmlWidget('<p>%s</p>' % _('You are about to irrevocably delete this form.')))
|
||||
form.add_submit('delete', _('Delete'))
|
||||
form.widgets.append(HtmlWidget('<p>%s</p>' % _('You are about to discard this form.')))
|
||||
form.add_submit('delete', _('Discard'))
|
||||
form.add_submit('cancel', _('Cancel'))
|
||||
if form.get_widget('cancel').parse():
|
||||
return redirect('../..')
|
||||
if not form.is_submitted() or form.has_errors():
|
||||
r = TemplateIO(html=True)
|
||||
r += htmltext('<h2>%s</h2>') % (_('Deleting Form'))
|
||||
r += htmltext('<h2>%s</h2>') % (_('Discarding Form'))
|
||||
r += form.render()
|
||||
return r.getvalue()
|
||||
|
||||
|
@ -335,7 +335,7 @@ class FormFillPage(PublicFormFillPage):
|
|||
if draft_formdata_id:
|
||||
r += htmltext('<a rel="popup" href="remove/%s">%s</a>') % (
|
||||
draft_formdata_id,
|
||||
_('Delete this form'),
|
||||
_('Discard this form'),
|
||||
)
|
||||
r += htmltext('</div>')
|
||||
r += htmltext('<div id="side">')
|
||||
|
|
Loading…
Reference in New Issue