<form novalidate name="contentForm"
    ng-controller="Umbraco.Dialogs.Content.EditController"
    ng-show="loaded"
    ng-submit="save()"
    val-form-manager>

	<div class="umb-panel">
		<div class="umb-panel-header">
			<umb-content-name
			    placeholder="@placeholders_entername"
			    ng-model="content.name"/>
		</div>

		<div class="umb-panel-body with-footer">
            <div id="tab{{tab.id}}" ng-repeat="tab in content.tabs">
                <div class="umb-pane" ng-if="!tab.hide">
                    <h5>{{tab.label}}</h5>
                    <umb-property property="property"
                                  ng-repeat="property in tab.properties">
                        <umb-editor model="property"></umb-editor>
                    </umb-property>
                </div>
            </div>    
		</div>


		<div class="umb-panel-footer" >
			<div class="umb-el-wrap umb-panel-buttons">
		        <div class="btn-toolbar umb-btn-toolbar pull-right">
		        	<a href ng-click="close()" class="btn btn-link">
		        		<localize key="general_close">Close</localize>
					</a>
		        

                    <div class="btn-group dropup" ng-if="defaultButton">
                        <!-- primary button -->
                        <a class="btn btn-success" href="#" ng-click="performAction(defaultButton)" prevent-default>
                            <localize key="{{defaultButton.labelKey}}">{{defaultButton.labelKey}}</localize>
                        </a>

                        <a class="btn btn-success dropdown-toggle" data-toggle="dropdown" ng-if="subButtons.length > 0">
                            <span class="caret"></span>
                        </a>

                        <!-- sub buttons -->
                        <ul class="dropdown-menu bottom-up" role="menu" aria-labelledby="dLabel" ng-if="subButtons.length > 0">
                            <li ng-repeat="btn in subButtons">
                                <a href="#" ng-click="performAction(btn)" prevent-default>
                                    <localize key="{{btn.labelKey}}">{{btn.labelKey}}</localize>
                                </a>
                            </li>
                        </ul>
                    </div>
			        
		        </div>

		      </div>
			</div>
		</div>
	</div>
</form>