validation update

This commit is contained in:
Roland Gruber 2019-09-22 13:19:26 +02:00
parent 6298546620
commit 2bc62a34cf
4 changed files with 10 additions and 5 deletions

View File

@ -1367,7 +1367,7 @@ class accountContainer {
include '../../lib/adminHeader.inc';
echo '<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#inputForm").validationEngine();
jQuery("#inputForm").validationEngine({promptPosition: "topLeft", addFailureCssClassToField: "lam-input-error", autoHidePrompt: true, autoHideDelay: 5000});
});
</script>';
echo "<form id=\"inputForm\" enctype=\"multipart/form-data\" action=\"edit.php?editKey=" . htmlspecialchars($this->base) . "\" method=\"post\" onSubmit=\"saveScrollPosition('inputForm')\" autocomplete=\"off\">\n";

View File

@ -659,6 +659,11 @@ input.smallImageButton {
cursor:pointer;
}
.lam-input-error {
border: 1px solid red;
border-radius: 3px;
}
.size16 {
height: 16px !important;
width: 16px !important;

View File

@ -10,7 +10,7 @@ use \htmlSubTitle;
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2018 Roland Gruber
Copyright (C) 2003 - 2019 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -251,7 +251,7 @@ $_SESSION['profile_types'] = array_merge($_SESSION['profile_types'], parseHtml(n
?>
<script type="text/javascript">
jQuery("#profilepage").validationEngine();
jQuery("#profilepage").validationEngine({promptPosition: "topLeft", addFailureCssClassToField: "lam-input-error", autoHidePrompt: true, autoHideDelay: 5000});
</script>
</form>
</div>

View File

@ -21,7 +21,7 @@ use LAM\TYPES\TypeManager;
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2018 Roland Gruber
Copyright (C) 2018 - 2019 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -99,7 +99,7 @@ if (!empty($_GET['tab']) && ($_GET['tab'] === 'export')) {
jQuery("#tabs").tabs({
active: <?php echo $activeTab; ?>
});
jQuery(".inputForm").validationEngine();
jQuery(".inputForm").validationEngine({promptPosition: "topLeft", addFailureCssClassToField: "lam-input-error", autoHidePrompt: true, autoHideDelay: 5000});
});
</script>