summaryrefslogtreecommitdiffstats
path: root/install/ui
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-08-05 17:00:01 +0200
committerMartin Kosek <mkosek@redhat.com>2014-10-17 15:53:34 +0200
commit43d359387392bb659b471380c129999bb8aebb3e (patch)
tree573ee7df9d2ebb8101207cc0e4ca6e453e242afa /install/ui
parent49fde3b047e63a549774a3354138102608855d77 (diff)
downloadfreeipa-43d359387392bb659b471380c129999bb8aebb3e.tar.gz
freeipa-43d359387392bb659b471380c129999bb8aebb3e.tar.xz
freeipa-43d359387392bb659b471380c129999bb8aebb3e.zip
webui: add link to OTP token app
- display info message which points user to FreeOTP project page - the link or the text can be easily changed by a plugin if needed https://fedorahosted.org/freeipa/ticket/4469 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r--install/ui/src/freeipa/otptoken.js10
-rw-r--r--install/ui/test/data/ipa_init.json1
2 files changed, 10 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js
index 2daeed9b6..6c877533c 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -37,7 +37,10 @@ define([
* @class
* @singleton
*/
-var otptoken = IPA.otptoken = {};
+var otptoken = IPA.otptoken = {
+ app_link: 'https://fedorahosted.org/freeotp/',
+ app_link_text: '@i18n:objects.otptoken.app_link'
+};
var make_spec = function() {
return {
@@ -523,6 +526,11 @@ otptoken.adder_dialog_qrcode_post_op = function(object) {
qr_dialog.open();
qr_dialog.show_message(text.get('@i18n:objects.otptoken.config_instructions'));
+ if (otptoken.app_link && otptoken.app_link_text) {
+ var app_text = text.get(otptoken.app_link_text);
+ app_text = app_text.replace('${link}', otptoken.app_link);
+ qr_dialog.show_message(app_text);
+ }
});
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index f40ff14df..c0e17947a 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -406,6 +406,7 @@
},
"otptoken": {
"add_token": "Add OTP Token",
+ "app_link": "You can use <a href=\"${link}\" target=\"_blank\">FreeOTP<a/> as a software OTP token application.",
"config_title": "Configure your token",
"config_instructions": "Configure your token by scanning the QR code below. Click on the QR code if you see this on the device you want to configure.",
"details": "OTP Token Settings",