Advertisement
Adrian_Apostolov

Untitled

Jan 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. extends ../index
  2.  
  3. block main-content
  4.     .container(ng-controller="SignUpController as vm")
  5.         .row
  6.             .col-md-6.col-md-offset-3
  7.                 form.form-horizontal(name='registerForm', ng-submit='registerForm.$valid')
  8.                     fieldset
  9.                         legend Register User
  10.                         .text-center.error(ng-show='registerForm.inputUsername.$error.minlength || registerForm.inputUsername.$error.minlength') Username must be between 6 and 50 symbols
  11.                         .form-group
  12.                             label.col-lg-2.control-label(for='inputUsername') User Name
  13.                             .col-lg-10
  14.                                 input#inputUsername.form-control(type='text', name='inputUsername', ng-model='user.username', ng-minlength='6', ng-maxlength='50' required='required', placeholder='User Name')
  15.                         .text-center.error(ng-show='registerForm.userMail.$error.pattern') Email is not valid !
  16.                         .form-group
  17.                             label.col-lg-2.control-label(for='inputEmail') Email
  18.                             .col-lg-10
  19.                                 input#inputEmail.form-control(name='userMail', type='text', ng-model='user.email', required='required', placeholder='Email', ng-pattern='/^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/')
  20.                         #form.form-group(ng-if='user.pictureUrl')
  21.                             label.col-lg-2.control-label Picture Preview
  22.                             .col-lg-10
  23.                                 img(ng-src='{{user.pictureUrl}}', alt='profile picture')
  24.                         .text-center.error(ng-show='registerForm.userPic.$error.pattern') Picture Url is not valid !
  25.                         .form-group
  26.                                 label.col-lg-2.control-label(for='userPicture') Picture Url
  27.                                 .col-lg-10
  28.                                     input#userPicture.form-control(name='userPic', type='text', ng-model='user.pictureUrl', placeholder='Picture Url', ng-pattern='/^https?:\/\/(?:[a-z\-]+\.)+[a-z]{2,6}(?:\/[^\/#?]+)+\.(?:jpe?g|gif|png)$/')
  29.                         .form-group
  30.                             label.col-lg-2.control-label(for='to') User Role
  31.                             .col-md-10
  32.                                 select#to.form-control(ng-model='user.roles', required='required')
  33.                                     option(value='Agent') Agent
  34.                                     option(value='Commissioner') Commissioner
  35.                         .text-center.error(ng-show='registerForm.userPassword.$error.minlength') Pasword must be at least 6 symbols long !
  36.                         .form-group
  37.                             label.col-lg-2.control-label(for='inputPassword') Password
  38.                             .col-lg-10
  39.                                 input#inputPassword.form-control(type='password', name='userPassword', ng-model='user.password', ng-minlength='6', required='required', placeholder='Password')
  40.                         .text-center.error(ng-show='user.password !== user.confirmPassword && registerForm.confirmPassword.$dirty') Confirm password is not the same as password!
  41.                         .form-group
  42.                             label.col-lg-2.control-label(for='confirmPassword') Confirm Password
  43.                             .col-lg-10
  44.                                 input#confirmPassword.form-control(type='password', name='confirmPassword', ng-model='user.confirmPassword', ng-minlength='6', required='required', placeholder='Confirm Password')
  45.                         .form-group
  46.                             .col-lg-10.col-lg-offset-2.pull-right
  47.                                 button.btn.btn-primary(ng-click='vm.signup(user)', ng-disabled='registerForm.$invalid || user.password != user.confirmPassword') Submit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement