<form name="editcodeform" novalidate="" ng-controller="EditCodeController" ng-submit="submit()">
    <div>
        <ul class="breadcrumb">
            <li><a href="#/system">{{'label.anchor.system' | translate}}</a></li>
            <li><a href="#/codes">{{'label.anchor.managecodes' | translate}}</a></li>
            <li><a href="#/viewcode/{{codeId}}">{{code.name}}</a></li>
            <li class="active">{{'label.anchor.addcodevalue' | translate}}</li>
        </ul>
        <api-validate></api-validate>
    </div>

    <h3>{{'label.heading.addcodevalue' | translate}}</h3>
        <div class="left paddedbottom10">
        <div class="col-sm-2">
            <input name="codevalue" ng-model="newEle.name" placeholder="{{ 'label.input.codevalue' | translate }}"
                   type="text" class="form-control"/>
        </div>
        <div class="col-sm-3">
            <textarea name="description" ng-model="newEle.description" placeholder="{{ 'label.input.description' | translate }}"
                   type="text" class="form-control"/>
        </div>
        <div class="col-sm-2">
            <input name="position" ng-model="newEle.position" placeholder="{{ 'label.input.position' | translate }}"
                   type="text" class="form-control"/>
        </div>
            <div class="col-sm-2">
                <input name="position" ng-model="newEle.codeScore" placeholder="{{ 'label.input.codeScore' | translate }}"
                       type="text" class="form-control"/>
            </div>
            <div class ="col-sm-2">
                <label class="control-label col-sm-2">{{'label.input.active' | translate}}</label>
                <div class="col-sm-3">
                    <input id="activeCheckbox" type="checkbox" ng-model="newEle.isActive">
                </div>
            </div>
        <div class=="col-sm-2">
            <a data-ng-click="addCv()" class="btn btn-primary" has-permission='CREATE_CODEVALUE'><i
                    class="icon-plus icon-white"></i>{{ 'label.button.add' |
                translate }}</a>
        </div>
        </div>
    <div  class="left paddedbottom10" data-ng-repeat="codevalue in codevalues">
        <input disabled="" placeholder={{codevalue.name}} type="text"/>&nbsp;&nbsp;
        <input disabled="" placeholder={{codevalue.description}} type="text"/>&nbsp;&nbsp;
        <input disabled="" placeholder={{codevalue.position}} type="text"/>&nbsp;&nbsp;
        <input disabled="" placeholder={{codevalue.codeScore}} type="text"/>&nbsp;&nbsp;
        <a ng-click='deleteCv(codevalue.id)' has-permission='DELETE_CODEVALUE'><i class="icon-remove"></i></a>
    </div>
    <div class="pull-right" data-ng-show="stat">
        <p>{{ 'label.systemdefinedcodedeletefailed' | translate }}</p>
    </div>
</form>