setting.user.php 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. global $myUser, $conf;
  3. User::check_access('user','configure');
  4. ?>
  5. <div class="row">
  6. <div class="col-md-12">
  7. <br>
  8. <h3>Utilisateurs</h3>
  9. <hr/>
  10. <div id="userFormAdmin" data-action="save_user">
  11. <div class="row">
  12. <div class="col-md-6">
  13. <label for="login">Identifiant :</label><small class="text-danger"> <?php echo ' (,'.$conf->get('login_forbidden_char').' interdits)'; ?> </small>
  14. <input id="login" required class="form-control" placeholder="Identifiant" type="text">
  15. </div>
  16. <div class="col-md-6">
  17. <label for="mail">Mail :</label>
  18. <input id="mail" required class="form-control" placeholder="Mail" type="text">
  19. </div>
  20. </div>
  21. <div class="row">
  22. <div class="col-md-6">
  23. <label for="password">Mot de passe :</label><small class="text-danger"> <?php echo ($conf->get('password_forbidden_char') == '' ? '' : ' ('.$conf->get('password_forbidden_char').' interdits)'); ?> </small>
  24. <input required type="password" data-show-strength data-generator data-type="password" placeholder="Mot de passe" class="form-control" id="password" autocomplete="new-password"/>
  25. </div>
  26. <div class="col-md-6">
  27. <label for="password2">Mot de passe (confirmation) :</label><small class="text-danger"> <?php echo ($conf->get('password_forbidden_char') == '' ? '' : ' ('.$conf->get('password_forbidden_char').' interdits)'); ?> </small>
  28. <input required type="password" data-type="password" placeholder="Mot de passe (confirmation)" class="form-control" id="password2" autocomplete="new-password"/>
  29. </div>
  30. </div>
  31. <div class="row">
  32. <div class="col-md-6">
  33. <label for="name">Nom :</label>
  34. <input id="name" class="form-control" placeholder="Nom" type="text">
  35. </div>
  36. <div class="col-md-6">
  37. <label for="firstname">Prénom :</label>
  38. <input id="firstname" class="form-control" placeholder="Prénom" type="text">
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col-md-6">
  43. <label for="manager">Manager :</label>
  44. <input id="manager" data-type="user" class="form-control" placeholder="Manager" type="text">
  45. </div>
  46. <div class="col-md-6 pt-4">
  47. <div onclick="save_user();" class="btn btn-success float-right"><i class="fas fa-check"></i> Enregistrer</div>
  48. </div>
  49. </div>
  50. </div>
  51. <hr>
  52. <div class="panel panel-default">
  53. <legend class="panel-heading">Liste des utilisateurs existants :</legend>
  54. <table id="users" class="table table-sm table-users table-striped">
  55. <thead>
  56. <tr>
  57. <th class="text-center">#</th>
  58. <th class="avatar-head"></th>
  59. <th>Nom</th>
  60. <th>Mail</th>
  61. <th>Identifiant</th>
  62. <th>Origine</th>
  63. <th></th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <tr data-user="{{login}}" class="hidden">
  68. <td class="align-middle text-center">{{id}}</td>
  69. <td class="text-center avatar-cell align-middle"><img class="avatar-mini avatar-rounded" data-src="{{avatar}}"/></td>
  70. <td class="align-middle">{{firstname}} {{name}}</td>
  71. <td class="align-middle">{{mail}}</td>
  72. <td class="align-middle"><code>{{login}}</code></td>
  73. <td class="align-middle">{{origin}}</td>
  74. <td class="text-right align-middle action-cell">
  75. <?php if($myUser->can('user','edit')): ?>
  76. {{#id}}<div onclick="edit_user(this)" class="btn btn-info btn-squarred btn-mini" title="Modifier"><i class="fas fa-pencil-alt"></i></div>{{/id}}
  77. <?php endif; ?>
  78. <?php if($myUser->superadmin): ?>
  79. <div onclick="window.location='action.php?action=user_impersonation&login={{formatedLogin}}';" title="Se connecter en tant que {{login}}" class="btn btn-warning btn-squarred btn-mini"><i class="far fa-meh-blank"></i></div>
  80. <?php endif; ?>
  81. <?php if($myUser->can('user','delete')): ?>
  82. {{#id}}<div onclick="delete_user(this)" class="btn btn-danger btn-squarred btn-mini"><i class="fas fa-times"></i></div>{{/id}}
  83. <?php endif; ?>
  84. </td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. </div>
  89. </div>
  90. </div>