step 5 : checkboxes withotu material design

This commit is contained in:
Tykayn 2022-02-16 16:05:06 +01:00 committed by tykayn
parent b437647064
commit 61bb08f9ff
3 changed files with 71 additions and 17 deletions

View File

@ -42,7 +42,7 @@
/> />
</div> </div>
<button <button
*ngIf="form.controls.custom_url.value" *ngIf="form.controls.custom_url.value && display_regen_slug"
aria-label="Clear" aria-label="Clear"
(click)="form.patchValue({ custom_url: pollService.makeSlug(form) })" (click)="form.patchValue({ custom_url: pollService.makeSlug(form) })"
> >
@ -60,9 +60,7 @@
</p> </p>
<div class="password-box"> <div class="password-box">
<input <input
#password
id="password_first" id="password_first"
matInput
[type]="displayClearPassword ? 'text' : 'password'" [type]="displayClearPassword ? 'text' : 'password'"
formControlName="password" formControlName="password"
required required
@ -94,13 +92,18 @@
<i class="fa fa-eye-slash" *ngIf="displayClearPassword"></i> <i class="fa fa-eye-slash" *ngIf="displayClearPassword"></i>
</button> </button>
<div class="pass-validation" *ngIf="form.value.password == form.value.password_repeat"> <div class="pass-validation" *ngIf="form.value.password == form.value.password_repeat">
<img class="icon" aria-hidden="true" src="assets/icons/book.svg" /> <p class="pass-validation-text">
<img class="icon" aria-hidden="true" src="assets/icons/check-grey-round.svg" />
{{ 'advanced.password_validation_ok' | translate }} {{ 'advanced.password_validation_ok' | translate }}
</p>
</div> </div>
<div class="visibility_password_results"> <div class="visibility_password_results">
<mat-checkbox class="is-not-flex" formControlName="areResultsPublic"> <label for="areResultsPublic" class="aside-label">
<input type="checkbox" formControlName="areResultsPublic" id="areResultsPublic" />
<span class="label-text">
{{ 'advanced.password_display_without' | translate }} {{ 'advanced.password_display_without' | translate }}
</mat-checkbox> </span>
</label>
</div> </div>
</div> </div>
</div> </div>
@ -141,14 +144,28 @@
{{ 'advanced.notifications_description' | translate }} {{ 'advanced.notifications_description' | translate }}
</p> </p>
<div class="choice"> <div class="choice">
<mat-checkbox class="is-not-flex" formControlName="isOwnerNotifiedByEmailOnNewComment"> <label for="areResultsPublic" class="aside-label">
<input
type="checkbox"
formControlName="isOwnerNotifiedByEmailOnNewComment"
id="isOwnerNotifiedByEmailOnNewComment"
/>
<span class="label-text">
{{ 'advanced.notifications_vote' | translate }} {{ 'advanced.notifications_vote' | translate }}
</mat-checkbox> </span>
</label>
</div> </div>
<div class="choice"> <div class="choice">
<mat-checkbox class="is-not-flex" formControlName="isOwnerNotifiedByEmailOnNewVote"> <label for="areResultsPublic" class="aside-label">
<input
type="checkbox"
formControlName="isOwnerNotifiedByEmailOnNewVote"
id="isOwnerNotifiedByEmailOnNewVote"
/>
<span class="label-text">
{{ 'advanced.notifications_comment' | translate }} {{ 'advanced.notifications_comment' | translate }}
</mat-checkbox> </span>
</label>
</div> </div>
</div> </div>

View File

@ -5,20 +5,49 @@
margin-left: 1em; margin-left: 1em;
} }
} }
.aside-label {
min-height: 1.5rem;
width: 100%;
display: inline-block;
margin-left: 0.5em;
line-height: 2.5rem;
img,
input {
float: left;
min-height: 1.5rem;
margin-right: 1rem;
}
margin-bottom: 0.5rem;
}
input, input,
textarea { textarea {
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 1.5em; margin-bottom: 1.5em;
width: 100%; width: 100%;
&[type='checkbox'] {
width: 1.5rem;
height: 1.5rem;
border-radius: 0.5rem;
border: solid 1px $font_color;
float: left;
}
+ label {
height: 1.5rem;
width: 90%;
display: inline-block;
margin-left: 0.5em;
float: left;
clear: right;
}
} }
.domain-custom-box { .domain-custom-box {
border-radius: 3px; border-radius: 3px;
height: 1.5em; height: 1.5em;
width: 100%; width: 100%;
margin: 1rem;
display: block; display: block;
padding: 0;
margin: 0 0 1rem;
.domain { .domain {
border: solid 1px #eee; border: solid 1px #eee;
@ -27,6 +56,8 @@ textarea {
width: 40%; width: 40%;
background: #ddd; background: #ddd;
text-align: right; text-align: right;
overflow: hidden;
text-overflow: ellipsis;
} }
.inline-input { .inline-input {
@ -36,7 +67,8 @@ textarea {
background: #fff; background: #fff;
margin: 0; margin: 0;
float: left; float: left;
width: 49%; width: 59%;
line-height: 1.5rem;
} }
} }
.permissions-modification { .permissions-modification {
@ -50,3 +82,7 @@ textarea {
width: 90%; width: 90%;
} }
} }
.pass-validation-text {
@extend .aside-label;
line-height: 1.6rem;
}

View File

@ -18,6 +18,7 @@ export class AdvancedConfigComponent implements OnInit {
@Input() @Input()
public form: FormGroup; public form: FormGroup;
domain_url: string; domain_url: string;
display_regen_slug: boolean = false;
constructor(public pollService: PollService) {} constructor(public pollService: PollService) {}
ngOnInit(): void { ngOnInit(): void {