reorganization of files

This commit is contained in:
Julie Lenaerts 2021-10-07 16:09:17 +02:00
parent ddbd6a9f23
commit fb05d892a2
3 changed files with 15 additions and 1 deletions

View File

@ -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<submitButtons.length; i++){
submitButtons[i].addEventListener("click", function(e){
form.submit();
e.target.disabled = true;
});
}

View File

@ -58,6 +58,7 @@ module.exports = function(encore, entries)
encore.addEntry('mod_forkawesome', __dirname + '/Resources/public/module/forkawesome/index.js');
encore.addEntry('mod_bootstrap', __dirname + '/Resources/public/module/bootstrap/index.js');
encore.addEntry('mod_ckeditor5', __dirname + '/Resources/public/module/ckeditor5/index.js');
encore.addEntry('mod_disablebuttons', __dirname + '/Resources/public/module/disable-buttons/index.js');
// Vue entrypoints
encore.addEntry('vue_address', __dirname + '/Resources/public/vuejs/Address/index.js');

View File

@ -61,7 +61,7 @@
</table>
{% endif %}
{{ form_start(form) }}
{{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}