forked from tykayn/funky-framadate-front
validation constraints on steps
This commit is contained in:
parent
c52153770d
commit
aa9f8ff9be
@ -84,6 +84,7 @@
|
|||||||
<app-nav-steps
|
<app-nav-steps
|
||||||
[display_previous_button]="false"
|
[display_previous_button]="false"
|
||||||
[display_next_button]="true"
|
[display_next_button]="true"
|
||||||
|
[next_is_disabled]="!pollService.form.value.title"
|
||||||
[next_step_number]="pollService.step_current + 1"
|
[next_step_number]="pollService.step_current + 1"
|
||||||
[previous_step_number]="pollService.step_current - 1"
|
[previous_step_number]="pollService.step_current - 1"
|
||||||
></app-nav-steps>
|
></app-nav-steps>
|
||||||
|
@ -25,4 +25,5 @@
|
|||||||
<app-nav-steps
|
<app-nav-steps
|
||||||
[next_step_number]="pollService.step_current + 1"
|
[next_step_number]="pollService.step_current + 1"
|
||||||
[previous_step_number]="pollService.step_current - 1"
|
[previous_step_number]="pollService.step_current - 1"
|
||||||
|
[next_is_disabled]="!pollService.form.value.creatorEmail || !pollService.form.value.creatorPseudo"
|
||||||
></app-nav-steps>
|
></app-nav-steps>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<button
|
<button
|
||||||
*ngIf="display_next_button"
|
*ngIf="display_next_button"
|
||||||
class="button-next pull-right"
|
class="button-next pull-right"
|
||||||
|
[disabled]="next_is_disabled"
|
||||||
[attr.aria-label]="(is_finish_step ? 'nav.save' : 'nav.next') | translate"
|
[attr.aria-label]="(is_finish_step ? 'nav.save' : 'nav.next') | translate"
|
||||||
[ngClass]="{ 'is-finish': is_finish_step, 'is-primary': !is_finish_step }"
|
[ngClass]="{ 'is-finish': is_finish_step, 'is-primary': !is_finish_step }"
|
||||||
[routerLink]="['/administration/step/' + next_step_number]"
|
[routerLink]="['/administration/step/' + next_step_number]"
|
||||||
|
@ -23,6 +23,8 @@ export class NavStepsComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
actionBeforeNextStep: Function;
|
actionBeforeNextStep: Function;
|
||||||
|
@Input()
|
||||||
|
next_is_disabled: any = false;
|
||||||
|
|
||||||
constructor(private router: Router, public pollService: PollService) {}
|
constructor(private router: Router, public pollService: PollService) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user