You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pd-forms

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pd-forms - npm Package Compare versions

Comparing version

to
4.2.1

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Customization of netteForms for use in PeckaDesign.",
"version": "4.2.0",
"version": "4.2.1",
"author": "PeckaDesign, s.r.o <support@peckadesign.cz>",

@@ -8,0 +8,0 @@ "contributors": [

/**
* @name pdForms
* @author Radek Šerý <radek.sery@peckadesign.cz>
* @version 4.2.0
* @version 4.2.1
*

@@ -48,3 +48,3 @@ * Features:

pdForms.version = '4.2.0';
pdForms.version = '4.2.1';

@@ -58,3 +58,4 @@

toggleControl: Nette.toggleControl,
initForm: Nette.initForm
initForm: Nette.initForm,
validateForm: Nette.validateForm
};

@@ -624,2 +625,22 @@

pdForms.removeFormMessages = function(form) {
var radios = {};
for (var i = 0; i < form.elements.length; i++) {
var elem = form.elements[i];
if (elem.tagName && !(elem.tagName.toLowerCase() in {input: 1, select: 1, textarea: 1, button: 1})) {
continue;
} else if (elem.type === 'radio') {
if (radios[elem.name]) {
continue;
}
radios[elem.name] = true;
}
pdForms.removeMessages(elem, false);
}
}
/**

@@ -632,7 +653,2 @@ * Optional rules are defined using "optional" property in "arg". We have to convert arg into Nette format before

// assumes the input is valid, therefore removing all messages except those associated with ajax rules; this
// prevents flashing of message, when ajax rule is evaluated - ajax rules removes their messages when the ajax
// rule is evaluated
pdForms.removeMessages(elem, false);
if (! rules) {

@@ -665,2 +681,12 @@ rules = JSON.parse(elem.getAttribute('data-nette-rules') || '[]');

Nette.validateForm = function(sender, onlyCheck) {
// Assumes the form is valid, therefore removing all messages except those associated with ajax rules. This
// prevents flashing of messages when the ajax rule is evaluated - ajax rules removes their messages when the
// ajax rule is evaluated.
pdForms.removeFormMessages(sender.form || sender);
return pdForms.Nette.validateForm(sender, onlyCheck);
}
/**

@@ -667,0 +693,0 @@ * As a side effect of live validation, errors are shown directly in validateControl. This method is used only for