<form class="ml-3 mr-3" name="eitscanopt" #eitscanopt="ngForm">
    <p-card class="m-5">
        <ng-template pTemplate="title">
            {{ 'settings.eit.title' | translate }}
        </ng-template>
        <ng-template pTemplate="subtitle">
            {{ 'settings.eit.subtitle' | translate }}
        </ng-template>
        <ng-template pTemplate="content">
            <div class="grid">

                <div class="mb-4 w-full">

                    <div class="form-group field">
                        <label for="EITTransportTimeout" class="block" >{{ 'settings.eit.timeout_label' | translate }}</label>
                        <p-inputNumber [(ngModel)]="eitData.EITTransportTimeout" name="EITTransportTimeout" id="EITTransportTimeout"
                            [showButtons]="true" [min]="1" [max]="15" [step]="1"></p-inputNumber>
                        <small class="block">
                            {{ 'settings.eit.timeout_desc' | translate }}
                        </small>
                    </div>


                    <div class="form-group field">
                        <label for="EITCrawIdleStart" class="block" >{{ 'settings.eit.crawl_label' | translate }}</label>
                        <p-inputNumber [(ngModel)]="eitData.EITCrawIdleStart" name="EITCrawIdleStart" id="EITCrawIdleStart"
                            [showButtons]="true" [min]="30" [max]="7200" [step]="30"></p-inputNumber>
                        <small class="block">
                            {{ 'settings.eit.crawl_desc' | translate }}
                        </small>
                    </div>

                </div>

            </div>
        </ng-template>

        <ng-template pTemplate="footer">
            <div class="grid nogutter">
                <div class="col-12">
                    <p-message *ngIf="this.eitData.successCount > 0 && this.eitData.errorCount == 0 && !eitscanopt.dirty"
                        severity="success" text="{{ 'common.savesuccess' | translate }}" ></p-message>
                    <p-message *ngIf="this.eitData.errorCount > 0"
                        severity="error" text="{{ 'common.networkfail' | translate }}" ></p-message>
                </div>
                <p-button class="col pr-1" label="{{'common.save' | translate}}"  icon="pi pi-save" iconPos="left" (onClick)="saveForm(); eitscanopt.form.markAsPristine()"
                                 [disabled]="(!eitscanopt.dirty || false)"></p-button>
                <p-button class="col-2 help-button" label="{{'common.help' | translate}}" (onClick)="showHelp()"
                    icon="pi pi-info-circle" styleClass="p-button-info"></p-button>
            </div>
        </ng-template>
    </p-card>
</form>
