mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
form and radio button
This commit is contained in:
parent
eb1fffb628
commit
7d0d04954c
@ -15,6 +15,8 @@
|
||||
{{ 'LANGUAGES.' + currentLang.toUpperCase() | translate }}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<form action="#/administration/step/{{ pollService.step_current }}">
|
||||
<p-dialog
|
||||
[modal]="true"
|
||||
[(visible)]="display_lang_dialog"
|
||||
@ -48,17 +50,29 @@
|
||||
</h1>
|
||||
|
||||
<div class="list-of-langs">
|
||||
<button
|
||||
<div *ngFor="let language of availableLanguages" (click)="language_to_apply = language">
|
||||
<label
|
||||
[attr.for]="'#lang_' + language"
|
||||
class="lang-element button"
|
||||
[ngClass]="{ 'is-primary': language_to_apply === language, 'is-current': language === currentLang }"
|
||||
*ngFor="let language of availableLanguages"
|
||||
value="{{ language }}"
|
||||
(click)="language_to_apply = language"
|
||||
[ngClass]="{
|
||||
'is-primary': language_to_apply === language,
|
||||
'is-current': language === currentLang
|
||||
}"
|
||||
>
|
||||
<!-- {{ language }} - -->
|
||||
<input
|
||||
class="pull-left"
|
||||
type="radio"
|
||||
value="{{ language }}"
|
||||
name="lang_to_apply"
|
||||
lang="{{ language }}"
|
||||
[(ngModel)]="language_to_apply"
|
||||
[attr.id]="'#lang_' + language"
|
||||
(click)="language_to_apply = language"
|
||||
/>
|
||||
{{ language }} -
|
||||
{{ 'LANGUAGES.' + language.toUpperCase() | translate }}
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -73,4 +87,5 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
</p-dialog>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -39,9 +39,14 @@
|
||||
border: 0;
|
||||
border-radius: 2rem;
|
||||
padding: 0.5rem 0.25rem;
|
||||
padding-right: 1rem;
|
||||
|
||||
&:hover {
|
||||
background: $d-neutral;
|
||||
background: $primary_color;
|
||||
color: $white;
|
||||
}
|
||||
input {
|
||||
height: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ export class LanguageSelectorComponent implements OnInit {
|
||||
public availableLanguages: any = ['FR', 'EN', 'ES'];
|
||||
language: string;
|
||||
language_to_apply: string;
|
||||
display_lang_dialog: boolean = false;
|
||||
display_lang_dialog: boolean = true;
|
||||
|
||||
constructor(
|
||||
private languageService: LanguageService,
|
||||
|
Loading…
Reference in New Issue
Block a user