first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/**
* Used on the language settings page, validates the text content of one row
* of the language domains settings form and potentially sanitizes the contents
* of the row's text field.
* Un-checks the text fields validation checkbox in case the field contains an
* empty string after sanitization.
*
* @param domainInput Object
* @param domainCheckBox Object
* @returns {{run: run}}
* @constructor
*/
var WpmlDomainValidation = function (domainInput, domainCheckBox) {
return {
run: function () {
var textInput = domainInput.val().match(/^(?:.+\/\/)?([\w\.\-\:]*)/)[1];
if (!textInput) {
domainCheckBox.prop('checked', false)
}
domainInput.val(textInput ? textInput : '');
}
}
};