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

View File

@ -9,8 +9,9 @@
font-weight: 700;
margin-bottom: 1rem;
}
}
.time-slice-list-of-a-day {
.time-slice-list-of-a-day {
label {
line-height: 2.25rem;
margin-bottom: 0;
@ -60,5 +61,4 @@
margin-right: 0;
margin-bottom: 0;
}
}
}

View File

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

View File

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