<div class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-6">
                <h2>{{::vm.translate.get('Product Attributes')}}</h2>
            </div>
        </div>
    </div>
</div>

<section class="content">
    <div class="container-fluid">
        <div class="card">
            <div class="card-header">
                <h2 class="card-title ng-binding ng-scope" ng-if="!vm.isEditMode">{{::vm.translate.get('Create Product Attribute')}}</h2>
                <h2 class="card-title ng-binding ng-scope" ng-if="vm.isEditMode">{{::vm.translate.get('Edit Product Attribute')}}</h2>
            </div>
            <div class="card-body">
                <form name="brandForm" class="form-horizontal">
                    <div class="col-sm-offset-2 bg-danger" ng-show="vm.validationErrors">
                        <ul>
                            <li ng-repeat="error in vm.validationErrors">{{error}}</li>
                        </ul>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{::vm.translate.get('Name')}}</label>
                        <div>
                            <input name="name" ng-model="vm.productAttribute.name" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{::vm.translate.get('Group')}}</label>
                        <div>
                            <select class="form-control" ng-model="vm.productAttribute.groupId"
                                    ng-options="group.id as group.name for group in vm.productAttributeGroups">
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div>
                            <button class="btn btn-success float-right" ng-click="vm.save()"><span class="fa fa-save"></span> {{::vm.translate.get('Save')}}</button>
                            <button ui-sref="product-attribute" class="btn btn-default">{{::vm.translate.get('Cancel')}}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
