<div ng:controller="UserCreateController" class="row-fluid" id="body-main" qn:fillheight>
    <div class="toolbar cfix">
        <div class="toolbar-group">
            <h3>
                <span ng:click="back()" class="circle circle-small blue"><span class="icon li_user"></span></span>
                New User
            </h3>
        </div>
        <div class="toolbar-group right">
            <button title="{{$resource('utility.home')}}" class="button tooltip" ng:click="back()"><i class="icon-angle-left"></i></button>
        </div>
    </div>
    <div class="form form-horizontal fillh">
        <form name="User" class="form-horizontal">
            <div class="control-group required">
                <label class="control-label">{{$resource('users.first_name')}}</label>
                <div class="controls">
                    <input type="text" class="col6" name="FirstName" ng:model="user.FirstName" required />
                    <div ng:show="errors['model.FirstName'][0]" class="error" >{{$resource(errors['model.FirstName'][0])}}</div>
                </div>
            </div>
        
            <div class="control-group required">
                <label class="control-label">{{$resource('users.last_name')}}</label>
                <div class="controls">
                    <input type="text" class="col6" name="LastName" ng:model="user.LastName" required />
                    <div ng:show="errors['model.LastName'][0]" class="error" >{{$resource(errors['model.LastName'][0])}}</div>
                </div>
            </div>
        
            <div class="control-group required">
                <label class="control-label">{{$resource('users.email')}}</label>
                <div class="controls">
                    <input class="col6"  type="email" name="Email" ng:model="user.Email" required />
                    <div ng:show="errors['model.Email'][0]" class="error" >{{$resource(errors['model.Email'][0])}}</div>
                </div>
            </div>
        
            <div class="control-group required">
                <label class="control-label">{{$resource('users.password')}}</label>
                <div class="controls">
                    <input class="col6" type="password" name="Password" ng:model="user.Password" required />
                    <div ng:show="errors['model.Password'][0]" class="error" >{{$resource(errors['model.Password'][0])}}</div>
                </div>
            </div>
            <div class="control-group required">
                <label class="control-label">{{$resource('users.confirm_pass')}}</label>
                <div class="controls">
                    <input class="col6" type="password" name="ConfirmPassword" ng:model="user.ConfirmPassword" required />
                    <div ng:show="errors['model.ConfirmPassword'][0]" class="error" >{{$resource(errors['model.ConfirmPassword'][0])}}</div>
                </div>
            </div>
            <div class="control-group required">
                <label class="control-label">{{$resource('users.roles')}}</label>
                <div class="controls" >
                    <select qn:multiselect="" multiple="multiple" ng:model="user.Roles" ng:options="role.Value as role.Name for role in roles" required></select>
                  <!--  <div ng:show="errors['model.Roles'][0]" class="error" >{{$resource(errors['model.Roles'][0])}}</div>-->
                </div>
            </div>
            <div>
                <label class="control-label">{{$resource('users.teams')}}</label> <br/><br/>
                <div class="control-group">
                    <div class="controls">
                        <input qn:Treeselector="treeOptions" qn:Treedata="classification" ng:model="Labels['team']" />
                    </div>
                </div>
            </div>
            <br/>
            <div class="control-group">
                <label class="control-label"></label>
                <div class="controls">
                    <button class="button green" ng:click="create()">{{$resource('users.create')}}</button>
                    <button type="button" class="button" ng:click="back()">{{$resource('users.cancel')}}</button>
                </div>
            </div> 
        </form>
    </div>
</div>