<div ng:controller="PageCreateController" class="row-fluid" qn:fillheight>
    <div class="toolbar cfix">
        <div class="toolbar-group">
            <h3>
                <span ng:click="back()" class="circle circle-small blue"><span class="icon-chevron-left"></span></span>
                {{$resource('pages.new')}} <span ng:show="parent"> &raquo; {{parent.Title}}</span>
            </h3>
        </div>
        <div class="toolbar-group right">
            <!--<button class="button lightblue" ng:click="create()"><i class="icon-ok"></i>Create page</button>-->
        </div>
    </div>
    <div class="form fillh">
        <form name="Page" class="form-horizontal">
            <div class="control-group required">
                <label class="control-label">{{$resource('pages.title')}} </label>
                <div class="controls">
                    <input type="text" class="col6" name="Title"  ng:Model="page.Title" required />
                    <div ng:show="errors['page.Title'][0]" class="error" >{{$resource(errors['page.Title'][0])}}</div>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{$resource('pages.alias')}}</label>
                <div class="controls">
                    <input type="text" class="col6" name="Alias" qn:Alias="page.Title" ng:model="page.Alias" />
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <label for="AllowAnonymous"><input type="checkbox" id="AllowAnonymous"  name="AllowAnonymous" ng:model="page.AllowAnonymous" /> {{$resource('pages.allow_anonymous')}}</label>
                    
                </div>
            </div>
            <div class="control-group">
               
                <div class="controls">
                     <label for="RequireSSL"><input type="checkbox" id="RequireSSL" name="RequireSSL" ng:model="page.RequireSSL" /> {{$resource('pages.ssl')}}</label>
                    
                </div>
            </div>
            <div class="control-group">
                
                <div class="controls">
                    <label for="Navigable"><input type="checkbox" id="Navigable" name="Navigable" ng:model="page.Navigable" /> {{$resource('pages.navigable')}}</label>
                    
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{$resource('pages.page_status')}}</label>
                <div class="controls">
                    <select name="page.Status" ng:Model="page.Status">
                        <option value="2">{{$resource('pages.live')}}</option>
                        <option value="0">{{$resource('pages.draft')}}</option>
                        <option value="1">{{$resource('pages.pending')}}</option>
                    </select>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">{{$resource('pages.page_type')}}</label>
                <div class="controls">
                    <select name="page.PageType" ng:Model="page.PageType">
                        <option value="Normal">{{$resource('pages.standard')}}</option>
                        <option value="Group">{{$resource('pages.group')}}</option>
                        <option value="External">{{$resource('pages.external')}}</option>
                        <option value="InternalRedirect">{{$resource('pages.internal')}}</option>
                    </select>
                </div>
            </div>
            <div class="control-group" ng:show="page.PageType=='External'">
                <label class="control-label">{{$resource('pages.url')}}</label>
                <div class="controls">
                    <input class="col6" type="text" name="ExternalUrl" ng:model="page.ExternalUrl" />
                   
                </div>
            </div>
            <div class="control-group" ng:show="page.PageType=='InternalRedirect'">
                <label class="control-label">{{$resource('pages.choose_page')}}</label>
                <div class="controls">
                    <select  qn:Treeselector="treeOptions" qn:Treedata="pages" ng:model="page.InternalRedirectID" name="InternalRedirectID"></select>
                  
                </div>
            </div>
            <br/>
            <div class="control-group">
                <label class="control-label"></label>
                <div class="controls">
                    <button class="button green"  ng:click="create()">{{$resource('pages.create')}}</button>
                    <button type="button" class="button" ng:click="back()">{{$resource('pages.cancel')}}</button>
                </div>
            </div> 
        </form>
    </div>
</div>