0001-backoffice-apply-form-js-to-quick-form-preview-53628.patch
wcs/admin/forms.py | ||
---|---|---|
1138 | 1138 | |
1139 | 1139 |
def get_preview(self): |
1140 | 1140 |
form = Form(action='#', use_tokens=False) |
1141 |
form.attrs['data-backoffice-preview'] = 'on' |
|
1141 | 1142 |
on_page = 0 |
1142 | 1143 |
for i, field in enumerate(self.formdef.fields): |
1143 | 1144 |
field.id = i |
wcs/qommon/static/js/qommon.forms.js | ||
---|---|---|
335 | 335 | |
336 | 336 |
} |
337 | 337 | |
338 |
add_js_behaviours($('form[data-live-url]')); |
|
338 |
add_js_behaviours($('form[data-live-url], form[data-backoffice-preview]'));
|
|
339 | 339 | |
340 | 340 |
// Form with error |
341 | 341 |
const first_widget_with_error = document.querySelector('.widget-with-error'); |
342 |
- |