1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

[ongoing] resend sso fusion token

This commit is contained in:
Sylvain 2016-12-14 17:14:53 +01:00
parent a7fdc4d741
commit 5e1b85832c
5 changed files with 57 additions and 2 deletions

View File

@ -1,8 +1,8 @@
'use strict'
Application.Controllers.controller "CompleteProfileController", ["$scope", "$rootScope", "$state", "$window", "_t", "growl", "CSRF", "Auth", "Member", "settingsPromise", "activeProviderPromise", "groupsPromise", "cguFile", "memberPromise", "Session"
, ($scope, $rootScope, $state, $window, _t, growl, CSRF, Auth, Member, settingsPromise, activeProviderPromise, groupsPromise, cguFile, memberPromise, Session) ->
Application.Controllers.controller "CompleteProfileController", ["$scope", "$rootScope", "$state", "$window", "_t", "growl", "CSRF", "Auth", "Member", "settingsPromise", "activeProviderPromise", "groupsPromise", "cguFile", "memberPromise", "Session", "dialogs"
, ($scope, $rootScope, $state, $window, _t, growl, CSRF, Auth, Member, settingsPromise, activeProviderPromise, groupsPromise, cguFile, memberPromise, Session, dialogs) ->
@ -141,6 +141,28 @@ Application.Controllers.controller "CompleteProfileController", ["$scope", "$roo
##
# Ask for email confirmation and send the SSO merging token again
# @param $event {Object} jQuery event object
##
$scope.resendCode = (event) ->
event.preventDefault()
event.stopPropagation()
# TODO show modal only IF email is not mapped to sso OR email = null
dialogs.confirm
templateUrl: '<%= asset_path "profile/resend_code_modal.html" %>'
resolve:
object: ->
email: memberPromise.email
, (email) ->
console.log(email)
# TODO update email
# TODO in every cases, resend email
# TODO growl result
##
# Disconnect and re-connect the user to the SSO to force the synchronisation of the profile's data
##

View File

@ -3,6 +3,7 @@
<h3 translate>{{ 'do_you_already_have_an_account' }}</h3>
<p ng-hide="hasDuplicate()" translate>{{ 'do_not_fill_the_form_beside_but_specify_here_the_code_you_ve_received_by_email_to_recover_your_access' }}</p>
<p ng-show="hasDuplicate()" translate>{{ 'just_specify_code_here_to_recover_access' }}</p>
<p class="pull-right"><a href="#" ng-click="resendCode($event)" translate>{{ 'i_did_not_receive_the_code' }}</a></p>
<div class="row">
<div class="col-lg-3 col-lg-offset-1 hidden-md col-sm-3 col-sm-offset-1"></div>
<div class="col-lg-offset-1 col-lg-6 col-md-12 col-sm-offset-1 col-sm-6">

View File

@ -0,0 +1,26 @@
<div class="modal-header">
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
<h1 translate>{{ 'send_code_again' }}</h1>
</div>
<div class="modal-body">
<form name="emailForm">
<label for="email" class="beforeAmount" translate>{{ 'email_address' }}</label>
<div class="input-group" ng-class="{'has-error': emailForm.email.$dirty && emailForm.email.$invalid }">
<span class="input-group-addon"><i class="fa fa-envelope"></i> </span>
<input class="form-control"
type="email"
id="email"
name="email"
ng-model="object.email"
required>
</div>
<span class="help-block error" ng-show="emailForm['email'].$dirty && emailForm['email'].$error.required" translate>{{'email_is_required'}}</span>
<span class="help-block error" ng-show="emailForm['email'].$dirty && emailForm['email'].$error.email" translate>{{'email_format_is_incorrect'}}</span>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-info" ng-click="ok(object.email)" ng-disabled="emailForm.$invalid" translate>{{ 'confirm' }}</button>
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'cancel' }}</button>
</div>

View File

@ -18,9 +18,12 @@ en:
do_you_already_have_an_account: "Do you already have an account?"
do_not_fill_the_form_beside_but_specify_here_the_code_you_ve_received_by_email_to_recover_your_access: "Do not fill the form beside but specify here the code you've received by email, to recover your access."
just_specify_code_here_to_recover_access: "Just specify here the code you've received by email to recover your access."
i_did_not_receive_the_code: "I didn't receive the code"
authentification_code: "Authentification code"
confirm_my_code: "Confirm my code"
an_unexpected_error_occurred_check_your_authentication_code: "An unexpected error occurred, please check your authentication code."
send_code_again: "Send the code again"
email_format_is_incorrect: "Email format is incorrect"
dashboard:
# dashboard: public profile

View File

@ -18,9 +18,12 @@ fr:
do_you_already_have_an_account: "Vous possédez déjà un compte ?"
do_not_fill_the_form_beside_but_specify_here_the_code_you_ve_received_by_email_to_recover_your_access: "Ne remplissez pas le formulaire à gauche mais indiquez ici le code qui vous a été fourni par e-mail, cela vous permettra de récupérer l'accès à votre compte."
just_specify_code_here_to_recover_access: "Indiquez simplement ici le code que vous avez reçu par e-mail, cela vous permettra de récupérer l'accès à votre compte."
i_did_not_receive_the_code: "Je n'ai pas reçu le code"
authentification_code: "Code d'authentification"
confirm_my_code: "Valider mon code"
an_unexpected_error_occurred_check_your_authentication_code: "Une erreur inattendue est survenue, vérifiez votre code d'authentification."
send_code_again: "Renvoyer le code"
email_format_is_incorrect: "Le format de l'adresse email est incorrect"
dashboard:
# tableau de bord: profile publique