diff options
author | Azul <azul@riseup.net> | 2017-04-03 09:21:20 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2017-04-03 09:21:20 +0200 |
commit | 49618effe081ebf5e72a5945fa1822c471369cf0 (patch) | |
tree | 3b6897989567212bd7f4abda2a8586bf8c80f789 /app/assets/javascripts/leap.js | |
parent | 5a8ad66825e236308195fd3737e98d52a3322d5b (diff) |
fix: error message display in production
only use the <pre> 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.
Diffstat (limited to 'app/assets/javascripts/leap.js')
-rw-r--r-- | app/assets/javascripts/leap.js | 2 |
1 files changed, 1 insertions, 1 deletions
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('<div class="alert alert-error"><a class="close" data-dismiss="alert">×</a><pre>'+msg+'</pre></div>'); + $('#messages').append('<div class="alert alert-danger"><a class="close" data-dismiss="alert">×</a>'+msg+'</div>'); } ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"]; |