<form name="form" class="form-horizontal form-validation" role="form" novalidate> <div class="form-group mt-20"> <label for="name" class="col-sm-3 control-label">Name</label> <div class="col-sm-9"> <input type="text" name="name" class="form-control" id="name" placeholder="User name..." ng-model="user.name"> </div> </div> <div class="form-group" ng-show="user.changeEmail"> <label for="email" class="col-sm-3 control-label">Email <span class="text-danger" style="font-size: 15px">*</span></label> <div class="col-sm-9"> <input type="email" name="email" class="form-control" id="email" placeholder="User email..." ng-model="user.email" required> </div> </div> <div class="form-group" ng-show="user.changePass && editing"> <label for="oldpassword" class="col-sm-3 control-label">Old Password <span class="text-danger" style="font-size: 15px">*</span></label> <div class="col-sm-9"> <input type="password" name="oldpassword" class="form-control" id="oldpassword" placeholder="User old password..." ng-model="user.oldpassword" ng-required="user.changePass && editing"> </div> </div> <div class="form-group" ng-show="user.changePass || user.changeEmail"> <label for="password" class="col-sm-3 control-label">Password <span class="text-danger" style="font-size: 15px">*</span></label> <div class="col-sm-9"> <input type="password" name="password" class="form-control" id="password" placeholder="User password..." ng-model="user.password" ng-required="user.changePass || user.changeEmail"> </div> </div> <div class="form-group" ng-show="user.changePass || user.changeEmail"> <label for="password" class="col-sm-3 control-label">Password Confirm <span class="text-danger" style="font-size: 15px">*</span></label> <div class="col-sm-9"> <input type="password" name="passwordConfirm" placeholder="Password confirmarion..." class="form-control" ng-model="user.passwordConfirm" ui-validate=" '$value==user.password' " ui-validate-watch=" 'user.password' " ng-required="user.changePass || user.changeEmail"> </div> </div> <div class="form-group"> <label for="role" class="col-sm-3 control-label">Role <span class="text-danger" style="font-size: 15px">*</span></label> <div class="col-sm-9"> <select chosen="{width: '100%'}" name="role" class="form-control" id="role" ng-options="v for (k,v) in roles" ng-model="user.role" data-placeholder="Select a role..." required> <option> </select> </div> </div> <div class="form-group"> <label for="street" class="col-sm-3 control-label">Street</label> <div class="col-sm-9"> <input type="text" name="street" class="form-control" id="street" placeholder="User address street..." ng-model="user.address.street"> </div> </div> <div class="form-group"> <label for="city" class="col-sm-3 control-label">City</label> <div class="col-sm-9"> <input type="text" name="city" class="form-control" id="city" placeholder="User address city..." ng-model="user.address.city"> </div> </div> <div class="form-group"> <label for="zip" class="col-sm-3 control-label">ZIP</label> <div class="col-sm-9"> <input type="text" name="zip" class="form-control" id="zip" placeholder="User address zip..." ng-model="user.address.zip"> </div> </div> <div class="form-group"> <label for="country" class="col-sm-3 control-label">Country</label> <div class="col-sm-9"> <input type="text" name="country" class="form-control" id="country" placeholder="User address country..." ng-model="user.address.country"> </div> </div> <div class="form-group"> <label for="phone" class="col-sm-3 control-label">Phone</label> <div class="col-sm-9"> <input type="text" name="phone" class="form-control" id="phone" placeholder="User address phone..." ng-model="user.phone"> </div> </div> <div class="form-group mt-40" ng-hide="!editing"> <div class="col-sm-9 col-md-offset-3"> <label class="checkbox checkbox-custom-alt inline mr-20"> <input type="checkbox" ng-click="user.changeEmail = !user.changeEmail" ng-disabled="user.changePass"><i></i> Change email </label> <label class="checkbox checkbox-custom-alt inline"> <input type="checkbox" ng-click="user.changePass = !user.changePass" ng-disabled="user.changeEmail"><i></i> Change password </label> </div> </div> <div class="form-footer"> <button class="btn btn-success b-0 pull-right" ng-click="ok()" ng-disabled="form.$invalid">Submit</button> <button class="btn btn-lightred btn-ef btn-ef-4 btn-ef-4c" ui-sref="app.users.list"><i class="fa fa-arrow-left"></i> Cancel</button> </div> </form>