part.wizard-server.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2013-2017 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. ?>
  8. <fieldset id="ldapWizard1">
  9. <p>
  10. <select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
  11. <?php
  12. $i = 1;
  13. $sel = ' selected';
  14. foreach ($_['serverConfigurationPrefixes'] as $prefix) {
  15. ?>
  16. <option value="<?php p($prefix); ?>"<?php p($sel);
  17. $sel = ''; ?>><?php p($l->t('%s. Server:', [$i++])); ?> <?php p(' ' . $_['serverConfigurationHosts'][$prefix]); ?></option>
  18. <?php
  19. }
  20. ?>
  21. </select>
  22. <button type="button" id="ldap_action_add_configuration"
  23. aria-describedby="ldap_action_add_configuration_instructions"
  24. name="ldap_action_add_configuration" class="icon-add icon-default-style"
  25. title="<?php p($l->t('Add a new configuration'));?>">&nbsp;</button>
  26. <p class="hidden-visually" id="ldap_action_add_configuration_instructions">
  27. <?php p($l->t('Add a new configuration'));?>
  28. </p>
  29. <button type="button" id="ldap_action_copy_configuration"
  30. name="ldap_action_copy_configuration"
  31. aria-describedby="ldap_action_copy_configuration_instructions"
  32. class="ldapIconCopy icon-default-style"
  33. title="<?php p($l->t('Copy current configuration into new directory binding'));?>">&nbsp;</button>
  34. <p class="hidden-visually" id="ldap_action_copy_configuration_instructions">
  35. <?php p($l->t('Copy current configuration into new directory binding'));?>
  36. </p>
  37. <button type="button" id="ldap_action_delete_configuration"
  38. aria-describedby="ldap_action_delete_configuration_instructions"
  39. name="ldap_action_delete_configuration" class="icon-delete icon-default-style"
  40. title="<?php p($l->t('Delete the current configuration'));?>">&nbsp;</button>
  41. <p class="hidden-visually" id="ldap_action_delete_configuration_instructions">
  42. <?php p($l->t('Delete the current configuration'));?>
  43. </p>
  44. </p>
  45. <div class="hostPortCombinator">
  46. <div class="tablerow">
  47. <div class="tablecell">
  48. <div class="table">
  49. <input type="text" class="host" id="ldap_host"
  50. name="ldap_host"
  51. aria-describedby="ldap_host_instructions"
  52. placeholder="<?php p($l->t('Host'));?>"
  53. title="<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>"
  54. />
  55. <p class="hidden-visually" id="ldap_host_instructions">
  56. <?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>
  57. </p>
  58. <span class="hostPortCombinatorSpan">
  59. <input type="number" id="ldap_port" name="ldap_port"
  60. placeholder="<?php p($l->t('Port'));?>" />
  61. <button class="ldapDetectPort" name="ldapDetectPort" type="button">
  62. <?php p($l->t('Detect Port'));?>
  63. </button>
  64. </span>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="tablerow">&nbsp;</div>
  69. <div class="tablerow">
  70. <input type="text" id="ldap_dn" name="ldap_dn"
  71. class="tablecell"
  72. aria-describedby="ldap_dn_instructions"
  73. placeholder="<?php p($l->t('User DN'));?>" autocomplete="off"
  74. title="<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>"
  75. />
  76. <p class="hidden-visually" id="ldap_dn_instructions">
  77. <?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>
  78. </p>
  79. </div>
  80. <div class="tablerow">
  81. <input type="password" id="ldap_agent_password"
  82. class="tablecell" name="ldap_agent_password"
  83. aria-describedby="ldap_agent_password_instructions"
  84. placeholder="<?php p($l->t('Password'));?>" autocomplete="off"
  85. title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>"
  86. />
  87. <p class="hidden-visually" id="ldap_agent_password_instructions">
  88. <?php p($l->t('For anonymous access, leave DN and Password empty.'));?>
  89. </p>
  90. <button class="ldapSaveAgentCredentials" name="ldapSaveAgentCredentials" type="button">
  91. <?php p($l->t('Save Credentials'));?>
  92. </button>
  93. </div>
  94. <div class="tablerow">&nbsp;</div>
  95. <div class="tablerow">
  96. <textarea id="ldap_base" name="ldap_base"
  97. class="tablecell"
  98. aria-describedby="ldap_base_instructions"
  99. placeholder="<?php p($l->t('One Base DN per line'));?>"
  100. title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>">
  101. </textarea>
  102. <p class="hidden-visually" id="ldap_base_instructions">
  103. <?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>
  104. </p>
  105. <button class="ldapDetectBase" name="ldapDetectBase" type="button">
  106. <?php p($l->t('Detect Base DN'));?>
  107. </button>
  108. <button class="ldapTestBase" name="ldapTestBase" type="button">
  109. <?php p($l->t('Test Base DN'));?>
  110. </button>
  111. </div>
  112. <div class="tablerow left">
  113. <input type="checkbox" id="ldap_experienced_admin" value="1"
  114. name="ldap_experienced_admin" class="tablecell"
  115. aria-describedby="ldap_experienced_admin_instructions"
  116. title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>"
  117. />
  118. <p class="hidden-visually" id="ldap_experienced_admin_instructions">
  119. <?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>
  120. </p>
  121. <label for="ldap_experienced_admin" class="tablecell">
  122. <?php p($l->t('Manually enter LDAP filters (recommended for large directories)'));?>
  123. </label>
  124. </div>
  125. <div class="tablerow">
  126. <div class="tablecell ldapWizardInfo invisible">&nbsp;
  127. </div>
  128. </div>
  129. </div>
  130. <?php print_unescaped($_['wizardControls']); ?>
  131. </fieldset>