password-policy.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <h1>{{:: 'authentication' | translate}}</h1>
  3. <kc-tabs-authentication></kc-tabs-authentication>
  4. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
  5. <table class="table table-striped table-bordered">
  6. <caption class="hidden">{{:: 'table-of-password-policies' | translate}}</caption>
  7. <thead>
  8. <tr ng-show="(serverInfo.passwordPolicies|removeSelectedPolicies:policy).length > 0">
  9. <th colspan="5" class="kc-table-actions">
  10. <div class="pull-right">
  11. <div>
  12. <select class="form-control" ng-model="selectedPolicy"
  13. ng-options="policy as policy.displayName for policy in (serverInfo.passwordPolicies|removeSelectedPolicies:policy) track by policy.id"
  14. data-ng-change="addPolicy(selectedPolicy); selectedPolicy = null">
  15. <option value="" disabled selected>{{:: 'add-policy.placeholder' | translate}}</option>
  16. </select>
  17. </div>
  18. </div>
  19. </th>
  20. </tr>
  21. <tr>
  22. <th>{{:: 'policy-type' | translate}}</th>
  23. <th>{{:: 'policy-value' | translate}}</th>
  24. <th>{{:: 'actions' | translate}}</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <tr ng-repeat="p in policy">
  29. <td>{{p.displayName}}</td>
  30. <td>
  31. <input type="text" class="form-control" ng-model="p.value" ng-show="p.configType" data-ng-required="p.configType && !p.defaultValue">
  32. </td>
  33. <td class="kc-action-cell" ng-click="removePolicy($index)">{{:: 'delete' | translate}}</td>
  34. </tr>
  35. </tbody>
  36. </table>
  37. <div class="form-group" data-ng-show="access.manageRealm">
  38. <div class="col-md-12">
  39. <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
  40. <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>
  41. </div>
  42. </div>
  43. </form>
  44. </div>
  45. <kc-menu></kc-menu>