From 9fac9c3181fe61aec2f6d3eb1fc952e366d9a4d3 Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Mon, 14 May 2018 13:57:14 +0000 Subject: [PATCH] FEAT #7721 starter contact group front --- ...ntacts-group-administration.component.html | 20 +++++++++---------- ...contacts-group-administration.component.ts | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/maarch_entreprise/Views/contacts-group-administration.component.html b/apps/maarch_entreprise/Views/contacts-group-administration.component.html index 1e2741a3c54..7cd9a05e3b2 100755 --- a/apps/maarch_entreprise/Views/contacts-group-administration.component.html +++ b/apps/maarch_entreprise/Views/contacts-group-administration.component.html @@ -4,10 +4,10 @@ <mat-icon class="maarchLogo" [svgIcon]="mobileQuery.matches ? 'maarchLogoOnly' : 'maarchLogo'"></mat-icon> </button> <h1 class="admin-toolbar-title" *ngIf="!creationMode">{{lang.contactsGroupModification}} - <small [class.hide-for-mobile]="mobileQuery.matches">{{action.label_action}}</small> + <small [class.hide-for-mobile]="mobileQuery.matches">{{contactsGroup.label}}</small> </h1> <h1 class="admin-toolbar-title" *ngIf="creationMode">{{lang.contactGroupCreation}} - <small [class.hide-for-mobile]="mobileQuery.matches">{{action.label_action}}</small> + <small [class.hide-for-mobile]="mobileQuery.matches">{{contactsGroup.label}}</small> </h1> <span style="flex: 1 1 auto;"></span> <menu-top></menu-top> @@ -23,32 +23,32 @@ <mat-spinner style="margin:auto;"></mat-spinner> </div> <mat-card *ngIf="!loading" class="card-app-content"> - <form class="form-horizontal" (ngSubmit)="onSubmit()" #actionsFormUp="ngForm"> + <form class="form-horizontal" (ngSubmit)="onSubmit()" #contactsGroupFormUp="ngForm"> <div class="form-group"> <div class="col-sm-12"> <mat-form-field> - <input matInput [(ngModel)]="action.label_action" required name="action_name" id="action_name" title="{{lang.label}}" - type="text" placeholder="{{lang.label}}" maxlength="255"> + <input matInput [(ngModel)]="contactsGroup.label" required name="label" id="label" title="{{lang.label}}" + type="text" placeholder="{{lang.label}}" maxlength="32"> </mat-form-field> </div> </div> <div class="form-group"> <div class="col-sm-12"> <mat-form-field> - <input matInput [(ngModel)]="action.label_action" required name="description" id="description" title="{{lang.description}}" + <input matInput [(ngModel)]="contactsGroup.description" required name="description" id="description" title="{{lang.description}}" type="text" placeholder="{{lang.description}}" maxlength="255"> </mat-form-field> </div> </div> <div class="form-group"> <div class="col-sm-6" style="text-align:center;"> - <mat-slide-toggle name="history" title="{{lang.contactsGroupDesc}}" id="history" color="primary" [(ngModel)]="action.history" - [checked]="action.history == 'Y'">{{lang.public}}</mat-slide-toggle> + <mat-slide-toggle name="public" title="{{lang.contactsGroupDesc}}" id="public" color="primary" [(ngModel)]="contactsGroup.public" + [checked]="contactsGroup.public">{{lang.public}}</mat-slide-toggle> </div> </div> <div class="form-group"> <div class="col-sm-12" style="text-align:center;"> - <button mat-raised-button color="primary" type="submit" [disabled]="!actionsFormUp.form.valid">{{lang.save}}</button> + <button mat-raised-button color="primary" type="submit" [disabled]="!contactsGroupFormUp.form.valid">{{lang.save}}</button> </div> </div> </form> @@ -57,7 +57,7 @@ <mat-sidenav #snav2 [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56" position='end' [opened]="mobileQuery.matches ? false : false" style="overflow-x:hidden;"> <mat-list> - <h3 mat-subheader>Action(s)</h3> + <h3 mat-subheader>{{lang.contactsGroups}}</h3> </mat-list> </mat-sidenav> </mat-sidenav-container> diff --git a/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts index 33df9eae6eb..b61635bdb33 100755 --- a/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts +++ b/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts @@ -50,6 +50,8 @@ export class ContactsGroupAdministrationComponent implements OnInit { this.loading = false; }); + } else { + this.loading = false; } }); } -- GitLab