Skip to content

Commit

Permalink
Merge pull request #56 from peckadesign/skip-initialized
Browse files Browse the repository at this point in the history
Oprava opakované inicializace formuláře
  • Loading branch information
zipper authored May 13, 2024
2 parents 19b05b4 + 0bec17e commit 3d675c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pd-forms",
"title": "pdForms",
"description": "Customization of netteForms for use in PeckaDesign.",
"version": "4.1.0",
"version": "4.1.1",
"author": "PeckaDesign, s.r.o <support@peckadesign.cz>",
"contributors": [
"Radek Šerý <radek.sery@peckadesign.cz>",
Expand Down
9 changes: 7 additions & 2 deletions src/assets/pdForms.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @name pdForms
* @author Radek Šerý <radek.sery@peckadesign.cz>
* @version 4.1.0
* @version 4.1.1
*
* Features:
* - live validation
Expand Down Expand Up @@ -45,7 +45,7 @@

var pdForms = window.pdForms || {};

pdForms.version = '4.0.1';
pdForms.version = '4.1.1';


/**
Expand Down Expand Up @@ -712,6 +712,11 @@
* Setup handlers.
*/
Nette.initForm = function (form) {
// Skip already initialized forms
if (form.noValidate) {
return;
}

pdForms.Nette.initForm(form);

addDelegatedEventListener(form, 'focusout change', 'select, textarea, input:not([type="submit"]):not([type="reset"])', setEverFocused);
Expand Down

0 comments on commit 3d675c4

Please sign in to comment.