@tririga/tri-template
Version:
A simple tool for generating IBM TRIRIGA UX view skeletons from available templates.
60 lines (46 loc) • 1.56 kB
HTML
<link rel="import" href="@element-ui.html">
<link rel="import" href="../triplat-login/triplat-login.html">
<!--
The @element.html and @element-ui.html are provided as a template to help the developer to define an alternate login page for UX applications.
Design Guidelines:
1) Use the triplat-login to authenticate the user.
2) Change the @element-ui by your own login ui.
Enabling the Alternate UX Login Feature:
1) In the Admin Console, go to the System Manager and edit the TRIRIGA Web Property File and define the following:
ALTERNATE_UX_LOGIN_VIEW = @element
2) Re-start the application server.
-->
<dom-module id="@element">
<template>
<@element-ui id="loginUI" username="{{username}}" password="{{password}}" login-title="Alternate Login"
on-login="_handleLogin" on-force-login="_handleForceLogin">
</@element-ui>
<triplat-login id="loginControl"
username="[[username]]"
password="[[password]]"
on-unauthorized="_handleUnauthorized"
on-already-logged="_handleAlreadyLogged"
on-error="_handleError">
</triplat-login>
</template>
</dom-module>
<script>
Polymer({
is: "@element",
_handleLogin: function(e) {
this.$.loginControl.login();
},
_handleForceLogin: function(){
this.$.loginControl.forceLogin();
},
_handleUnauthorized: function(e) {
this.$.loginUI.showUnauthorizedMessage();
},
_handleAlreadyLogged: function(e) {
this.$.loginUI.showAlreadyLoggedMessage();
},
_handleError: function(e) {
this.$.loginUI.showErrorMessage();
}
});
</script>