ldapform.html.php 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <form id='LDAPForm' class='cell not-watch load-indicator main-form form-ajax'>
  2. <h4>
  3. <?php $enableLDAP = $this->system->hasSystemLDAP();?>
  4. <?php echo html::checkbox('enableLDAP', array('true' => $lang->system->LDAP->ldapEnabled), $enableLDAP ? 'true' : '', (($ldapLinked or $activeLDAP) ? "onclick='return false;'" : '')); ?>
  5. </h4>
  6. <table class='table table-form'>
  7. <tbody>
  8. <tr>
  9. <th><?php echo $lang->system->LDAP->ldapSource;?></th>
  10. <td class='required w-300px'><?php echo html::select('source', $lang->system->ldapTypeList, $activeLDAP,"class='form-control'");?></td>
  11. <td></td>
  12. </tr>
  13. </tbody>
  14. </table>
  15. <table id='quchengLDAP' class='table table-form'>
  16. <tbody>
  17. <tr>
  18. <th><?php echo $lang->system->LDAP->ldapUsername?></th>
  19. <td><?php echo $ldapApp->account->username;?></td>
  20. </tr>
  21. <tr>
  22. <th><?php echo $lang->system->LDAP->ldapRoot;?></th>
  23. <td><?php echo 'dc=quickon,dc=org';?></td>
  24. <tr>
  25. </tbody>
  26. </table>
  27. <div id='extraLDAP'>
  28. <table class='table table-form'>
  29. <tbody>
  30. <tr>
  31. <th><?php echo $lang->system->LDAP->host;?></th>
  32. <td class='required w-300px'><?php echo html::input('extra[host]', zget($ldapSettings, 'host', ''), "class='form-control required' placeholder='192.168.1.1'");?></td>
  33. <td></td>
  34. </tr>
  35. <tr>
  36. <th><?php echo $lang->system->LDAP->port;?></th>
  37. <td class='required'><?php echo html::input('extra[port]', zget($ldapSettings, 'port', ''), "class='form-control' placeholder='389'");?></td>
  38. <td></td>
  39. </tr>
  40. <tr>
  41. <th><?php echo $lang->system->LDAP->ldapUsername;?></th>
  42. <td class='required'><?php echo html::input('extra[bindDN]', zget($ldapSettings, 'bindDN', ''), "class='form-control' placeholder='admin'");?></td>
  43. <td></td>
  44. </tr>
  45. <tr>
  46. <th><?php echo $lang->system->LDAP->password;?></th>
  47. <td class='required'><?php echo html::input('extra[bindPass]', zget($ldapSettings, 'bindPass', ''), "class='form-control' placeholder='******'");?></td>
  48. <td></td>
  49. </tr>
  50. <tr>
  51. <th><?php echo $lang->system->LDAP->ldapRoot;?></th>
  52. <td class='required'><?php echo html::input('extra[baseDN]', zget($ldapSettings, 'baseDN', ''), "class='form-control' placeholder='dc=quickon,dc=org'");?></td>
  53. <td></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <div class='advanced'><?php echo html::a("#advanced-settings", $lang->system->LDAP->ldapAdvance . "<i class='icon icon-chevron-double-down'></i>", '', "data-toggle='collapse'");?></div>
  58. <table class="collapse table table-form" id="advanced-settings">
  59. <tbody>
  60. <tr>
  61. <th><?php echo $lang->system->LDAP->filterUser;?></th>
  62. <td class='w-300px'><?php echo html::input('extra[filter]', zget($ldapSettings, 'filter', '&(objectClass=posixAccount)(uid=%s)'), "class='form-control' placeholder='&(objectClass=posixAccount)(cn=%s)'");?></td>
  63. <td></td>
  64. </tr>
  65. <tr>
  66. <th><?php echo $lang->system->LDAP->email;?></th>
  67. <td class='w-300px'><?php echo html::input('extra[attrEmail]', zget($ldapSettings, 'attrEmail', 'mail'), "class='form-control' placeholder='mail'");?></td>
  68. <td></td>
  69. </tr>
  70. <tr>
  71. <th><?php echo $lang->system->LDAP->extraAccount;?></th>
  72. <td class='w-300px'><?php echo html::input('extra[attrUser]', zget($ldapSettings, 'attrUser', 'uid'), "class='form-control' placeholder='uid'");?></td>
  73. <td></td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. <table class='table table-form'>
  78. <tbody>
  79. <tr>
  80. <td class='w-100px text-right'><?php echo html::commonButton($lang->system->verify, "id='testConnectBtn'");?></td>
  81. <td class='w-300px text-left'><span id='connectResult'></span></td>
  82. <td></td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. </div>
  87. <div class='text-center form-actions'><?php echo html::commonButton($activeLDAP ? $lang->system->LDAP->ldapUpdate : $lang->system->LDAP->ldapInstall, "id='submitBtn'", "btn btn-primary btn-wide");?></div>
  88. </form>
  89. <div class="modal fade" id="waiting" tabindex="-1" role="dialog" aria-hidden="true">
  90. <div class="modal-dialog w-400px">
  91. <div class="modal-content">
  92. <div class="modal-body">
  93. <h4><?php echo $lang->system->LDAP->updateLDAP;?></h4>
  94. <div><span id='message'></span></div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>