From fb05d892a2cc95e3a1162174353d37f2468dfe8c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 7 Oct 2021 16:09:17 +0200 Subject: [PATCH] reorganization of files --- .../public/module/disable-buttons/index.js | 13 +++++++++++++ src/Bundle/ChillMainBundle/chill.webpack.config.js | 1 + .../Resources/views/Person/create.html.twig | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js new file mode 100644 index 000000000..2bbc33497 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/module/disable-buttons/index.js @@ -0,0 +1,13 @@ +/** + * Submit buttons are disabled as soon as submit button is clicked and form is submitted. + */ + +var submitButtons = document.querySelectorAll("[type=submit]"); +var form = document.getElementById('create-form'); + + for(var i=0; i {% endif %} - {{ form_start(form) }} + {{ form_start(form, {'attr' : {'id' : 'create-form'}}) }} {{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}