2007-09-04 17:00:44 +02:00
|
|
|
<?xml version="1.0" standalone="yes"?>
|
2007-09-07 17:38:03 +02:00
|
|
|
<!DOCTYPE var:component>
|
|
|
|
<var:component
|
2015-02-06 21:35:51 +01:00
|
|
|
className="UIxPageFrame"
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
|
|
|
xmlns:rsrc="OGo:url"
|
|
|
|
xmlns:label="OGo:label"
|
2015-08-07 15:56:47 +02:00
|
|
|
const:jsFiles="Main.js, Common.js"
|
2015-05-06 18:06:14 +02:00
|
|
|
>
|
2016-07-15 20:03:16 +02:00
|
|
|
<script type="text/javascript">
|
2019-10-21 20:07:03 +02:00
|
|
|
var cookieUsername = <var:string var:value="cookieUsername.doubleQuotedString" const:escapeHTML="NO"/>;
|
2017-05-19 04:28:05 +02:00
|
|
|
var language = '<var:string var:value="language" const:escapeHTML="NO"/>';
|
2016-07-15 20:03:16 +02:00
|
|
|
</script>
|
|
|
|
|
2015-02-22 22:48:27 +01:00
|
|
|
<!--
|
2015-05-06 18:06:14 +02:00
|
|
|
MAIN CONTENT ROW
|
|
|
|
Content of the application view injected injected in the element bellow
|
|
|
|
MUST be the first html element after body
|
|
|
|
SHOULD be a main tag (with role="main")
|
2015-02-22 22:48:27 +01:00
|
|
|
-->
|
2016-07-15 20:03:16 +02:00
|
|
|
<main class="view md-default-theme md-background md-hue-1 md-bg"
|
|
|
|
layout-gt-md="row" layout-align-gt-md="center start" layout-fill="layout-fill"
|
2015-12-08 20:11:36 +01:00
|
|
|
ui-view="login"
|
2015-09-15 17:42:47 +02:00
|
|
|
ng-controller="LoginController as app">
|
2016-07-15 20:03:16 +02:00
|
|
|
<md-content id="loginContent" class="ng-cloak md-whiteframe-3dp" flex="100"
|
|
|
|
layout="column" layout-gt-md="row" layout-align="start stretch"
|
2015-09-15 17:42:47 +02:00
|
|
|
ng-show="app.showLogin">
|
2016-07-15 20:03:16 +02:00
|
|
|
<div class="sg-logo" flex-gt-md="50">
|
|
|
|
<div layout="row" class="md-padding">
|
|
|
|
<div class="md-flex hide show-gt-md"><!-- push logo to the right on larger screens --></div>
|
|
|
|
<img const:alt="*" class="md-margin" rsrc:src="img/sogo-full.svg"/>
|
|
|
|
</div>
|
2015-09-15 17:42:47 +02:00
|
|
|
</div>
|
2016-07-15 20:03:16 +02:00
|
|
|
<div class="sg-login md-default-theme md-bg md-accent" flex-gt-md="50">
|
|
|
|
<div id="login" class="sg-login-content md-padding">
|
2015-05-20 20:46:12 +02:00
|
|
|
<form name="loginForm" layout="column"
|
|
|
|
ng-cloak="ng-cloak"
|
2015-08-07 17:04:04 +02:00
|
|
|
ng-submit="app.login()">
|
2015-05-06 18:06:14 +02:00
|
|
|
<var:if condition="hasLoginSuffix">
|
2015-08-07 17:04:04 +02:00
|
|
|
<input type="hidden" ng-model="app.creds.loginSuffix" var:value="loginSuffix"/>
|
2015-05-06 18:06:14 +02:00
|
|
|
</var:if>
|
2015-12-09 21:15:22 +01:00
|
|
|
<md-input-container class="md-block">
|
|
|
|
<label><var:string label:value="Username"/></label>
|
2015-08-11 02:47:58 +02:00
|
|
|
<md-icon>person</md-icon>
|
2016-11-20 11:16:29 +01:00
|
|
|
<input autocorrect="off" autocapitalize="off" type="text" ng-model="app.creds.username" ng-required="true"/>
|
2015-05-06 18:06:14 +02:00
|
|
|
</md-input-container>
|
2015-12-09 21:15:22 +01:00
|
|
|
<md-input-container class="md-block">
|
|
|
|
<label><var:string label:value="Password"/></label>
|
2015-08-11 02:47:58 +02:00
|
|
|
<md-icon>email</md-icon>
|
2015-12-09 21:15:22 +01:00
|
|
|
<input type="password" ng-model="app.creds.password" ng-required="true"/>
|
2015-05-06 18:06:14 +02:00
|
|
|
</md-input-container>
|
2015-05-06 22:11:51 +02:00
|
|
|
|
|
|
|
<!-- LANGUAGES SELECT -->
|
2015-05-06 18:06:14 +02:00
|
|
|
<div layout="row" layout-align="start end">
|
2015-08-11 02:47:58 +02:00
|
|
|
<md-icon>language</md-icon>
|
2015-12-18 22:35:30 +01:00
|
|
|
<md-input-container class="md-flex">
|
2015-12-08 20:11:36 +01:00
|
|
|
<label><var:string label:value="choose"/></label>
|
2017-08-30 20:18:23 +02:00
|
|
|
<md-select ng-model="app.creds.language"
|
|
|
|
var:placeholder="localizedLanguage"
|
|
|
|
ng-change="app.changeLanguage($event)">
|
2015-12-08 20:11:36 +01:00
|
|
|
<var:foreach list="languages" item="item">
|
|
|
|
<md-option var:value="item">
|
|
|
|
<var:string value="languageText"/>
|
|
|
|
</md-option>
|
|
|
|
</var:foreach>
|
2015-07-02 19:20:13 +02:00
|
|
|
</md-select>
|
2015-12-08 20:11:36 +01:00
|
|
|
</md-input-container>
|
2015-05-06 18:06:14 +02:00
|
|
|
</div>
|
2015-02-20 00:49:13 +01:00
|
|
|
|
2015-05-06 22:11:51 +02:00
|
|
|
<!-- DOMAINS SELECT -->
|
2015-05-06 18:06:14 +02:00
|
|
|
<var:if condition="hasLoginDomains">
|
2015-05-06 22:11:51 +02:00
|
|
|
<div layout="row" layout-align="start end">
|
2015-08-11 02:47:58 +02:00
|
|
|
<md-icon>domain</md-icon>
|
2015-12-18 22:35:30 +01:00
|
|
|
<md-input-container class="md-flex">
|
|
|
|
<md-select class="md-flex" ng-model="app.creds.domain" label:placeholder="choose">
|
|
|
|
<var:foreach list="loginDomains" item="item">
|
|
|
|
<md-option var:value="item">
|
|
|
|
<var:string value="item"/>
|
|
|
|
</md-option>
|
|
|
|
</var:foreach>
|
|
|
|
</md-select>
|
|
|
|
</md-input-container>
|
2015-05-06 22:11:51 +02:00
|
|
|
</div>
|
|
|
|
</var:if>
|
|
|
|
|
|
|
|
<div layout="row" layout-align="center center">
|
2016-12-19 17:15:35 +01:00
|
|
|
<md-switch class="md-accent md-hue-2"
|
|
|
|
ng-model="app.creds.rememberLogin"
|
|
|
|
label:arial-label="Remember username">
|
2015-05-06 22:11:51 +02:00
|
|
|
<var:string label:value="Remember username"/>
|
|
|
|
</md-switch>
|
2015-05-06 18:06:14 +02:00
|
|
|
</div>
|
2016-08-01 17:54:03 +02:00
|
|
|
|
|
|
|
<!-- CONNECT BUTTON -->
|
|
|
|
<div layout="row" layout-align="space-between center">
|
|
|
|
<md-button class="md-icon-button"
|
|
|
|
label:aria-label="About"
|
|
|
|
ng-click="app.showAbout()">
|
|
|
|
<md-icon>info</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-button class="md-fab md-accent md-hue-2" type="submit"
|
|
|
|
label:aria-label="Connect"
|
2020-05-07 22:45:37 +02:00
|
|
|
ng-if="!app.loginState"
|
|
|
|
ng-disabled="loginForm.$invalid"
|
|
|
|
sg-ripple-click="loginContent">
|
2016-08-01 17:54:03 +02:00
|
|
|
<md-icon>arrow_forward</md-icon>
|
|
|
|
</md-button>
|
|
|
|
</div>
|
|
|
|
|
2016-07-15 20:03:16 +02:00
|
|
|
<sg-ripple class="md-default-theme md-accent md-bg"
|
|
|
|
ng-class="{ 'md-warn': app.loginState == 'error' }"><!-- ripple background --></sg-ripple>
|
|
|
|
<sg-ripple-content class="md-flex ng-hide"
|
|
|
|
layout="column" layout-align="center center" layout-fill="layout-fill"
|
|
|
|
ng-switch="app.loginState">
|
|
|
|
|
|
|
|
<!-- Authenticating -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="authenticating">
|
|
|
|
<md-progress-circular class="md-hue-1"
|
|
|
|
md-mode="indeterminate"
|
|
|
|
md-diameter="32"><!-- mailbox loading progress --></md-progress-circular>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
|
|
|
<var:string label:value="Authenticating"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-06-16 15:49:30 +02:00
|
|
|
<!-- TOTP Code -->
|
2021-06-16 20:59:02 +02:00
|
|
|
<var:if condition="isTotpEnabled">
|
2020-05-07 22:45:37 +02:00
|
|
|
<div layout="row" layout-align="center center" layout-fill="layout-fill"
|
2021-06-16 20:59:02 +02:00
|
|
|
ng-switch-when="totpcode">
|
2020-05-07 22:45:37 +02:00
|
|
|
<div flex="80" flex-sm="50" flex-gt-sm="40">
|
|
|
|
<md-input-container class="md-block">
|
|
|
|
<label><var:string label:value="Verification Code"/></label>
|
|
|
|
<md-icon>lock</md-icon>
|
2021-06-16 20:59:02 +02:00
|
|
|
<input type="text" ng-pattern="app.verificationCodePattern" ng-model="app.creds.verificationCode" ng-required="app.loginState == 'totpcode'"/>
|
2021-06-16 15:49:30 +02:00
|
|
|
<div class="sg-hint"><var:string label:value="Enter the 6-digit verification code from your TOTP application."/></div>
|
2020-05-07 22:45:37 +02:00
|
|
|
</md-input-container>
|
|
|
|
<div layout="row" layout-align="space-between center">
|
|
|
|
<md-button class="md-icon-button"
|
|
|
|
label:aria-label="Cancel"
|
|
|
|
ng-click="app.restoreLogin()"
|
|
|
|
sg-ripple-click="loginContent">
|
|
|
|
<md-icon>arrow_backward</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-button class="md-fab md-accent md-hue-2" type="submit"
|
|
|
|
label:aria-label="Connect"
|
2021-06-16 20:59:02 +02:00
|
|
|
ng-if="app.loginState == 'totpcode'"
|
2020-05-07 22:45:37 +02:00
|
|
|
ng-disabled="loginForm.$invalid"
|
|
|
|
ng-click="app.login()">
|
|
|
|
<md-icon>arrow_forward</md-icon>
|
|
|
|
</md-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</var:if>
|
|
|
|
|
2021-05-05 18:41:08 +02:00
|
|
|
<!-- Password policy: Password is expired -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="passwordexpired">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">watch_later</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
|
|
|
<var:string label:value="Your password has expired, please enter a new one below"/>
|
|
|
|
</div>
|
|
|
|
<div flex="100">
|
|
|
|
<div layout="row" layout-xs="column">
|
|
|
|
<md-input-container class="md-block" flex="flex">
|
|
|
|
<label><var:string label:value="Current password"/>
|
|
|
|
</label>
|
|
|
|
<input type="password" sg-no-dirty-check="true" ng-model="app.passwords.oldPassword"/>
|
|
|
|
</md-input-container>
|
|
|
|
<md-input-container class="md-block" flex="flex">
|
|
|
|
<label><var:string label:value="New password"/>
|
|
|
|
</label>
|
|
|
|
<input type="password" sg-no-dirty-check="true" ng-model="app.passwords.newPassword"/>
|
|
|
|
</md-input-container>
|
|
|
|
<md-input-container class="md-block" flex="flex">
|
|
|
|
<label><var:string label:value="Confirmation"/>
|
|
|
|
</label>
|
|
|
|
<input type="password" name="newPasswordConfirmation" sg-no-dirty-check="true" ng-model="app.passwords.newPasswordConfirmation"/>
|
|
|
|
<div ng-messages="loginForm.newPasswordConfirmation.$error">
|
|
|
|
<div ng-message="newPasswordMismatch"><var:string label:value="Passwords don't match"/></div>
|
|
|
|
</div>
|
|
|
|
</md-input-container>
|
|
|
|
</div>
|
|
|
|
<div layout="row" layout-align="end center">
|
|
|
|
<md-button ng-click="app.changePassword()" type="button" ng-disabled="!app.canChangePassword(loginForm)">
|
|
|
|
<var:string label:value="Change"/>
|
|
|
|
</md-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Password policy: Grace period -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="passwordwillexpire">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">warning</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding" ng-if="app.cn">
|
|
|
|
<var:string label:value="Welcome"/> {{app.cn}}
|
|
|
|
</div>
|
|
|
|
<div class="md-default-theme md-warn md-hue-1 md-bg md-padding">
|
|
|
|
{{app.errorMessage}}
|
|
|
|
<md-button class="md-raised"
|
|
|
|
ng-click="app.loginState = 'passwordexpired'"><var:string label:value="Change your Password"/></md-button>
|
|
|
|
</div>
|
|
|
|
<md-button
|
|
|
|
ng-click="app.continueLogin()"
|
|
|
|
sg-ripple-click="loginContent"><var:string label:value="Continue"/></md-button>
|
|
|
|
</div>
|
|
|
|
|
2016-07-15 20:03:16 +02:00
|
|
|
<!-- Logged in -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="logged">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">done</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
2016-08-31 20:32:30 +02:00
|
|
|
<var:string label:value="Welcome"/> {{app.cn}}
|
2016-07-15 20:03:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-05-05 18:41:08 +02:00
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="message">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">done</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
|
|
|
{{app.errorMessage}}
|
|
|
|
</div>
|
|
|
|
<md-button
|
|
|
|
ng-click="app.continueLogin()"
|
|
|
|
sg-ripple-click="loginContent"><var:string label:value="Continue"/></md-button>
|
|
|
|
</div>
|
|
|
|
|
2016-07-15 20:03:16 +02:00
|
|
|
<!-- Error -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="error">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">error</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
|
|
|
{{app.errorMessage}}
|
|
|
|
</div>
|
2020-05-07 22:45:37 +02:00
|
|
|
<md-button
|
|
|
|
ng-click="app.restoreLogin()"
|
|
|
|
sg-ripple-click="loginContent"><var:string label:value="Retry"/></md-button>
|
2016-07-15 20:03:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</sg-ripple-content>
|
2020-05-07 22:45:37 +02:00
|
|
|
</form>
|
|
|
|
|
2015-03-08 22:42:38 +01:00
|
|
|
</div>
|
2015-05-06 18:06:14 +02:00
|
|
|
</div>
|
|
|
|
</md-content>
|
|
|
|
</main>
|
2015-05-20 20:46:12 +02:00
|
|
|
|
|
|
|
<script type="text/ng-template" id="aboutBox.html">
|
2015-12-09 21:15:22 +01:00
|
|
|
<md-dialog flex="50" flex-xs="100">
|
2015-10-14 16:31:15 +02:00
|
|
|
<md-dialog-content class="md-dialog-content">
|
2015-05-20 20:46:12 +02:00
|
|
|
<p><a href="http://sogo.nu/" target="_new">sogo.nu</a></p>
|
|
|
|
<p>Version <var:string value="version"/> (<var:string value="buildDate" />)</p>
|
|
|
|
<br/>
|
|
|
|
<p><var:string label:value="AboutBox" const:escapeHTML="NO"/></p>
|
|
|
|
<!--<img class="full-image" const:alt="Inverse" rsrc:src="img/inverse.png"/>-->
|
|
|
|
</md-dialog-content>
|
2015-11-27 19:00:39 +01:00
|
|
|
<md-dialog-actions>
|
2015-08-07 17:04:04 +02:00
|
|
|
<md-button ng-click="about.closeDialog()"><var:string label:value="Close"/></md-button>
|
2015-11-27 19:00:39 +01:00
|
|
|
</md-dialog-actions>
|
2015-05-20 20:46:12 +02:00
|
|
|
</md-dialog>
|
|
|
|
</script>
|
|
|
|
|
2007-09-07 17:38:03 +02:00
|
|
|
</var:component>
|