<div class="col-md-12">
    <ul class="breadcrumb">
        <li><a href="#/accounting">{{'label.anchor.accounting' | translate}}</a></li>
        <li><a href="#/financialactivityaccountmappings">{{'label.anchor.financialactivity.accountmappings' |
            translate}}</a></li>
        <li class="active">{{'label.anchor.addfinancialmapping' | translate}}</li>
    </ul>
    <form name="createfinancialmappingform" novalidate="" class="form-horizontal well"
          ng-controller="AddFinancialMappingController"
          rc-submit="submit()">
        <api-validate></api-validate>
        <fieldset>
            <legend>{{'label.heading.add.financial.activity.mapping' | translate}}</legend>
            <div class="form-group">
                <label class="control-label col-sm-2">{{'label.input.financial.activity.type' | translate}}<span
                        class="required">*</span></label>

                <div class="col-sm-3">
                    <select id="financialActivityId" ng-model="formData.financialActivityId" class="form-control"
                            ng-options="activityOption.id as activityOption.name | translate for activityOption in financialActivityOptions"
                            value="{{activityOption.id}}"
                            ng-change="updateActivityOptions(formData.financialActivityId)">
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-2">{{'label.input.account' | translate}}<span
                        class="required">*</span></label>

                <div class="col-sm-3">
                    <select chosen="accountOptions" id="glAccountId" ng-model="formData.glAccountId"
                            class="form-control"
                            ng-options="account.id as (account.name +'('+ account.glCode +')') for account in accountOptions"
                            value="{{account.id}}">
                    </select>
                </div>
            </div>

            <div class="col-md-offset-2">
                <a id="cancel" href="#/financialactivityaccountmappings" class="btn btn-default">{{'label.button.cancel'
                    | translate}}</a>
                <button id="save" type="submit" class="btn btn-primary" has-permission='CREATE_FINANCIALACTIVITYACCOUNT'>
                    {{'label.button.save' | translate}}
                </button>
            </div>
        </fieldset>
    </form>
</div>