Apply password policy on sign up screen

This commit is contained in:
2021-02-17 18:07:55 +01:00
parent 19cfb4760f
commit 0a6dd75a05
11 changed files with 265 additions and 20 deletions

View File

@ -3,7 +3,7 @@
*
* @author Pierre HUBERT
*/
ComunicWeb.common.formChecker = {
const FormChecker = {
/**
* Check an input
@ -73,4 +73,7 @@ ComunicWeb.common.formChecker = {
return inputOK;
}
};
};
ComunicWeb.common.formChecker = FormChecker;

View File

@ -328,7 +328,15 @@ async function showInputTextDialog(title, message, defaultValue = "") {
* Prepare for potential future translation system
*
* @param {String} input Input string
* @param {Object} arguments Arguments to apply to the string
*/
function tr(input) {
function tr(input, values) {
// Apply arguments
for (const key in values) {
if (Object.hasOwnProperty.call(values, key))
input = input.replace("%"+key+"%", values[key]);
}
return input;
}