settings: add canJoinTeam parameter
This commit is contained in:
parent
921644deb4
commit
2b95995104
7 changed files with 159 additions and 36 deletions
|
|
@ -26,8 +26,8 @@
|
|||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="teamName" ng-model="form.teamName" placeholder="" autofocus required>
|
||||
<span class="input-group-btn" id="vldBtn">
|
||||
<button class="btn btn-info" type="button" ng-click="Validate()">Valider</button>
|
||||
<span class="input-group-append" id="vldBtn">
|
||||
<button class="btn btn-info" type="button" ng-click="Validate()" ng-disabled="form.jTeam">Valider</button>
|
||||
</span>
|
||||
<div class="invalid-feedback">
|
||||
Veuillez indiquer un nom d'équipe valide.
|
||||
|
|
@ -36,13 +36,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="part2">
|
||||
<h4 style="text-indent: 0; margin-top: 20px">
|
||||
<div ng-if="partR">
|
||||
<h4 style="text-indent: 0; margin-top: 20px" ng-if="!settings.canJoinTeam">
|
||||
Membres d'équipe
|
||||
<button class="btn btn-sm btn-success" type="button" ng-click="AddMember()">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un membre
|
||||
</button>
|
||||
</h4>
|
||||
<h4 style="text-indent: 0; margin-top: 20px" ng-if="settings.canJoinTeam">
|
||||
Chef d'équipe
|
||||
</h4>
|
||||
<p ng-if="message" ng-class="messageClass" ng-bind="message"></p>
|
||||
<div class="row form-group" ng-repeat="(mid, member) in form.members">
|
||||
<div class="col-sm">
|
||||
|
|
@ -57,13 +60,13 @@
|
|||
<div class="col-sm">
|
||||
<input type="text" class="form-control" ng-model="member.company" placeholder="Entreprise">
|
||||
</div>
|
||||
<div class="col-sm-auto">
|
||||
<div class="col-sm-auto" ng-if="!settings.canJoinTeam">
|
||||
<button class="btn btn-danger" type="button" ng-click="RemoveMember(mid)">
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-info" style="margin-left: 40%;" type="submit">
|
||||
<button class="btn btn-info" style="margin-left: 40%;" type="submit" ng-disabled="form.jTeam">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
S'inscrire
|
||||
</button>
|
||||
|
|
@ -71,3 +74,53 @@
|
|||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron niceborder" style="text-indent: 1em" ng-if="settings.canJoinTeam">
|
||||
<p>
|
||||
Si votre équipe est déjà créée, rejoignez-là !
|
||||
</p>
|
||||
<form ng-submit="jsubmit()">
|
||||
|
||||
<div class="row">
|
||||
<label for="jTeam" class="col col-form-label">Nom d'équipe</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<select class="custom-select" id="jTeam" ng-model="form.jTeam" ng-options="tid as t.name for (tid,t) in teams" required ng-disabled="partJ">
|
||||
</select>
|
||||
<span class="input-group-append" id="jvldBtn">
|
||||
<button class="btn btn-info" type="button" ng-click="JValidate()" ng-disabled="form.teamName">Valider</button>
|
||||
</span>
|
||||
<div class="invalid-feedback">
|
||||
Veuillez sélectionner une équipe valide.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="partJ">
|
||||
<h4 style="text-indent: 0; margin-top: 20px">
|
||||
Vos informations
|
||||
</h4>
|
||||
<p ng-if="message" ng-class="messageClass" ng-bind="message"></p>
|
||||
<div class="row form-group" ng-repeat="(mid, member) in form.members">
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" ng-model="member.lastname" placeholder="Nom" autofocus>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" ng-model="member.firstname" placeholder="Prénom">
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" ng-model="member.nickname" placeholder="Pseudo">
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" ng-model="member.company" placeholder="Entreprise">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-info" style="margin-left: 40%;" type="submit" ng-disabled="form.teamName">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
Rejoindre
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue