summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-06-05 18:50:03 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-30 12:27:05 +0200
commitb36a3c693b7eeb36b25eac11da89c0dd5446eb71 (patch)
tree2a5f6a60eba9490d6286b9349508d8b4f5536678
parent46a42de5324390496fa70984c2d8cef7a6251b7a (diff)
downloadfreeipa-b36a3c693b7eeb36b25eac11da89c0dd5446eb71.tar.gz
freeipa-b36a3c693b7eeb36b25eac11da89c0dd5446eb71.tar.xz
freeipa-b36a3c693b7eeb36b25eac11da89c0dd5446eb71.zip
webui: add sync_otp.html
standalone page for OTP token synchronization. It reuses SyncOTPScreen widget instead of reimplementing the logic as in other standalone pages. https://fedorahosted.org/freeipa/ticket/4218 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
-rw-r--r--freeipa.spec.in1
-rw-r--r--install/ui/Makefile.am1
-rw-r--r--install/ui/sync_otp.html67
3 files changed, 69 insertions, 0 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index bb61cfe91..4ba4e87bc 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -702,6 +702,7 @@ fi
%dir %{_usr}/share/ipa/ui
%{_usr}/share/ipa/ui/index.html
%{_usr}/share/ipa/ui/reset_password.html
+%{_usr}/share/ipa/ui/sync_otp.html
%{_usr}/share/ipa/ui/*.ico
%{_usr}/share/ipa/ui/*.css
%{_usr}/share/ipa/ui/*.js
diff --git a/install/ui/Makefile.am b/install/ui/Makefile.am
index 1c223fdd3..9e4867113 100644
--- a/install/ui/Makefile.am
+++ b/install/ui/Makefile.am
@@ -17,6 +17,7 @@ app_DATA = \
ipa.css \
reset_password.js \
reset_password.html \
+ sync_otp.html \
$(NULL)
EXTRA_DIST = \
diff --git a/install/ui/sync_otp.html b/install/ui/sync_otp.html
new file mode 100644
index 000000000..5814b6c57
--- /dev/null
+++ b/install/ui/sync_otp.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>IPA: Identity Policy Audit</title>
+
+ <!--[if IE]>
+ <meta id="ie-detector">
+ <![endif]-->
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <script type="text/javascript" src="js/libs/loader.js"></script>
+ <script type="text/javascript">
+
+ var dojoConfig = {
+ baseUrl: "js",
+ has: {
+ 'dojo-firebug': false,
+ 'dojo-debug-messages': true
+ },
+ parseOnLoad: false,
+ async: true,
+ packages: [
+ {
+ name:'dojo',
+ location:'dojo'
+ },
+ {
+ name: 'freeipa',
+ location: 'freeipa'
+ }
+ ],
+ cacheBust: ipa_loader.num_version || ""
+ };
+
+ (function() {
+ var ie = !!document.getElementById('ie-detector');
+ var styles = ['css/patternfly.css', 'css/ipa.css', 'ipa.css'];
+ if (ie) styles.push('ie.css');
+ var icons = ['favicon.ico'];
+ var scripts = [
+ 'js/libs/json2.js',
+ 'js/libs/jquery.js',
+ 'js/libs/bootstrap.js',
+ 'js/libs/jquery.ordered-map.js',
+ 'js/libs/browser.js',
+ 'js/dojo/dojo.js'
+ ];
+ ipa_loader.scripts(scripts, function() {
+ require(['freeipa/core', 'dojo/domReady!'], function(app) {
+ var sync = require('freeipa/plugins/sync_otp');
+ sync.facet_spec.widgets[1].allow_cancel = false;
+ app.run_simple('sync-otp');
+ });
+ });
+ ipa_loader.styles(styles);
+ ipa_loader.icons(icons);
+
+ })();
+ </script>
+</head>
+
+<body>
+ <noscript>This application requires JavaScript enabled.</noscript>
+</body>
+
+</html> \ No newline at end of file