<div class="usky-grid usky-grid-configuration" ng-controller="Umbraco.PropertyEditors.GridPrevalueEditor.EditConfigController as vm">

    <umb-editor-view>

        <form novalidate name="EditConfigForm" val-form-manager>

            <umb-editor-header
                name="model.title"
                name-locked="true"
                hide-alias="true"
                hide-icon="true"
                hide-description="true">
            </umb-editor-header>

            <umb-editor-container>
                <umb-box>
                    <umb-box-content>

                        <ng-form name="vm.gridConfigEditor">

                            <h4>{{model.name}}</h4>
                            <p>Settings will only save if the entered json configuration is valid</p>

                            <div data-element="code-editor"
                                 auto-scale="85"
                                 umb-ace-editor="vm.aceOption"
                                 model="vm.configJson">
                            </div>

                            <div class="alert alert-error mt3" ng-show="vm.gridConfigEditor.$invalid === true">
                                This configuration is not valid json, and will not be saved.
                            </div>

                        </ng-form>

                    </umb-box-content>
                </umb-box>
            </umb-editor-container>

            <umb-editor-footer>
                <umb-editor-footer-content-right>
                    <umb-button
                        type="button"
                        button-style="link"
                        label-key="general_close"
                        shortcut="esc"
                        action="vm.close()">
                    </umb-button>
                    <umb-button
                        type="button"
                        button-style="success"
                        label-key="general_submit"
                        action="vm.submit()">
                    </umb-button>
                </umb-editor-footer-content-right>
            </umb-editor-footer>

        </form>

    </umb-editor-view>

</div>
