From 7fcac581aea4b2a178d248b19bd45631bf8a632c Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Feb 2018 15:06:14 -0800 Subject: [PATCH] fix regex for archive name, add general error message --- domain-server/resources/web/content/js/content.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/domain-server/resources/web/content/js/content.js b/domain-server/resources/web/content/js/content.js index 904f36edc7..f5525e9892 100644 --- a/domain-server/resources/web/content/js/content.js +++ b/domain-server/resources/web/content/js/content.js @@ -391,7 +391,7 @@ $(document).ready(function(){ 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)) { swal.showInputError("Valid characters include A-z, 0-9, ' ', '_', and '-'."); return false; @@ -407,12 +407,14 @@ $(document).ready(function(){ }).done(function(data) { // since we successfully setup a new content archive, reload the table of archives // which should show that this archive is pending creation + swal.close(); reloadBackupInformation(); }).fail(function(jqXHR, textStatus, errorThrown) { - + showErrorMessage( + "Error", + "There was an unexpected error creating the manual content archive" + ) }); - - swal.close(); }); });