client-policies-profiles-edit.html 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!--
  2. ~ Copyright 2021 Red Hat, Inc. and/or its affiliates
  3. ~ and other contributors as indicated by the @author tags.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. ~
  17. -->
  18. <div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
  19. <ol class="breadcrumb">
  20. <li><a href="#/realms/{{realm.realm}}/client-policies/profiles">{{:: 'client-profiles' | translate}}</a></li>
  21. <li data-ng-show="createNew">{{:: 'create-client-profile' | translate}}</li>
  22. <li data-ng-hide="createNew">{{editedProfile.name}}</li>
  23. </ol>
  24. <h1 data-ng-show="createNew">{{:: 'create-client-profile' | translate}}</h1>
  25. <h1 data-ng-hide="createNew">{{editedProfile.name|capitalize}}</h1>
  26. <form class="form-horizontal" name="realmForm" novalidate kc-read-only="isReadOnly()">
  27. <fieldset class="border-top">
  28. <div class="form-group">
  29. <label class="col-md-2 control-label" for="clientProfileName">{{:: 'name' | translate}} <span class="required">*</span></label>
  30. <div class="col-sm-6">
  31. <input class="form-control" type="text" id="clientProfileName" name="clientProfileName" data-ng-model="editedProfile.name" autofocus required>
  32. </div>
  33. <kc-tooltip>{{:: 'client-profile-name.tooltip' | translate}}</kc-tooltip>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label>
  37. <div class="col-md-6">
  38. <textarea class="form-control" rows="5" cols="50" id="description" name="description" data-ng-model="editedProfile.description"></textarea>
  39. </div>
  40. </div>
  41. </fieldset>
  42. <fieldset>
  43. <div class="form-group">
  44. <div class="col-md-10 col-md-offset-2">
  45. <button kc-save>{{:: 'save' | translate}}</button>
  46. <button kc-cancel data-ng-click="back()">{{:: 'back' | translate}}</button>
  47. </div>
  48. </div>
  49. </fieldset>
  50. <fieldset data-ng-hide="createNew">
  51. <legend><span class="text">{{:: 'executors' | translate}}</span> <kc-tooltip>{{:: 'client-profile-executors.tooltip' | translate}}</kc-tooltip></legend>
  52. <table class="table table-striped table-bordered">
  53. <thead>
  54. <tr data-ng-hide="isReadOnly()">
  55. <th class="kc-table-actions" colspan="3">
  56. <div class="form-inline">
  57. <div class="pull-right">
  58. <a href="#/realms/{{realm.realm}}/client-policies/profiles-update/{{editedProfile.name}}/create-executor" class="btn btn-default">{{:: 'create' | translate}}</a>
  59. </div>
  60. </div>
  61. </th>
  62. </tr>
  63. <tr data-ng-show="editedProfile.executors && editedProfile.executors.length > 0">
  64. <th>{{:: 'type' | translate}}</th>
  65. <th colspan="2">{{:: 'actions' | translate}}</th>
  66. </tr>
  67. </thead>
  68. <tbody>
  69. <tr ng-repeat="executor in editedProfile.executors">
  70. <td><a href="#/realms/{{realm.realm}}/client-policies/profiles-update/{{editedProfile.name}}/update-executor/{{$index}}">{{executor.executor}}</a></td>
  71. <td class="kc-action-cell" kc-open="/realms/{{realm.realm}}/client-policies/profiles-update/{{editedProfile.name}}/update-executor/{{$index}}">{{:: 'edit' | translate}}</td>
  72. <td class="kc-action-cell" data-ng-hide="isReadOnly()" data-ng-click="removeExecutor($index)">{{:: 'delete' | translate}}</td>
  73. </tr>
  74. <tr data-ng-show="!editedProfile.executors || editedProfile.executors.length == 0">
  75. <td>{{:: 'no-executors-available' | translate}}</td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. </fieldset>
  80. </form>
  81. </div>
  82. <kc-menu></kc-menu>