Advertisement
Adrian_Apostolov

Untitled

Jan 10th, 2016
79
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="MissionController as vm")
  5.         .row
  6.             .col-md-6.col-md-offset-3
  7.                 form.form-horizontal(name='addMissionForm', ng-submit='addMissionForm.$valid')
  8.                     fieldset
  9.                         legend Add Mission
  10.                         .text-center.error(ng-show='addMissionForm.postedBy.$error.minlength || addMissionForm.postedBy.$error.maxLength') PostedBy name must be between 6 and 50 symbols
  11.                         .form-group
  12.                             label.col-lg-2.control-label(for='postedBy') PostedBy
  13.                             .col-lg-10
  14.                                 input#postedBy.form-control(type='text', name='postedBy', ng-model='vm.mission.postedBy', required='required' disabled='disabled')
  15.                         .text-center.error(ng-show='addMissionForm.location.$error.minlength || addMissionForm.location.$error.maxLength') Location must be between 3 and 50 symbols !
  16.                         .form-group
  17.                             label.col-lg-2.control-label(for='location') Location
  18.                             .col-lg-10
  19.                                 input#location.form-control(name='location', type='text', ng-model='vm.mission.location', ng-minlength='3', ng-maxlength='50', required='required', placeholder='Location')
  20.                         .text-center.error(ng-show='addMissionForm.missionTarget.$error.minlength') Mission target must be between 6 and 50 symbols !
  21.                         .form-group
  22.                             label.col-lg-2.control-label(for='missionTarget') Mission Target
  23.                             .col-lg-10
  24.                                 input#missionTarget.form-control(name='missionTarget',ng-minlength='6', ng-maxlength='50' type='text', ng-model='vm.mission.missionTarget', placeholder='Mission Target')
  25.                         .text-center.error(ng-show='addMissionForm.userPic.$error.pattern') Picture Url is not valid !
  26.                         .form-group
  27.                             label.col-lg-2.control-label(for='targetPicture') Picture Url
  28.                             .col-lg-10
  29.                                 input#targetPicture.form-control(name='targetPicture', type='text', ng-model='vm.mission.targetPicture', placeholder='Picture Url', ng-pattern='/^https?:\/\/(?:[a-z\-]+\.)+[a-z]{2,6}(?:\/[^\/#?]+)+\.(?:jpe?g|gif|png)$/')
  30.                         .text-center.error(ng-show='addMissionForm.award.$error.min') Award must be less then 0 !
  31.                         .form-group
  32.                             label.col-lg-2.control-label(for='award') Award
  33.                             .col-lg-10
  34.                                 input#award.form-control(type='number', name='userPassword', ng-model='vm.mission.award', min='0', required='required')
  35.                         .text-center.error(ng-show='addMissionForm.difficult.$error.min') Difficult must be less then 0 !
  36.                         .form-group
  37.                             label.col-lg-2.control-label(for='difficult') Difficult
  38.                             .col-lg-10
  39.                                 input#difficult.form-control(type='number', name='difficult', ng-model='vm.mission.difficult', min='0', required='required')
  40.                         .form-group
  41.                             label.col-lg-2.control-label(for='description') Difficult
  42.                             .col-lg-10
  43.                                 textarea#description.form-control(rows="4" cols="50", name='description', ng-model='vm.mission.description', required='required', placeholder='Description...')
  44.                         .form-group
  45.                             .col-lg-10.col-lg-offset-2.pull-right
  46.                                 button.btn.btn-primary(ng-click='vm.addMission(vm.mission)', ng-disabled='addMissionForm.$invalid') Add
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement