<div class="col-md-12" ng-controller="AssignSavingsOfficerController">
    <div>
        <ul class="breadcrumb">
            <li><a href="#/viewsavingaccount/{{accountNo}}">{{'label.anchor.viewsavingsaccount' | translate}}</a></li>
            <li class="active">{{'label.anchor.assignsavingsofficer' | translate}}</li>
        </ul>
    </div>
    <form class="form-horizontal well" name="assignsavingsofficerform" novalidate="" ng-submit="submit()">
        <api-validate></api-validate>
        <fieldset>
            <legend>{{ 'label.heading.assignsavingsofficer' | translate }}</legend>
            <div class="form-group">
                <label class="control-label col-sm-2" for="toSavingsOfficerId">{{ 'label.input.tosavingsofficer' | translate }}<span
                class="required">*</span></label>

                <div class="col-sm-3">
                    <select chosen="fieldOfficers" id="toSavingsOfficerId" ng-model="formData.toSavingsOfficerId" class="form-control"
                            ng-options="fieldOfficer.id as fieldOfficer.displayName for fieldOfficer in fieldOfficers" value="{{fieldOfficer.id}}">
                        <option style="display:none" value="">{{'label.selectsavingsofficer' | translate}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-2" for="assignmentDate">{{ 'label.input.assignmentdate' | translate }}<span
                class="required">*</span></label>

                <div class="col-sm-3">
                    <input class="form-control" sort id="assignmentDate" type="text" datepicker-pop="dd MMMM yyyy"
                           ng-model="formData.assignmentDate" is-open="opened" min="minDate" max="'2020-06-22'"/>
                </div>
            </div>
            <div class="col-md-offset-3">
                <button id="cancel" type="reset" class="btn btn-default" ng-click="cancel()">{{ 'label.button.cancel' | translate
                }}
                </button>
                <button id="save" type="submit" ng-disabled="!assignsavingsofficerform.$valid"
                        has-permission='UPDATESAVINGSOFFICER_SAVINGSACCOUNT'
                        class="btn btn-primary">{{'label.button.save' | translate }}
                </button>
            </div>
        </fieldset>
    </form>
</div>