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

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

                    <div class="form-group field">
                        <label for="BackendStopCommand" class="label block">{{ 'settings.backendctrl.stop_label' | translate
                            }}</label>
                        <input pInputText id="BackendStopCommand" [(ngModel)]="BackendStopCommand"
                            name="BackendStopCommand" #MiscStatusScript="ngModel" class="mb-2 form-control w-full" />
                        <small class="block">
                            {{ 'settings.backendctrl.stop_desc' | translate }}
                        </small>
                    </div>

                    <div class="form-group field">
                        <label for="BackendStartCommand" class="label block">{{ 'settings.backendctrl.start_label' | translate
                            }}</label>
                        <input pInputText id="BackendStartCommand" [(ngModel)]="BackendStartCommand"
                            name="BackendStartCommand" #MiscStatusScript="ngModel" class="mb-2 form-control w-full" />
                        <small class="block">
                            {{ 'settings.backendctrl.start_desc' | translate }}
                        </small>
                    </div>

                </div>

            </div>
        </ng-template>

        <ng-template pTemplate="footer">
            <div class="grid nogutter">
                <div class="col-12">
                    <p-message
                        *ngIf="this.successCount > 0 && this.errorCount == 0 && !backendcontrol.dirty"
                        severity="success" text="{{ 'common.savesuccess' | translate }}"></p-message>
                    <p-message *ngIf="this.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(); backendcontrol.form.markAsPristine()"
                    [disabled]="!backendcontrol.dirty || setupService.schedulingEnabled"></p-button>
            </div>
        </ng-template>
    </p-card>
</form>