diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-06-04 16:23:46 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-30 12:27:04 +0200 |
commit | 72a107c9d73d1576f3adf7928deef4b5e5f35a83 (patch) | |
tree | 56f010c9dd1e8d03251a1200f6a7c6b55256ca7e /install/ui/src/freeipa/widgets | |
parent | 30b1256b6231610812b394e3363394690a297201 (diff) | |
download | freeipa-72a107c9d73d1576f3adf7928deef4b5e5f35a83.tar.gz freeipa-72a107c9d73d1576f3adf7928deef4b5e5f35a83.tar.xz freeipa-72a107c9d73d1576f3adf7928deef4b5e5f35a83.zip |
webui: add link pointing to OTP sync page to login
https://fedorahosted.org/freeipa/ticket/4218
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/widgets')
-rw-r--r-- | install/ui/src/freeipa/widgets/LoginScreen.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/widgets/LoginScreen.js b/install/ui/src/freeipa/widgets/LoginScreen.js index 6c448ff99..3e0986435 100644 --- a/install/ui/src/freeipa/widgets/LoginScreen.js +++ b/install/ui/src/freeipa/widgets/LoginScreen.js @@ -82,6 +82,13 @@ define(['dojo/_base/declare', render_buttons: function(container) { + this.sync_btn_node = IPA.button({ + label: text.get('@i18n:login.sync_otp_token', "Sync OTP Token"), + button_class: 'btn btn-link', + click: lang.hitch(this, this.on_sync) + })[0]; + construct.place(this.sync_btn_node, container); + this.login_btn_node = IPA.button({ label: text.get('@i18n:login.login', "Login"), 'class': 'btn-primary btn-lg', @@ -115,6 +122,11 @@ define(['dojo/_base/declare', p_f.set_required(required); }, + on_sync: function() { + var user = this.get_field('username').get_value()[0]; + this.emit('require-otp-sync', { source: this, user: user }); + }, + on_confirm: function() { if (this.view == 'login') { this.login(); @@ -231,6 +243,7 @@ define(['dojo/_base/declare', show_login_view: function() { this.set_login_aside_text(); if (this.buttons_node) { + construct.place(this.sync_btn_node, this.buttons_node); construct.place(this.login_btn_node, this.buttons_node); } if (this.password_enabled()) { |