appUpdate.ftl 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!DOCTYPE HTML>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <#include "../../layout/header.ftl"/>
  5. <#include "../../layout/common.cssjs.ftl"/>
  6. <style type="text/css">
  7. .table th, .table td {
  8. padding: .2rem;
  9. vertical-align: middle;
  10. }
  11. </style>
  12. <script type="text/javascript">
  13. <!--
  14. $(function(){
  15. $("#generateSecret").on("click",function(){
  16. $.post("<@base/>/apps/generate/secret/oauth20", {_method:"post",currTime:(new Date()).getTime()}, function(data) {
  17. $("#secret").val(data+"");
  18. $("#secret_text").html(data+"");
  19. });
  20. });
  21. $("#certMetaFileImg").on("click",function(){
  22. if(!$("#certMetaFileImg").hasClass("appended")){
  23. $("#certMetaFileImg").after('<input id="certMetaFile" type="file" name="certMetaFile" />');
  24. $("#certMetaFileImg").addClass("appended");
  25. }
  26. });
  27. });
  28. //-->
  29. </script>
  30. </head>
  31. <body>
  32. <form id="actionForm_app" method="post" type="label" autoclose="true"
  33. action="<@base/>/apps/saml20/update"
  34. forward="<@base/>/apps/list"
  35. enctype="multipart/form-data">
  36. <!-- content -->
  37. <!--table-->
  38. <table width="960" class="table table-bordered" >
  39. <tbody>
  40. <tr>
  41. <td ><#include "../appUpdateCommon.ftl"/></td>
  42. </tr>
  43. <tr>
  44. <td>
  45. <table width="960" class="table table-bordered" >
  46. <tbody>
  47. <tr>
  48. <td colspan=4><@locale code="apps.saml.v2.0.info" /></td>
  49. </tr>
  50. <tr>
  51. <th><@locale code="apps.saml.entityId" />:</th>
  52. <td colspan =3>
  53. <input type="text" class="form-control" id="entityId" name="entityId" title="" value="${model.entityId}"/>
  54. </td>
  55. </tr>
  56. <tr>
  57. <th><@locale code="apps.saml.spAcsUrl" />:</th>
  58. <td colspan =3>
  59. <input type="text" class="form-control" id="spAcsUrl" name="spAcsUrl" title="" value="${model.spAcsUrl}"/>
  60. </td>
  61. </tr>
  62. <tr>
  63. <th><@locale code="apps.saml.issuer" />:</th>
  64. <td colspan =3>
  65. <input type="text" class="form-control" id="issuer" name="issuer" title="" value="${model.issuer}"/>
  66. </td>
  67. </tr>
  68. <tr>
  69. <th><@locale code="apps.saml.audience" />:</th>
  70. <td colspan =3>
  71. <input type="text" class="form-control" id="audience" name="audience" title="" value="${model.audience}"/>
  72. </td>
  73. </tr>
  74. <tr>
  75. <th style="width:15%;"><@locale code="apps.saml.nameidFormat" />:</th>
  76. <td style="width:35%;">
  77. <select id="nameidFormat" name="nameidFormat" class="form-control" >
  78. <option value="persistent" <#if 'persistent'==model.nameidFormat>selected</#if>>persistent</option>
  79. <option value="transient" <#if 'transient'==model.nameidFormat>selected</#if>>transient</option>
  80. <option value="emailAddress" <#if 'emailAddress'==model.nameidFormat>selected</#if>>emailAddress</option>
  81. <option value="X509SubjectName" <#if 'X509SubjectName'==model.nameidFormat>selected</#if>>X509SubjectName</option>
  82. <option value="WindowsDomainQualifiedName" <#if 'WindowsDomainQualifiedName'==model.nameidFormat>selected</#if>>WindowsDomainQualifiedName</option>
  83. <option value="unspecified" <#if 'unspecified'==model.nameidFormat>selected</#if>>unspecified</option>
  84. <option value="entity" <#if 'entity'==model.nameidFormat>selected</#if>>entity</option>
  85. <option value="custom" <#if 'custom'==model.nameidFormat>selected</#if>>user custom persistent </option>
  86. </select>
  87. </td>
  88. <th style="width:15%;"><@locale code="apps.saml.nameIdConvert" />:</th>
  89. <td style="width:35%;">
  90. <select id="nameIdConvert" name="nameIdConvert" class="form-control" >
  91. <option value="0" <#if 0==model.nameIdConvert>selected</#if>>
  92. <@locale code="apps.saml.nameIdConvert.original" /></option>
  93. <option value="1" <#if 1==model.nameIdConvert>selected</#if>>
  94. <@locale code="apps.saml.nameIdConvert.upperCase" /></option>
  95. <option value="2" <#if 2==model.nameIdConvert>selected</#if>>
  96. <@locale code="apps.saml.nameIdConvert.lowerCase" /></option>
  97. </select>
  98. </td>
  99. </tr>
  100. <tr>
  101. <th><@locale code="apps.saml.binding" />:</th>
  102. <td>
  103. <select id="binding" name="binding" class="form-control" >
  104. <option value="Redirect-Post" <#if 'Redirect-Post'==model.binding>selected</#if>>Redirect-Post</option>
  105. <option value="Post-Post" <#if 'Post-Post'==model.binding>selected</#if>>Post-Post</option>
  106. <option value="IdpInit-Post" <#if 'IdpInit-Post'==model.binding>selected</#if>>IdpInit-Post</option>
  107. <option value="Redirect-PostSimpleSign" <#if 'Redirect-PostSimpleSign'==model.binding>selected</#if>>Redirect-PostSimpleSign</option>
  108. <option value="Post-PostSimpleSign" <#if 'Post-PostSimpleSign'==model.binding>selected</#if>>Post-PostSimpleSign</option>
  109. <option value="IdpInit-PostSimpleSign" <#if 'IdpInit-PostSimpleSign'==model.binding>selected</#if>>IdpInit-PostSimpleSign</option>
  110. </select>
  111. </td>
  112. <th><@locale code="apps.saml.validityInterval" />:</th>
  113. <td >
  114. <input type="text" class="form-control" id="validityInterval" name="validityInterval" title="" value="${model.validityInterval}"/>
  115. </td>
  116. </tr>
  117. <tr>
  118. <th><@locale code="apps.saml.fileType" />:</th>
  119. <td>
  120. <select id="fileType" name="fileType" class="form-control" >
  121. <option value="certificate" selected><@locale code="apps.saml.fileType.certificate" /></option>
  122. <option value="metadata"><@locale code="apps.saml.fileType.metadata" /></option>
  123. </select>
  124. </td>
  125. <th><@locale code="apps.saml.certMetaFile" />:</th>
  126. <td>
  127. <img id="certMetaFileImg" height="32" alt="upload certificate or metadata file" src="<s:Base/>/images/cert.png">
  128. <b class="orange">*</b><label for="certMetaFile"></label>
  129. </td>
  130. </tr>
  131. <tr>
  132. <th><@locale code="apps.saml.encrypted" />:</th>
  133. <td >
  134. <select id="encrypted" name="encrypted" class="form-control" >
  135. <option value="0" <#if 0==model.encrypted>selected</#if>>
  136. <@locale code="apps.saml.encrypted.no" /></option>
  137. <option value="1" <#if 1==model.encrypted>selected</#if>>
  138. <@locale code="apps.saml.encrypted.yes" /></option>
  139. </select>
  140. </td>
  141. <th><@locale code="apps.isAdapter" />:</th>
  142. <td >
  143. <select id="isAdapter" name="isAdapter" class="form-control" >
  144. <option value="0" <#if 0==model.isAdapter>selected</#if> ><@locale code="apps.isAdapter.no" /></option>
  145. <option value="1" <#if 1==model.isAdapter>selected</#if> ><@locale code="apps.isAdapter.yes" /></option>
  146. </select>
  147. </td>
  148. </tr>
  149. <tr>
  150. <th><@locale code="apps.adapter" />:</th>
  151. <td colspan =3>
  152. <input type="text" class="form-control" id="adapter" name="adapter" title="" value="${model.adapter}"/>
  153. </td>
  154. </tr>
  155. <tr>
  156. <th><@locale code="apps.saml.certIssuer" />:</th>
  157. <td>${model.certIssuer}
  158. </td>
  159. <th><@locale code="apps.saml.certExpiration" />:</th>
  160. <td>${model.certExpiration}
  161. </td>
  162. </tr>
  163. <tr>
  164. <th><@locale code="apps.saml.certSubject" />:</th>
  165. <td colspan =3>${model.certSubject}
  166. </td>
  167. </tr>
  168. <tr>
  169. <td colspan =4>
  170. <input class="button" id="status" type="hidden" name="status" value="1"/>
  171. <input class="button btn btn-primary mr-3" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
  172. <input class="button btn btn-secondary mr-3" id="backBtn" type="button" value="<@locale code="button.text.cancel" />"/>
  173. </td>
  174. </tr>
  175. </tbody>
  176. </table>
  177. </td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. </form>
  182. </body>
  183. </html>