appUpdate.ftl 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. <#include "../appCommonHead.ftl"/>
  7. <#setting number_format="#">
  8. <script type="text/javascript">
  9. <!--
  10. $(function(){
  11. $("select[name='credential']").on("click",function(){
  12. if($(this).val()=="3"){
  13. $("#sharedconfigure").hide();
  14. $("#systemconfigure").hide();
  15. }else if($(this).val()=="1"){
  16. $("#sharedconfigure").hide();
  17. $("#systemconfigure").show();
  18. }else if($(this).val()=="2"){
  19. $("#sharedconfigure").show();
  20. $("#systemconfigure").hide();
  21. }
  22. });
  23. });
  24. //-->
  25. </script>
  26. </head>
  27. <body>
  28. <div class="container">
  29. <div class="row">
  30. <div class="col-md-12">
  31. <form id="actionForm_app" method="post" type="label" autoclose="true" closeWindow="true"
  32. action="<@base/>/apps/extendapi/update"
  33. forward="<@base/>/apps/list"
  34. enctype="multipart/form-data"
  35. class="needs-validation" novalidate>
  36. <!-- content -->
  37. <!--table-->
  38. <table class="table table-bordered" >
  39. <tbody>
  40. <tr>
  41. <td ><#include "../appUpdateCommon.ftl"/></td>
  42. </tr>
  43. <tr>
  44. <td>
  45. <table class="table table-bordered" >
  46. <tbody>
  47. <tr>
  48. <th ><@locale code="apps.principal"/></th>
  49. <td >
  50. <input type="text" class="form-control" id="principal" name="principal" title="" value="${model.principal}" required="" />
  51. </td>
  52. <th ><@locale code="apps.credentials"/></th>
  53. <td >
  54. <input type="text" class="form-control" id="credentials" name="credentials" title="" value="${model.credentials}" required="" />
  55. </td>
  56. </tr>
  57. <tr>
  58. <th style="width:15%;"><@locale code="apps.credential"/></th>
  59. <td style="width:35%;">
  60. <select id="credential" name="credential" class="form-control form-select" >
  61. <option value="3" <#if 3==model.credential >selected</#if> >
  62. <@locale code="apps.credential.user-defined"/>
  63. </option>
  64. <option value="2" <#if 2==model.credential >selected</#if> >
  65. <@locale code="apps.credential.shared"/>
  66. </option>
  67. <option value="1" <#if 1==model.credential >selected</#if> >
  68. <@locale code="apps.credential.system"/>
  69. </option>
  70. </select>
  71. </td>
  72. <th style="width:15%;"></th>
  73. <td style="width:35%;" >
  74. </td>
  75. </tr>
  76. <tr id="systemconfigure" <#if 1!=model.credential > style="display:none"</#if> >
  77. <th><@locale code="apps.systemUserAttr"/></th>
  78. <td colspan="3">
  79. <select id="systemUserAttr" name="systemUserAttr" class="form-control form-select" >
  80. <option value="uid" <#if 'uid'==model.systemUserAttr >selected</#if> >
  81. <@locale code="userinfo.id"/></option>
  82. <option value="employeeNumber" <#if 'employeeNumber'==model.systemUserAttr >selected</#if> >
  83. <@locale code="userinfo.employeeNumber"/></option>
  84. <option value="username" <#if 'username'==model.systemUserAttr >selected</#if> >
  85. <@locale code="userinfo.username"/></option>
  86. <option value="email" <#if 'email'==model.systemUserAttr >selected</#if> >
  87. <@locale code="userinfo.email"/></option>
  88. <option value="windowsaccount" <#if 'windowsaccount'==model.systemUserAttr >selected</#if> >
  89. <@locale code="userinfo.windowsAccount"/></option>
  90. </select>
  91. </td>
  92. </tr>
  93. <tr id="sharedconfigure" <#if 2!=model.credential > style="display:none"</#if>>
  94. <th><@locale code="apps.credential.sharedUsername"/></th>
  95. <td>
  96. <input type="text" class="form-control" id="sharedUsername" name="sharedUsername" value="${model.sharedUsername}" />
  97. </td>
  98. <th><@locale code="apps.credential.sharedPassword"/></th>
  99. <td>
  100. <input type="text" class="form-control" id="sharedPassword" name="sharedPassword" value="${model.sharedPassword}" />
  101. </td>
  102. </tr>
  103. </tbody>
  104. </table>
  105. </td>
  106. </tr>
  107. </tbody>
  108. </table>
  109. <input class="button btn btn-primary mr-3" id="submitBtn" type="submit" value="<@locale code="button.text.save" />"/>
  110. <input class="button btn btn-secondary mr-3" id="backBtn" type="button" value="<@locale code="button.text.close" />"/>
  111. </form>
  112. </div>
  113. </div>
  114. </div>
  115. </body>
  116. </html>