mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-05 22:26:12 +02:00
fix regex for archive name, add general error message
This commit is contained in:
parent
13b15ced89
commit
7fcac581ae
1 changed files with 6 additions and 4 deletions
|
@ -391,7 +391,7 @@ $(document).ready(function(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var MANUAL_ARCHIVE_NAME_REGEX = /^[a-zA-Z0-9\\-_ ]+$/;
|
var MANUAL_ARCHIVE_NAME_REGEX = /^[a-zA-Z0-9\-_ ]+$/;
|
||||||
if (!MANUAL_ARCHIVE_NAME_REGEX.test(inputValue)) {
|
if (!MANUAL_ARCHIVE_NAME_REGEX.test(inputValue)) {
|
||||||
swal.showInputError("Valid characters include A-z, 0-9, ' ', '_', and '-'.");
|
swal.showInputError("Valid characters include A-z, 0-9, ' ', '_', and '-'.");
|
||||||
return false;
|
return false;
|
||||||
|
@ -407,12 +407,14 @@ $(document).ready(function(){
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
// since we successfully setup a new content archive, reload the table of archives
|
// since we successfully setup a new content archive, reload the table of archives
|
||||||
// which should show that this archive is pending creation
|
// which should show that this archive is pending creation
|
||||||
|
swal.close();
|
||||||
reloadBackupInformation();
|
reloadBackupInformation();
|
||||||
}).fail(function(jqXHR, textStatus, errorThrown) {
|
}).fail(function(jqXHR, textStatus, errorThrown) {
|
||||||
|
showErrorMessage(
|
||||||
|
"Error",
|
||||||
|
"There was an unexpected error creating the manual content archive"
|
||||||
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
swal.close();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue