From 0c6f43f36ee4a98c0053336c4a01a24db489703e Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 4 Nov 2021 15:43:05 +0100 Subject: [PATCH] =?UTF-8?q?Check=20Alias=20auf=20Sonderzeichen=20bei=20?= =?UTF-8?q?=C3=84nderung=20Alias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/functions.js.php | 14 ++++++++++++++ .../mitarbeiter/mitarbeiterdetailoverlay.xul.php | 2 +- content/mitarbeiter/mitarbeiteroverlay.js.php | 13 ++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/content/functions.js.php b/content/functions.js.php index 55eed5414..f81fd26ec 100644 --- a/content/functions.js.php +++ b/content/functions.js.php @@ -419,3 +419,17 @@ function setVariable(variable, wert) return true; } } + +// **** +// * Validierung Alias auf Sonderzeichen (analog zu checkWunschUid, außerdem . und _ erlaubt) +// **** +function checkAlias(alias) +{ + + if (/^[a-z0-9 . _]*$/i.test(alias) === false) + { + return false; + } + else + return true; +} diff --git a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php index 1cc8fb34e..c99a35c27 100644 --- a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php +++ b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php @@ -269,7 +269,7 @@ echo '';