diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-07-31 10:05:46 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-07-31 10:20:57 +0200 |
commit | 47a0254bb372cf68626302175d2e5f9d0c10e73b (patch) | |
tree | 4e7c87c80007e7a9ed863b7d18866fb2b283c061 /apps/theming/js | |
parent | 3f8f0f76091bf0f0fae7e602f14a3a5f225f111b (diff) | |
download | nextcloud-server-47a0254bb372cf68626302175d2e5f9d0c10e73b.tar.gz nextcloud-server-47a0254bb372cf68626302175d2e5f9d0c10e73b.zip |
Validate urls in theming settings and properly handle error messages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/js')
-rw-r--r-- | apps/theming/js/settings-admin.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index af9c584265c..81b10bcc08e 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -32,7 +32,7 @@ function setThemingValue(setting, value) { hideUndoButton(setting, value); preview(setting, value, response.data.serverCssUrl); }).fail(function(response) { - OC.msg.finishedSaving('#theming_settings_msg', response); + OC.msg.finishedSaving('#theming_settings_msg', response.responseJSON); $('#theming_settings_loading').hide(); }); } @@ -159,7 +159,7 @@ $(document).ready(function () { return true; } else { throw t('theming', 'Name cannot be empty'); - } + } } catch (error) { $('#theming-name').attr('title', error); $('#theming-name').tooltip({placement: 'top', trigger: 'manual'}); @@ -174,7 +174,7 @@ $(document).ready(function () { if (checkName()) { $('#theming-name').tooltip('hide'); $('#theming-name').removeClass('error'); - } + } }); $('#theming-name').change(function(e) { |