habitica-self-host/website/views/static/login-modal.jade
Phillip Thelen e3b484b29a Add Google Signin (#7969)
* Start adding google login

* fix local js issue

* implement syntax suggestions

* fix delete social tests

* Add service for authentication alerts

* fix social login tests

* make suggested google sign in changes

* fix accidentally deleted code

* refactor social network sign in

* fix incorrect find

* implement suggested google sign in changes

* fix(tests): Inject fake Auth module for auth controller

* fix(test): prevent social service from causing page reload

* fix loading user info

* Use lodash's implimentation of find for IE compatibility

* chore: increase test coverage around deletion route

* chore: clean up social auth test

* chore: Fix social login tests

* remove profile from login scope

* fix(api): Allow social accounts to deregister as user has auth backup

* temporarily disable google login button
2016-09-28 12:11:10 +02:00

68 lines
3.2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mixin registrationForm
form#registrationForm(ng-submit='register()', name='registrationForm')
.form-group
input.form-control(type='text', ng-model='registerVals.username', placeholder=env.t('username'), spellcheck='false', required)
.form-group
input.form-control(type='email', ng-model='registerVals.email', placeholder=env.t('email'), required)
.form-group
input.form-control(type='password', ng-model='registerVals.password', placeholder=env.t('password'), required)
.form-group
input.form-control(type='password', ng-model='registerVals.confirmPassword', placeholder=env.t('passConfirm'), required)
.form-group
small
=env.t('accept1Terms')
| 
a(href='/static/terms' target='_blank')=env.t('terms')
| 
=env.t('accept2Terms')
| 
a(href='/static/privacy' target='_blank')=env.t('privacy')
| .
.form-group
input.btn.btn-block.btn-lg.btn-success(type='submit', ng-disabled='registrationForm.$invalid || registrationInProgress', value=env.t('getStartedNow'))
script(id='modals/login.html', type='text/ng-template')
.modal-header
button.close(type='button', ng-click='$close()') ×
h4.modal-title=env.t('loginAndReg')
.modal-body(ng-controller='AuthCtrl')
ul.list-inline
li
a.zocial.facebook(alt=env.t('loginFacebookAlt'), ng-click='socialLogin("facebook")')=env.t('loginFacebookAlt')
// li
// a.zocial.google(alt="Google", ng-click='socialLogin("google")')=env.t('loginGoogleAlt')
hr
tabset(justified='true')
tab(heading=env.t('login'))
form#loginForm(ng-submit='auth()', method='POST', name='loginForm')
.form-group
input.form-control(type='text', ng-model='loginUsername', placeholder=env.t('usernameOrEmail'), name='username', spellcheck='false', required)
.form-group
input.form-control(type='password', ng-model='loginPassword', placeholder=env.t('password'), name='password', required)
.form-group
input.btn.btn-block.btn-lg.btn-primary(type='submit', ng-disabled='loginForm.$invalid', value=env.t('login'))
small=env.t('passMan')
br
br
// good god accordions have html ceremony
.panel-group#forgot-password
.panel.panel-default
.panel-heading
h3.panel-title
a(data-toggle="collapse" data-parent="#forgot-password" href="#forgot-password-panel")=env.t('forgotPass')
.panel-body.collapse#forgot-password-panel
form(name='passwordResetForm', ng-submit='passwordReset(passwordResetEmail)', novalidate)
//.alert.alert-success {.success.passwordReset}
//.control-group.{#if..errors.passwordReset}error{/}
h3=env.t('emailNewPass')
.form-group
input.form-control(type='email', name='email', placeholder=env.t('email') , ng-model='passwordResetEmail')
//span.help-inline {.errors.passwordReset}
.form-group
input.btn.btn-default(type='submit', value=env.t('submit'))
tab(heading=env.t('register'))
+registrationForm