<div class="col-md-12" data-ng-controller="AddAccountNumberPreferencesController">
    <ul class="breadcrumb">
        <li><a href="#/accountnumberpreferences">{{'label.anchor.accountNumberPreferences' | translate}}</a></li>
        <li class="active">{{'label.anchor.addAccountNumberPreferences' | translate}}</li>
    </ul>
    <form name="addprefform" novalidate="" class="form-horizontal well" rc-submit="submit()">
        <api-validate></api-validate>
        <fieldset>
            <legend>{{'label.heading.addAccountNumberPreferences' | translate}}</legend>
            <div class="form-group">
                <label class="control-label col-sm-2">{{'label.input.accountType' | translate}}<span class="required">*</span></label>

                <div class="col-sm-3">
                    <select chosen="accountTypeOptions" id="accountType" ng-model="formData.accountType"  class="form-control"
                            ng-options="accountType.id as accountType.value for accountType in accountTypeOptions" value="{{accountType.id}}"
                            ng-change="getPrefixTypeOptions(formData.accountType)">
                        <option value="">--{{'label.menu.selectAccountType' | translate}}--</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-2">{{'label.input.addPrefix' | translate}}</label>

                <div class="col-sm-3">
                    <input id="activeCheckbox" type="checkbox" ng-model="addPrefix">
                </div>
            </div>
            <div class="form-group" ng-show="addPrefix">
                <label class="control-label col-sm-2">{{'label.input.prefixField' | translate}}</label>
                <div class="col-sm-3">
                    <select chosen="prefixTypeOptions" id="accountNumberPrefixType" ng-model="formData.prefixType"  class="form-control"
                            ng-options="accountNumberPrefixType.id as accountNumberPrefixType.value for accountNumberPrefixType in prefixTypeOptions" value="{{accountType.id}}">
                        <option value="">--{{'label.menu.selectPrefixField' | translate}}--</option>
                    </select>
                </div>
            </div>
            <div class="col-md-offset-5">
                <button id="cancel" type="reset" class="btn btn-default" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
                <button id="submit" type="button" class="btn btn-primary" ng-click="submit()" has-permission='CREATE_ACCOUNTNUMBERFORMAT'>{{'label.button.save' | translate}}</button>
            </div>
        </fieldset>
    </form>
</div>