Commit d12f27caabef277049c530a0d5abad05d33e08d6
Exists in
master
and in
5 other branches
Merge branch 'master' of https://gitlab.com/participa/proposal-app
Showing
1 changed file
with
10 additions
and
7 deletions
Show diff stats
js/main.js
@@ -566,15 +566,16 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -566,15 +566,16 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
566 | if (o[key] instanceof Array) { | 566 | if (o[key] instanceof Array) { |
567 | fn = key; | 567 | fn = key; |
568 | for (var i = 0; i < o[key].length; i++) { | 568 | for (var i = 0; i < o[key].length; i++) { |
569 | - msg += fn + " " + o[key][i] + ", "; | 569 | + msg += fn + " " + o[key][i] + "</br>"; |
570 | } | 570 | } |
571 | } | 571 | } |
572 | } | 572 | } |
573 | - msg = msg.replace('password_confirmation', 'confirmação da senha'); | ||
574 | - msg = msg.replace('password', 'senha'); | ||
575 | - msg = msg.replace('login', 'nome de usuário'); | ||
576 | - msg = msg.replace('email', 'e-mail'); | ||
577 | - return msg.substring(0, msg.length - 2) + "."; | 573 | + msg = msg.replace('password_confirmation', "campo 'confirmação da senha'"); |
574 | + msg = msg.replace(/password/g, "campo 'senha'"); | ||
575 | + msg = msg.replace('login', "campo 'nome de usuário'"); | ||
576 | + msg = msg.replace('email', "campo 'e-mail'"); | ||
577 | + msg = msg.substring(0, msg.length - 5) + "."; | ||
578 | + return msg; | ||
578 | } | 579 | } |
579 | } | 580 | } |
580 | })(); | 581 | })(); |
@@ -844,7 +845,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -844,7 +845,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
844 | }).fail(function(data) { | 845 | }).fail(function(data) { |
845 | var msg = Main.responseToText(data.responseJSON.message); | 846 | var msg = Main.responseToText(data.responseJSON.message); |
846 | message.show(); | 847 | message.show(); |
847 | - message.text('Não foi possível efetuar o cadastro: ' + msg); | 848 | + message.html('Não foi possível efetuar o cadastro: <br/><br/>' + msg); |
848 | }).always(function() { | 849 | }).always(function() { |
849 | loading.hide(); | 850 | loading.hide(); |
850 | signup.show(); | 851 | signup.show(); |
@@ -879,10 +880,12 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | @@ -879,10 +880,12 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F | ||
879 | 880 | ||
880 | $(document).on('click', '.logout', function (e){ | 881 | $(document).on('click', '.logout', function (e){ |
881 | var self = $(this); | 882 | var self = $(this); |
883 | + $.removeCookie('_dialoga_session'); | ||
882 | $.removeCookie('*'); | 884 | $.removeCookie('*'); |
883 | logged_in = false; | 885 | logged_in = false; |
884 | $('.logout').hide(); | 886 | $('.logout').hide(); |
885 | $('.entrar').show(); | 887 | $('.entrar').show(); |
888 | + location.reload(); | ||
886 | e.preventDefault(); | 889 | e.preventDefault(); |
887 | }); | 890 | }); |
888 | 891 |