From 2bf2d506bf4c541da4315b9c462e0b54fc9b09a7 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 19 Jun 2017 16:27:31 +0530 Subject: [PATCH] UX: hide help button after click --- .../javascripts/discourse/controllers/forgot-password.js.es6 | 1 + .../javascripts/discourse/templates/modal/forgot-password.hbs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 index 13fb76d7946..5f8d7de2758 100644 --- a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 +++ b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 @@ -60,6 +60,7 @@ export default Ember.Controller.extend(ModalFunctionality, { help() { this.set('offerHelp', I18n.t('forgot_password.help')); + $('.forgot-password-help-btn').hide(); } } diff --git a/app/assets/javascripts/discourse/templates/modal/forgot-password.hbs b/app/assets/javascripts/discourse/templates/modal/forgot-password.hbs index 69cf6e73b2d..9039f1d25fe 100644 --- a/app/assets/javascripts/discourse/templates/modal/forgot-password.hbs +++ b/app/assets/javascripts/discourse/templates/modal/forgot-password.hbs @@ -17,7 +17,7 @@ {{d-button class="btn-large btn-primary" label="forgot_password.button_ok" action="ok"}} - {{d-button class="btn-large" + {{d-button class="btn-large forgot-password-help-btn" label="forgot_password.button_help" action="help"}} {{/unless}}