<div class="modal-header">
    <h3 class="modal-title" ng-show="editingMode" translate>PASSWORD_GROUP_MANAGEMENT.EDIT_PASSWORD_GROUP</h3>
    <h3 class="modal-title" ng-hide="editingMode" translate>PASSWORD_GROUP_MANAGEMENT.ADD_PASSWORD_GROUP</h3>
</div>

<form name="modalForm" ng-submit="submit()" novalidate>
    <div class="modal-body">

        <div class="form-group row">
            <label for="inputName" class="col-sm-2 col-form-label" translate>WORDS.NAME</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputName" name="inputName" ng-model="data.name" ng-maxlength=32 required>
                <div class="invalid-feedback d-block" ng-if="modalForm.inputName.$error.required" ng-show="modalForm.$submitted" translate>VALIDATION.REQUIRED</div>
                <div class="invalid-feedback d-block" ng-if="modalForm.inputName.$error.maxlength" ng-show="modalForm.$submitted" translate-value-characters="32" translate>VALIDATION.MAX_LENGTH</div>
                <div class="invalid-feedback d-block" ng-if="formErrors.name">{{formErrors.name}}</div>
            </div>
        </div>

        <div class="form-group row">
            <label for="inputName" class="col-sm-2 col-form-label" translate>WORDS.ICON</label>
            <div class="col-sm-10">
                <div style="overflow: auto; height: 300px; width: 100%;">
                    <label class="btn btn-light btn-sm mr-1" ng-model="radio.model" uib-btn-radio="icon" style="min-width: 45px;" ng-repeat="icon in icons">
                        <i class="fa fa-fw" ng-class="icon" aria-hidden="true"></i>
                    </label>
                </div>
                <div class="invalid-feedback d-block" ng-if="formErrors.icon">{{formErrors.icon}}</div>
            </div>
        </div>

    </div>

    <div class="modal-footer">
        <button class="btn btn-light" type="button" ng-click="cancel()" translate>WORDS.CANCEL</button>
        <button class="btn btn-primary" type="submit" ladda="isLaddaWorking" ng-if="!editingMode">{{ 'WORDS.ADD'|translate }}</button>
        <button class="btn btn-primary" type="submit" ladda="isLaddaWorking" ng-if="editingMode">{{ 'WORDS.EDIT'|translate }}</button>
    </div>
</form>
