From 49618effe081ebf5e72a5945fa1822c471369cf0 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 3 Apr 2017 09:21:20 +0200 Subject: fix: error message display in production only use the
 tag if the response was a text message i.e. during dev errors.
Use the alert-danger class of bootstrap 3 rather than alert-error.
---
 app/assets/javascripts/leap.js  | 2 +-
 app/assets/javascripts/users.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'app/assets')

diff --git a/app/assets/javascripts/leap.js b/app/assets/javascripts/leap.js
index c12a2d6..5084efa 100644
--- a/app/assets/javascripts/leap.js
+++ b/app/assets/javascripts/leap.js
@@ -3,7 +3,7 @@
 // add a bootstrap alert to the page via javascript.
 //
 function alert_message(msg) {
-  $('#messages').append('
×
'+msg+'
'); + $('#messages').append('
×'+msg+'
'); } ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"]; diff --git a/app/assets/javascripts/users.js b/app/assets/javascripts/users.js index 9a10532..d080b49 100644 --- a/app/assets/javascripts/users.js +++ b/app/assets/javascripts/users.js @@ -139,7 +139,7 @@ return message.errors || { base: message.error }; } else { return { - base: message + base: '
' + message + '
' }; } } -- cgit v1.2.3