<div class="col-md-12">
    <ul class="breadcrumb">
        <li><a href="#/accounting">{{'label.anchor.accounting' | translate}}</a></li>
        <li><a href="#/accounts_closure">{{'label.anchor.accountsclosure' | translate}}</a></li>
        <li class="active">{{'label.anchor.createclosure' | translate}}</li>
    </ul>
	<form name="createclosureform" novalidate="" class="form-horizontal well" ng-controller="AccountingClosureController"
	      ng-submit="submit()">
	    <api-validate></api-validate>
	    <legend>{{ 'label.heading.createclosure' | translate }}</legend>
	    <div class="form-group">
	        <label class="control-label col-sm-2">{{ 'label.input.office' | translate }}<span class="required">*</span></label>
	
	        <div class="col-sm-3">
	            <select chosen="offices" id="officeId" ng-model="formData.officeId" class="form-control"
	                    ng-options="office.id as office.name for office in offices" value="{{office.id}}"
	                    ng-change="updateLastClosed(formData.officeId)" required="required">
	                <option class="displaynone" value="">{{'label.selectoffice' | translate}}</option>
	            </select>
	            <span ng-show="lastClosed">{{ 'label.input.previouslyclosedon' | translate }} - {{lastClosed | DateFormat}}</span>
	        </div>
	    </div>
	
	    <div class="form-group">
	        <label class="control-label col-sm-2">{{ 'label.input.closingdate' | translate }}<span class="required">*</span></label>
	
	        <div class="col-sm-3">
	            <input class="form-control" id="closingDate" type="text" datepicker-pop="dd MMMM yyyy" ng-model="first.date"
	                   is-open="opened" min="'2000-01-01'" max="restrictDate" />
	        </div>
	    </div>
	
	    <div class="form-group">
	        <label class="control-label col-sm-2">{{ 'label.input.comments' | translate }}</label>
	
	        <div class="col-sm-3">
	            <textarea rows="2" ng-model="formData.comments" class="form-control"></textarea>
	        </div>
	    </div>
	    <div class="col-md-offset-3">
	        <a id="cancel" href="#/accounts_closure" class="btn btn-default">{{ 'label.button.cancel' | translate }}</a>
	        <button id="save" type="submit" class="btn btn-primary" has-permission='CREATE_GLCLOSURE'>{{ 'label.button.save' | translate }}</button>
	    </div>
	</form>
</div>