mirror of https://github.com/Chocobozzz/PeerTube
Fix checkbox description relationship
parent
a5513f5415
commit
ad396ec891
|
@ -7,8 +7,9 @@
|
||||||
(ngModelChange)="onModelChange()"
|
(ngModelChange)="onModelChange()"
|
||||||
[id]="inputName"
|
[id]="inputName"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
|
[attr.aria-describedby]="inputName + '-description'"
|
||||||
/>
|
/>
|
||||||
<span role="checkbox" [attr.aria-checked]="checked" [attr.aria-label]="labelText || labelInnerHTML"></span>
|
<span></span>
|
||||||
<span *ngIf="labelText">{{ labelText }}</span>
|
<span *ngIf="labelText">{{ labelText }}</span>
|
||||||
<span
|
<span
|
||||||
*ngIf="!labelText && labelInnerHTML"
|
*ngIf="!labelText && labelInnerHTML"
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ms-4 d-flex flex-column">
|
<div class="ms-4 d-flex flex-column">
|
||||||
<div class="wrapper form-group-description">
|
<div class="wrapper form-group-description" [id]="inputName + '-description'">
|
||||||
<ng-content select="description"></ng-content>
|
<ng-content select="description"></ng-content>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@ export class PeertubeCheckboxComponent implements ControlValueAccessor, AfterCon
|
||||||
@Input() disabled = false
|
@Input() disabled = false
|
||||||
@Input() recommended = false
|
@Input() recommended = false
|
||||||
|
|
||||||
|
describedby: string
|
||||||
|
|
||||||
@ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'label' | 'help'>>
|
@ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'label' | 'help'>>
|
||||||
|
|
||||||
labelTemplate: TemplateRef<any>
|
labelTemplate: TemplateRef<any>
|
||||||
|
|
|
@ -136,7 +136,7 @@ export class UserVideoSettingsComponent extends FormReactive implements OnInit,
|
||||||
next: () => {
|
next: () => {
|
||||||
this.authService.refreshUserInformation()
|
this.authService.refreshUserInformation()
|
||||||
|
|
||||||
if (this.notifyOnUpdate) this.notifier.success($localize`Video settings updated.`)
|
if (this.notifyOnUpdate) this.notifier.success($localize`Video settings updated.`, 'toto', 15000)
|
||||||
},
|
},
|
||||||
|
|
||||||
error: err => this.notifier.error(err.message)
|
error: err => this.notifier.error(err.message)
|
||||||
|
|
Loading…
Reference in New Issue