role-detail.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  2. <ol class="breadcrumb">
  3. <li><a href="#/realms/{{realm.realm}}/roles">{{:: 'roles' | translate}}</a></li>
  4. <li data-ng-hide="create">{{role.name}}</li>
  5. <li data-ng-show="create">{{:: 'add-role' | translate}}</li>
  6. </ol>
  7. <kc-tabs-role></kc-tabs-role>
  8. <form class="form-horizontal clearfix" name="realmForm" novalidate kc-read-only="!access.manageRealm">
  9. <fieldset>
  10. <div class="form-group">
  11. <label class="col-md-2 control-label" for="name"><span class="required" data-ng-show="create">*</span> {{:: 'role-name' | translate}}</label>
  12. <div class="col-md-6">
  13. <input class="form-control" type="text" id="name" name="name" data-ng-model="role.name" autofocus
  14. required data-ng-readonly="!create">
  15. </div>
  16. </div>
  17. <div class="form-group">
  18. <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label>
  19. <div class="col-md-6">
  20. <textarea class="form-control" rows="5" cols="50" id="description" name="description" data-ng-model="role.description"></textarea>
  21. </div>
  22. </div>
  23. <div class="form-group" data-ng-hide="create">
  24. <label class="col-md-2 control-label" for="compositeSwitch" class="control-label">{{:: 'composite-roles' | translate}}</label>
  25. <div class="col-md-6">
  26. <input ng-model="compositeSwitch" name="compositeSwitch" id="compositeSwitch" ng-disabled="compositeSwitchDisabled" onoffswitch on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}" />
  27. </div>
  28. <kc-tooltip>{{:: 'composite-roles.tooltip' | translate}}</kc-tooltip>
  29. </div>
  30. </fieldset>
  31. <div class="form-group">
  32. <div class="col-md-10 col-md-offset-2" data-ng-show="create">
  33. <button kc-save data-ng-show="changed">{{:: 'save' | translate}}</button>
  34. <button kc-cancel data-ng-click="cancel()" data-ng-show="changed">{{:: 'cancel' | translate}}</button>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <div class="col-md-10 col-md-offset-2" data-ng-show="!create && access.manageRealm">
  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. <fieldset data-ng-show="!create && (compositeSwitch || role.composite)">
  44. <legend uncollapsed class="collapsible"><span class="text">{{:: 'composite-roles' | translate}}</span> </legend>
  45. <div class="form-group">
  46. <label class="col-md-2 control-label" class="control-label">{{:: 'realm-roles' | translate}}</label>
  47. <div class="col-md-10">
  48. <div class="row">
  49. <div class="col-md-4">
  50. <label class="control-label">{{:: 'available-roles' | translate}}</label>
  51. <kc-tooltip>{{:: 'composite.available-roles.tooltip' | translate}}</kc-tooltip>
  52. <select id="available" class="form-control overflow-select" multiple size="5"
  53. ng-multiple="true"
  54. ng-model="selectedRealmRoles">
  55. <option ng-repeat="r in realmRoles | orderBy:'name'" value="{{r}}" title="{{r.name}}">
  56. {{r.name}}
  57. </option>
  58. </select>
  59. <button ng-disabled="selectedRealmRoles.length == 0" class="btn btn-default" type="submit" ng-click="addRealmRole()">
  60. {{:: 'add-selected' | translate}} <i class="fa fa-angle-double-right"></i>
  61. </button>
  62. </div>
  63. <div class="col-md-4">
  64. <label class="control-label">{{:: 'associated-roles' | translate}}</label>
  65. <kc-tooltip>{{:: 'composite.associated-roles.tooltip' | translate}}</kc-tooltip>
  66. <select id="assigned" class="form-control overflow-select" multiple size=5
  67. ng-multiple="true"
  68. ng-model="selectedRealmMappings">
  69. <option ng-repeat="r in realmMappings | orderBy:'name'" value="{{r}}" title="{{r.name}}">
  70. {{r.name}}
  71. </option>
  72. </select>
  73. <button ng-disabled="selectedRealmMappings.length == 0" class="btn btn-default" type="submit" ng-click="deleteRealmRole()">
  74. <i class="fa fa-angle-double-left"></i> {{:: 'remove-selected' | translate}}
  75. </button>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label class="col-md-2 control-label" for="clients">{{:: 'client-roles' | translate}}</label>
  82. <div class="col-md-6">
  83. <input type="hidden" ui-select2="clientsUiSelect" id="clients" data-ng-model="selectedClient" data-ng-change="changeClient(selectedClient);" data-placeholder="{{:: 'authz-select-client' | translate}}...">
  84. </input>
  85. </div>
  86. <div class="col-md-10 col-md-push-2">
  87. <div class="row" data-ng-show="selectedClient">
  88. <div class="col-md-4">
  89. <label class="control-label" for="available-client">{{:: 'available-roles' | translate}}</label>
  90. <kc-tooltip>{{:: 'composite.available-roles-client.tooltip' | translate}}</kc-tooltip>
  91. <select id="available-client" class="form-control overflow-select" multiple size="5"
  92. ng-multiple="true"
  93. ng-model="selectedClientRoles">
  94. <option ng-repeat="r in clientRoles | orderBy:'name'" value="{{r}}" title="{{r.name}}">
  95. {{r.name}}
  96. </option>
  97. </select>
  98. <button ng-disabled="selectedClientRoles.length == 0" class="btn btn-default" type="submit" ng-click="addClientRole()">
  99. {{:: 'add-selected' | translate}} <i class="fa fa-angle-right"></i>
  100. </button>
  101. </div>
  102. <div class="col-md-4">
  103. <label class="control-label" for="assigned-client">{{:: 'associated-roles' | translate}}</label>
  104. <kc-tooltip>{{:: 'composite.associated-roles-client.tooltip' | translate}}</kc-tooltip>
  105. <select id="assigned-client" class="form-control overflow-select" multiple size=5
  106. ng-multiple="true"
  107. ng-model="selectedClientMappings">
  108. <option ng-repeat="r in clientMappings | orderBy:'name'" value="{{r}}" title="{{r.name}}">
  109. {{r.name}}
  110. </option>
  111. </select>
  112. <button ng-disabled="selectedClientMappings.length == 0" class="btn btn-default" type="submit" ng-click="deleteClientRole()">
  113. <i class="fa fa-angle-left"></i> {{:: 'remove-selected' | translate}}
  114. </button>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </fieldset>
  120. </form>
  121. </div>
  122. <kc-menu></kc-menu>