From ad732e298ce0ea8d0ee32ad0accdf257505d975e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 30 Aug 2015 00:59:49 +0200 Subject: [PATCH] Prevent chrome to ask for password save. --- .../_application_controller_generic.js.coffee | 4 ---- .../app/controllers/getting_started.js.coffee | 10 +++++++++- .../views/channel/email_account_wizard.jst.eco | 12 ++++++++++++ .../channel/email_notification_wizard.jst.eco | 4 ++++ .../app/views/getting_started/email.jst.eco | 15 ++++++++++++--- .../getting_started/email_notification.jst.eco | 5 ++++- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index 012745547..556fdaa26 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -616,10 +616,6 @@ class App.Wizard extends App.Controller hideAlert: (screen) => @$(".#{screen}").find('.alert').addClass('hide') - hideAlerts: => - @$('.form-group').removeClass('has-error') - @$('.alert').addClass('hide') - disable: (e) => @formDisable(e) @$('.wizard-controls .btn').attr('disabled', true) diff --git a/app/assets/javascripts/app/controllers/getting_started.js.coffee b/app/assets/javascripts/app/controllers/getting_started.js.coffee index 813dd58d6..a1fa3b924 100644 --- a/app/assets/javascripts/app/controllers/getting_started.js.coffee +++ b/app/assets/javascripts/app/controllers/getting_started.js.coffee @@ -367,7 +367,7 @@ class Base extends App.Wizard @navigate 'getting_started/email_notification' else for key, value of data.messages - @showAlert( key, value ) + @showAlert(key, value) @enable(e) fail: => @enable(e) @@ -376,6 +376,14 @@ class Base extends App.Wizard # add resized image App.ImageService.resizeForApp( @params.logo, @logoPreview.width(), @logoPreview.height(), store ) + hideAlerts: => + @$('.form-group').removeClass('has-error') + @$('.alert').addClass('hide') + + showAlert: (field, message) => + @$("[name=#{field}]").closest('.form-group').addClass('has-error') + @$("[name=#{field}]").closest('.form-group').find('.alert').removeClass('hide').text( App.i18n.translateInline( message ) ) + App.Config.set( 'getting_started/base', Base, 'Routes' ) diff --git a/app/assets/javascripts/app/views/channel/email_account_wizard.jst.eco b/app/assets/javascripts/app/views/channel/email_account_wizard.jst.eco index d2948c217..971b550e0 100644 --- a/app/assets/javascripts/app/views/channel/email_account_wizard.jst.eco +++ b/app/assets/javascripts/app/views/channel/email_account_wizard.jst.eco @@ -1,6 +1,10 @@