
| Current Path : /var/www/html/wirtschaftsclub.web-klick.de/themes/bootstrap/js/misc/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/wirtschaftsclub.web-klick.de/themes/bootstrap/js/misc/form.js |
/**
* @file
* Extends methods from core/misc/form.js.
*/
(function ($, window, Drupal, drupalSettings) {
/**
* Behavior for "forms_has_error_value_toggle" theme setting.
*/
Drupal.behaviors.bootstrapForm = {
attach: function (context) {
if (drupalSettings.bootstrap && drupalSettings.bootstrap.forms_has_error_value_toggle) {
var $context = $(context);
$context.find('.form-item.has-error:not(.form-type-password.has-feedback)').once('error').each(function () {
var $formItem = $(this);
var $input = $formItem.find(':input');
$input.on('keyup focus blur', function () {
if (this.defaultValue !== void 0) {
$formItem[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('has-error');
$input[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('error');
}
});
});
}
}
};
})(jQuery, this, Drupal, drupalSettings);