Skip to content

Commit

Permalink
[bug] [33443] Not possible to add/edit a Menu in 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar authored and Bakual committed May 12, 2014
1 parent c389f35 commit 5080d10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions media/system/js/validate-uncompressed.js
Expand Up @@ -24,7 +24,7 @@ var JFormValidator = function() {
},

findLabel = function(id, form){
var $label, $form = $(form);
var $label, $form = jQuery(form);
if (!id) {
return false;
}
Expand Down Expand Up @@ -56,7 +56,7 @@ var JFormValidator = function() {
},

validate = function(el) {
var $el = $(el), tagName, handler;
var $el = jQuery(el), tagName, handler;
// Ignore the element if its currently disabled, because are not submitted for the http-request. For those case return always true.
if ($el.attr('disabled')) {
handleResponse(true, $el);
Expand Down Expand Up @@ -98,24 +98,24 @@ var JFormValidator = function() {
isValid = function(form) {
var valid = true, i, message, errors, error, label;
// Validate form fields
$.each($(form).data('inputfields'), function(index, el) {
jQuery.each(jQuery(form).find('input, textarea, select, fieldset, button'), function(index, el) {
if (validate(el) === false) {
valid = false;
}
});
// Run custom form validators if present
$.each(custom, function(key, validator) {
jQuery.each(custom, function(key, validator) {
if (validator.exec() !== true) {
valid = false;
}
});
if (!valid) {
message = Joomla.JText._('JLIB_FORM_FIELD_INVALID');
errors = $("label.invalid");
errors = jQuery("input.invalid, textarea.invalid, select.invalid, fieldset.invalid, button.invalid");
error = {};
error.error = [];
for ( i = 0; i < errors.length; i++) {
label = $(errors[i]).text();
label = jQuery('label[for=' + errors[i].id + ']').text();
if (label !== 'undefined') {
error.error[i] = message + label.replace("*", "");
}
Expand All @@ -128,7 +128,7 @@ var JFormValidator = function() {
attachToForm = function(form) {
var inputFields = [];
// Iterate through the form object and attach the validate method to all input fields.
$(form).find('input, textarea, select, fieldset, button').each(function() {
jQuery(form).find('input, textarea, select, fieldset, button').each(function() {
var $el = $(this), id = $el.attr('id'), tagName = $el.prop("tagName").toLowerCase();
if ($el.hasClass('required')) {
$el.attr('aria-required', 'true').attr('required', 'required');
Expand Down Expand Up @@ -183,7 +183,7 @@ var JFormValidator = function() {
return regex.test(value);
});
// Attach to forms with class 'form-validate'
$('form.form-validate').each(function() {
jQuery('form.form-validate').each(function() {
attachToForm(this);
}, this);
};
Expand Down
2 changes: 1 addition & 1 deletion media/system/js/validate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5080d10

Please sign in to comment.