<div class="col-md-12">
    <ul class="breadcrumb">
        <li><a href="#/organization">{{'label.anchor.organization' | translate}}</a></li>
        <li class="active">{{'label.anchor.managefunds' | translate}}</li>
    </ul>
	<form name="managefundform" class="well" novalidate ng-controller="ManageFundsController">
		<legend>{{'label.heading.managefunds' | translate}}</legend>
		<div class="row">
		    <div class="form-group">
		        <div class="col-md-7">
		            <input name="fund" ng-autofocus="true" class="form-control"
		                   ng-model="newfund"
		                   placeholder="{{'label.input.newfund' | translate}}"
		                   type="text"
		                    />
		        </div>
		        <div class="col-md-1">
		            <a class="btn bg-primary" ng-click='addFund()' has-permission='CREATE_FUND'><i class="icon-plus"></i></a>
		        </div>
		        <div class="col-md-4">
		            <span ng-show="managefundform.fund.$invalid || funderror">
		                <small class="error" ng-show="managefundform.fund.$error.req || funderror">
		                    {{ 'label.requiredfield' | translate }}
		                </small>
		            </span>
		        </div>
				<div class="clear"><br></div>
		        <div ng-repeat="fund in funds">
		            <div class="col-md-3">
		                <input data-ng-hide="fund.edit" disabled="" class="form-control"
		                       placeholder={{fund.name}} type="text"/>
		                <input data-ng-show="fund.edit" class="form-control" data-ng-model="formData[fund.id]"
		                       type="text"/>
		                &nbsp;&nbsp;
		            </div>
		            <div class="col-sm-1">
		                <a data-ng-hide="fund.edit" class="btn btn-primary"
		                        has-permission='UPDATE_FUND'
		                        data-ng-click="editFund(fund,fund.name,fund.id)"><i
		                        class="icon-edit icon-white"></i></a>
		                <a data-ng-show="fund.edit" class="btn btn-primary"
		                        has-permission='UPDATE_FUND'
		                        data-ng-click="saveFund(fund.id)">{{'label.anchor.save' |
		                    translate}}
		                </a>
		            </div>
		        </div>
		    </div>
		</div>
	</form>
</div>