From 72a107c9d73d1576f3adf7928deef4b5e5f35a83 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 4 Jun 2014 16:23:46 +0200 Subject: webui: add link pointing to OTP sync page to login https://fedorahosted.org/freeipa/ticket/4218 Reviewed-By: Endi Sukma Dewata --- install/ui/src/freeipa/widgets/LoginScreen.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'install/ui/src/freeipa/widgets') 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()) { -- cgit