Added optional "download_target" attribute to handle forms which should target a file download URL
authorThierry Florac <thierry.florac@onf.fr>
Wed, 15 Apr 2015 15:02:43 +0200
changeset 12 4ccb93fcde8e
parent 11 ffebc76eaaa3
child 13 2418b64d1433
Added optional "download_target" attribute to handle forms which should target a file download URL
src/pyams_form/templates/form.pt
src/pyams_form/templates/inner-form.pt
src/pyams_form/templates/widget-form.pt
--- a/src/pyams_form/templates/form.pt	Wed Apr 15 15:01:43 2015 +0200
+++ b/src/pyams_form/templates/form.pt	Wed Apr 15 15:02:43 2015 +0200
@@ -31,6 +31,7 @@
 							  data-ams-form-handler view.get_ajax_handler() | nothing;
 							  data-ams-form-options view.get_form_options() | nothing;
 							  data-ams-form-submit-target view.form_target | nothing;
+							  data-ams-form-download-target view.download_target | nothing;
 							  data-ams-warn-on-change view.warn_on_change;">
 			<div class="modal-viewport">
 				<fieldset>
--- a/src/pyams_form/templates/inner-form.pt	Wed Apr 15 15:01:43 2015 +0200
+++ b/src/pyams_form/templates/inner-form.pt	Wed Apr 15 15:02:43 2015 +0200
@@ -18,6 +18,7 @@
 						  data-ams-form-handler view.get_ajax_handler() | nothing;
 						  data-ams-form-options view.get_form_options() | nothing;
 						  data-ams-form-submit-target view.form_target | nothing;
+						  data-ams-form-download-target view.download_target | nothing;
 						  data-ams-warn-on-change view.warn_on_change;">
 		<fieldset tal:define="legend view.legend"
 				  tal:omit-tag="not:legend">
--- a/src/pyams_form/templates/widget-form.pt	Wed Apr 15 15:01:43 2015 +0200
+++ b/src/pyams_form/templates/widget-form.pt	Wed Apr 15 15:02:43 2015 +0200
@@ -25,6 +25,7 @@
 							  data-ams-form-handler view.get_ajax_handler() | nothing;
 							  data-ams-form-options view.get_form_options() | nothing;
 							  data-ams-form-submit-target view.form_target | nothing;
+							  data-ams-form-download-target view.download_target | nothing;
 							  data-ams-warn-on-change view.warn_on_change;">
 			<div class="modal-viewport">
 				<fieldset>