unify labels

This commit is contained in:
Tykayn 2022-03-01 12:02:18 +01:00 committed by tykayn
parent 26b0babf92
commit c3433440d7
4 changed files with 62 additions and 69 deletions

View File

@ -17,9 +17,7 @@
<section class="time-slice-list-of-a-day"> <section class="time-slice-list-of-a-day">
<div *ngFor="let timeSlice of dayChoice.timeSlices; index as id" class="time-choice"> <div *ngFor="let timeSlice of dayChoice.timeSlices; index as id" class="time-choice">
<label class="pull-left" for="dateChoices_{{ id }}"> <label for="dateChoices_{{ id }}"> {{ 'hours.element' | translate }} {{ id + 1 }} </label>
{{ 'hours.element' | translate }} {{ id + 1 }}
</label>
<input class="input" type="text" id="dateChoices_{{ id }}" [(ngModel)]="timeSlice.literal" /> <input class="input" type="text" id="dateChoices_{{ id }}" [(ngModel)]="timeSlice.literal" />
<button <button
@ -36,7 +34,6 @@
class="has-text-primary has-no-border is-large-button has-text-left has-background-transparent has-background-plus has-background-icon-left is-filtered-icon-primary" class="has-text-primary has-no-border is-large-button has-text-left has-background-transparent has-background-plus has-background-icon-left is-filtered-icon-primary"
(click)="addChoiceForDay(dayChoice)" (click)="addChoiceForDay(dayChoice)"
> >
<!-- <img class="icon is-filtered-icon-primary" aria-hidden="true" src="assets/icons/plus-circle.svg" />-->
{{ 'hours.add' | translate }} {{ 'hours.add' | translate }}
</button> </button>
</div> </div>
@ -110,25 +107,21 @@
</div> </div>
</div> </div>
</section> </section>
<div *ngFor="let timeSlice of pollService.timeList; index as id" class="time-choice"> <div
*ngFor="let timeSlice of pollService.timeList; index as id"
class="time-choice time-slice-list-of-a-day"
>
<label for="timeList_{{ id }}"> {{ 'hours.element' | translate }} {{ id + 1 }} </label> <label for="timeList_{{ id }}"> {{ 'hours.element' | translate }} {{ id + 1 }} </label>
<input class="input" type="text" id="timeList_{{ id }}" [(ngModel)]="timeSlice.literal" />
<div class="columns"> <button
<div class="column"> [attr.aria-label]="'choices.delete' | translate"
<input class="has-no-border delete-hour"
class="input is-fullwidth" (click)="pollService.timeList.splice(id, 1)"
type="text" >
id="timeList_{{ id }}" <!-- {{ 'choices.delete' | translate }}-->
[(ngModel)]="timeSlice.literal" <img src="assets/icons/trash-2.svg" class="icon is-filtered-icon-primary" />
/>
</div>
<div class="column is-narrow">
<button class="button is-block has-no-border" (click)="pollService.timeList.splice(id, 1)">
<img src="assets/icons/trash-2.svg" class="icon" />
</button> </button>
</div> </div>
</div>
</div>
<div class="title" *ngIf="environment.display_count_timelist && pollService.timeList.length"> <div class="title" *ngIf="environment.display_count_timelist && pollService.timeList.length">
<span class="count-dates"> <span class="count-dates">
{{ pollService.timeList.length }} {{ pollService.timeList.length }}

View File

@ -9,6 +9,7 @@
font-weight: 700; font-weight: 700;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
}
.time-slice-list-of-a-day { .time-slice-list-of-a-day {
label { label {
@ -61,4 +62,3 @@
margin-bottom: 0; margin-bottom: 0;
} }
} }
}

View File

@ -22,7 +22,7 @@ export class StepFourComponent implements OnInit {
form: any; form: any;
showSameTimeSlices: boolean = false; showSameTimeSlices: boolean = false;
timeSlicesProposals: TimeSlices[] = timeSlicesProposals; timeSlicesProposals: TimeSlices[] = timeSlicesProposals;
display_same_hours_dialog: boolean = true; display_same_hours_dialog: boolean = false;
constructor( constructor(
private dateUtilitiesService: DateUtilitiesService, private dateUtilitiesService: DateUtilitiesService,

View File

@ -60,7 +60,7 @@
border-radius: 0.25em; border-radius: 0.25em;
background: $d-blue30; background: $d-blue30;
padding: 1em; padding: 1em;
margin-bottom: 0.5em; margin-bottom: 1rem;
hr { hr {
margin: 0.5em -1em; margin: 0.5em -1em;