appUpdate.ftl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
  3. <%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
  4. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  6. <script type="text/javascript">
  7. <!--
  8. $(function(){
  9. $("#algorithm").change(function(){
  10. $.post("<s:Base/>/apps/generate/secret/"+$(this).val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
  11. $("#algorithmKey").val(data+"");
  12. $("#algorithmKey_text").html(data+"");
  13. $("#secret").val(data+"");
  14. $("#secret_text").html(data+"");
  15. });
  16. });
  17. $("#generateSecret").on("click",function(){
  18. $.post("<s:Base/>/apps/generate/secret/"+$("#algorithm").val(), {_method:"post",currTime:(new Date()).getTime()}, function(data) {
  19. $("#algorithmKey").val(data+"");
  20. $("#algorithmKey_text").html(data+"");
  21. $("#secret").val(data+"");
  22. $("#secret_text").html(data+"");
  23. });
  24. });
  25. });
  26. //-->
  27. </script>
  28. <form id="actionForm_app" method="post" type="label" autoclose="true"
  29. action="<s:Base/>/apps/ltpa/update"
  30. forward="<s:Base/>/apps/list"
  31. enctype="multipart/form-data">
  32. <!-- content -->
  33. <!--table-->
  34. <table width="960" class="datatable" >
  35. <tbody>
  36. <tr>
  37. <td ><jsp:include page="../appUpdateCommon.jsp"/></td>
  38. </tr>
  39. <tr>
  40. <td>
  41. <table width="960" class="datatable" >
  42. <tbody>
  43. <tr>
  44. <td colspan=4><s:Locale code="apps.ltpa.info" /></td>
  45. </tr>
  46. <tr>
  47. <th><s:Locale code="apps.ltpa.redirectUri" />:</th>
  48. <td colspan=3>
  49. <input type="text" id="redirectUri" name="redirectUri" title="" value="${model.redirectUri}"/>
  50. <b class="orange">*</b><label for="redirectUri"></label>
  51. </td>
  52. </tr>
  53. <tr>
  54. <th><s:Locale code="apps.ltpa.cookieName" />:</th>
  55. <td colspan=3>
  56. <input type="text" id="redirectUri" name="cookieName" title="" value="${model.cookieName}"/>
  57. <b class="orange">*</b><label for="cookieName"></label>
  58. </td>
  59. </tr>
  60. <tr>
  61. <th style="width:15%;"><s:Locale code="apps.ltpa.algorithm" />:</th>
  62. <td style="width:35%;">
  63. <select id="algorithm" name="algorithm" >
  64. <option value="DES" <c:if test="${'DES'==model.algorithm}">selected</c:if> >DES</option>
  65. <option value="DESede" <c:if test="${'DESede'==model.algorithm}">selected</c:if>>DESede</option>
  66. <option value="Blowfish" <c:if test="${'Blowfish'==model.algorithm}">selected</c:if>>Blowfish</option>
  67. <option value="AES" <c:if test="${'AES'==model.algorithm}">selected</c:if>>AES</option>
  68. </select>
  69. <b class="orange">*</b><label for="algorithm"></label>
  70. </td>
  71. <th style="width:15%;"><s:Locale code="apps.ltpa.algorithmKey" />:</th>
  72. <td style="width:35%;">
  73. <span id="algorithmKey_text">${model.algorithmKey}</span>
  74. <input type="hidden" id="algorithmKey" name="algorithmKey" title="" value="${model.algorithmKey}"/>
  75. </td>
  76. </tr>
  77. <tr>
  78. <th><s:Locale code="apps.ltpa.token.content" />:</th>
  79. <td colspan=3>
  80. <table class="hidetable" style="width:100%;">
  81. <tr>
  82. <td><s:Locale code="userinfo.id" /><input type="checkbox" id="uid" name="uid" value="1" <c:if test="${1==model.uid}">checked</c:if> /></td>
  83. <td><s:Locale code="userinfo.username" /><input type="checkbox" id="username" name="username" value="1" <c:if test="${1==model.username}">checked</c:if>/></td>
  84. <td><s:Locale code="userinfo.email" /><input type="checkbox" id="email" name="email" value="1" <c:if test="${1==model.email}">checked</c:if>/></td>
  85. <td><s:Locale code="userinfo.windowsAccount" /><input type="checkbox" id="windowsAccount" name="windowsAccount" value="1" <c:if test="${1==model.windowsAccount}">checked</c:if>/></td>
  86. <td><s:Locale code="userinfo.employeeNumber" /><input type="checkbox" id="employeeNumber" name="employeeNumber" value="1" <c:if test="${1==model.employeeNumber}">checked</c:if>/></td>
  87. <td><s:Locale code="userinfo.departmentId" /><input type="checkbox" id="departmentId" name="departmentId" value="1" <c:if test="${1==model.departmentId}">checked</c:if>/></td>
  88. <td><s:Locale code="userinfo.department" /><input type="checkbox" id="department" name="department" value="1" <c:if test="${1==model.department}">checked</c:if>/></td>
  89. </tr>
  90. </table>
  91. </td>
  92. </tr>
  93. <tr>
  94. <th><s:Locale code="apps.ltpa.expires" />:</th>
  95. <td >
  96. <input type="text" id="expires" name="expires" title="" value="${model.expires}"/>
  97. </td>
  98. <th><s:Locale code="apps.isAdapter" />:</th>
  99. <td>
  100. <select id="isAdapter" name="isAdapter" >
  101. <option value="0" <c:if test="${0==model.isAdapter}">selected</c:if> >
  102. <s:Locale code="apps.isAdapter.no" />
  103. <option value="1" <c:if test="${1==model.isAdapter}">selected</c:if> >
  104. <s:Locale code="apps.isAdapter.yes" />
  105. </select>
  106. </td>
  107. </tr>
  108. <tr>
  109. <th><s:Locale code="apps.adapter" />:</th>
  110. <td colspan =3>
  111. <input type="text" id="adapter" name="adapter" title="" value="${model.adapter}"/>
  112. </td>
  113. </tr>
  114. </tbody>
  115. </table>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. <input class="button" id="submitBtn" type="submit" value="<s:Locale code="button.text.save" />"/>
  121. <input class="button" id="backBtn" type="button" value="<s:Locale code="button.text.cancel" />"/>
  122. </form>