Guest User

Untitled

a guest
Jan 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. {
  2. firstname:"Sameer"
  3. isActive:true
  4. lastname:"Mohamed"
  5. password:"$2a$10$i5Or69.1qRKN8.PSzybkc.2D2fPfGJCf9gwfjpE1JAF4rFUmpbC8i"
  6. role:"client"
  7. username:"ganesh"
  8. }
  9.  
  10. input#Active(type='radio', value='1', ng-model='editClientData.isActive') Active
  11.  
  12. input#Inactive(type='radio', value='0', ng-model='editClientData.isActive') Block
  13.  
  14. table.table
  15. tr(style='font-size:14px;')
  16. th(style='display : none;') S.no
  17. th User Name
  18. th First Name
  19. th Role
  20. th Status
  21. th Operations
  22. tr(style='font-size:14px;' ng-repeat='admin in admins | filter:test' ng-if="admin.role === 'client'")
  23. td(style='display : none;') {{$index+1}}
  24. td {{admin.username}}
  25. td {{admin.firstname}}
  26. td {{admin.role}}
  27. td {{true == admin.isActive ? 'Active' : 'Blocked' }}
  28. td
  29. a(ng-click='editClient(admins[$index])',data-toggle='modal', data-target='#editClientModal')
  30. i.fa.fa-pencil    
  31. #editClientModal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='myModalLabel', aria-hidden='true')
  32. .modal-dialog(role='document')
  33. .modal-content
  34. .modal-header
  35. button.modal-close(type='button', data-dismiss='modal', aria-label='Close')
  36. i.font-icon-close-2
  37. h4#myModalLabel.modal-title Edit Client
  38. .modal-body
  39. .form-group
  40. label Username
  41. input.form-control(type='text', placeholder='',ng-model='editClientData.username')
  42. .form-group
  43. label Firstname
  44. input.form-control(type='text', placeholder='',ng-model='editClientData.firstname')
  45. .form-group
  46. label Lastname
  47. input.form-control(type='text', placeholder='',ng-model='editClientData.lastname')
  48. .form-group
  49. span.control-label Status
  50. span.text-danger *
  51. |    
  52. input#Active(type='radio', value='1', ng-model='editClientData.isActive')
  53. span(for='Active') Active
  54. |    
  55. input#Inactive(type='radio', value='0', ng-model='editClientData.isActive')
  56. span(for='Inactive') Block
  57.  
  58. // get admins
  59. $http({
  60. method: 'GET',
  61. url: '/api/getadmins'
  62. }).then(function (response) {
  63. $scope.admins = response.data;
  64. }, function (response) {
  65. window.location.href = '/';
  66. });
Add Comment
Please, Sign In to add comment