<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="folderAddEditTitle">
    <div class="modal-dialog modal-sm" role="document">
        <form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
            <div class="modal-body">
                <div class="box">
                    <div class="box-header" id="folderAddEditTitle">
                        {{title}}
                    </div>
                    <div class="box-content">
                        <div class="box-content-row" appBoxRow>
                            <label for="name">{{'name' | i18n}}</label>
                            <input id="name" type="text" name="Name" [(ngModel)]="folder.name"
                                [appAutofocus]="!editMode">
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button appBlurClick type="submit" class="primary" appA11yTitle="{{'save' | i18n}}"
                    [disabled]="form.loading">
                    <i class="fa fa-save fa-lg fa-fw" [hidden]="form.loading" aria-hidden="true"></i>
                    <i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!form.loading" aria-hidden="true"></i>
                </button>
                <button type="button" data-dismiss="modal">{{'cancel' | i18n}}</button>
                <div class="right">
                    <button #deleteBtn appBlurClick type="button" (click)="delete()" class="danger"
                        appA11yTitle="{{'delete' | i18n}}" *ngIf="editMode" [disabled]="deleteBtn.loading"
                        [appApiAction]="deletePromise">
                        <i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading" aria-hidden="true"></i>
                        <i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"
                            aria-hidden="true"></i>
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
