Skip to content

Commit

Permalink
WIP [AdminTL#83] Login: rename name to username and add name in subsc…
Browse files Browse the repository at this point in the history
…ribe form
  • Loading branch information
mathben committed Mar 26, 2018
1 parent bb0bd39 commit fa4da40
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions src/web/partials/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h3 class="omb_authTitle"><b>Connexion</b> ou <a href="#" ng-click="show_login=f
<!--Username or Email-->
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span>
<input type="text" class="form-control" name="username_or_email" placeholder="Nom ou courriel" required>
<input type="text" class="form-control" name="username_or_email" placeholder="Surnom ou courriel" required>
</div>
<br/>

Expand Down Expand Up @@ -113,14 +113,14 @@ <h3 class="omb_authTitle"><a href="#" ng-click="show_login=true;" style="text-de
<div class="input-group"
ng-class="{'has-success': signUpForm.username.$valid, 'has-warning': signUpForm.username.$pending, 'has-error': (signUpForm.username.$invalid && signUpForm.username.$touched) || signUpForm.username.$error.uniqueField}">
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span>
<input type="text" class="form-control" name="username" placeholder="Nom" ng-model="username" unique-field required>
<input type="text" class="form-control" name="username" placeholder="Surnom - Nom de connexion" ng-model="username" unique-field required>
<span class="input-group-addon" ng-if="signUpForm.username.$touched">
<i ng-show="signUpForm.username.$invalid" class="fa fa-times" aria-hidden="true"></i>
<i ng-show="signUpForm.username.$pending" class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></i>
<i ng-show="signUpForm.username.$valid" class="fa fa-check" aria-hidden="true"></i>
</span>
</div>
<span class="help-block" ng-show="signUpForm.username.$error.uniqueField">Ce nom est déjà utilisé.</span>
<span class="help-block" ng-show="signUpForm.username.$error.uniqueField">Ce surnom est déjà utilisé.</span>
<br/>

<!--Email-->
Expand Down Expand Up @@ -160,8 +160,18 @@ <h3 class="omb_authTitle"><a href="#" ng-click="show_login=true;" style="text-de
</span>
</div>
<span class="help-block" ng-show="signUpForm.pwconfirm.$error.fieldMatch && signUpForm.pwconfirm.$dirty">Le mot de passe n'est pas identique.</span>
<br/>

<hr/>

<!-- Name and second name -->
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-info-circle" aria-hidden="true"></i></span>
<input type="text" class="form-control" name="name" placeholder="Prénom et nom de famille">
</div>

<hr/>

<!-- Create Button -->
<button class="btn btn-lg btn-primary btn-block" type="submit" ng-disabled="signUpForm.$invalid || signUpForm.$pending"
onclick="password.value=hashSha256(password.value);
// TODO empty pwconfirm
Expand All @@ -183,9 +193,6 @@ <h3 class="omb_authTitle"><a href="#" ng-click="show_login=true;" style="text-de
</li>
</ul>
</p>
<p>
Le courriel est utilisé comme identifiant, mais aucun courriel ne sera envoyé, sauf à la demande du joueur.
</p>
<!--<label class="checkbox" disabled>-->
<!--<input type="checkbox" value="remember-me">Mémoriser-->
<!--</label>-->
Expand Down
2 changes: 1 addition & 1 deletion src/web/partials/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h2>Fiche de personnage</h2>
<a href="/character?id_player={{! model_profile.info.user_id }}" class="btn btn-lg btn-default" role="button">Accéder à sa fiche</a>

<h2>Information personnel</h2>
<p>Nom: {{! model_profile.info.name }}</p>
<p>Surnom: {{! model_profile.info.name }}</p>
<p>Email: {{! model_profile.info.email }}</p>
<p>ID: {{! model_profile.info.user_id }}</p>
Modifier son mot de passe.<br/>
Expand Down

0 comments on commit fa4da40

Please sign in to comment.