Display: Fix js errors in forms

pull/6066/head
Angel Fernando Quiroz Campos 9 months ago
parent 47c7b2f4ee
commit 6d8f30289b
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 1
      public/main/admin/user_edit.php
  2. 4
      public/main/inc/lib/formvalidator/Element/DateTimePicker.php
  3. 2
      public/main/inc/lib/formvalidator/FormValidator.class.php
  4. 4
      public/main/search/search.php

@ -230,6 +230,7 @@ $group[] = $form->createElement(
'password',
null,
[
'id' => 'password',
'onkeydown' => 'javascript: password_switch_radio_button();',
'show_hide' => true,
]

@ -19,7 +19,7 @@ class DateTimePicker extends HTML_QuickForm_text
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['class'] = 'p-component p-inputtext';
$attributes['class'] = 'p-component p-inputtext p-filled';
parent::__construct($elementName, $elementLabel, $attributes);
$this->_appendName = true;
}
@ -98,7 +98,7 @@ class DateTimePicker extends HTML_QuickForm_text
}
});
document.querySelector('label[for=\"' + '{$id}' + '\"]').classList.add('datepicker-label');
document.querySelector('label[for=\"' + '{$id}' + '\"]')?.classList.add('datepicker-label');
}
function loadLocaleAndInitialize() {

@ -1748,7 +1748,7 @@ EOT;
$(function() {
var defaultValue = '$defaultId';
$('#$typeNoDots').val(defaultValue);
$('#$typeNoDots').selectpicker('render');
//$('#$typeNoDots').selectpicker('render');
if (defaultValue != '') {
var selected = $('#$typeNoDots option:selected').val();
$.ajax({

@ -12,7 +12,7 @@ require_once __DIR__.'/../inc/global.inc.php';
api_block_anonymous_users();
if ('false' === api_get_setting('session.allow_search_diagnostic')) {
if ('false' !== api_get_setting('session.allow_search_diagnostic')) {
api_not_allowed();
}
@ -89,7 +89,7 @@ $htmlHeadXtra[] = '
const diapoButton = document.querySelector("#card_"+targetBlockWithoutHash+" a");
setTimeout(function() {
diapoButton.click();
diapoButton?.click();
}, 500);
});
</script>

Loading…
Cancel
Save