client-role-detail.html 8.5 KB

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