summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/templates
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-09-27 18:30:59 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-10-17 19:13:14 +0200
commit53db1fe5ac24f569918fa7cfb3dcd67054099836 (patch)
tree2379ab2f5e9f393875efea49a66886b956505e2b /apps/user_ldap/templates
parent652caa1c88a7e341fe9dc46a5c98c16663ac5f3c (diff)
downloadnextcloud-server-53db1fe5ac24f569918fa7cfb3dcd67054099836.tar.gz
nextcloud-server-53db1fe5ac24f569918fa7cfb3dcd67054099836.zip
First stage of new Wizard, neither feature complete nor ready
Diffstat (limited to 'apps/user_ldap/templates')
-rw-r--r--apps/user_ldap/templates/part.settingcontrols.php12
-rw-r--r--apps/user_ldap/templates/part.wizard-server.php76
-rw-r--r--apps/user_ldap/templates/part.wizardcontrols.php14
-rw-r--r--apps/user_ldap/templates/settings.php14
4 files changed, 112 insertions, 4 deletions
diff --git a/apps/user_ldap/templates/part.settingcontrols.php b/apps/user_ldap/templates/part.settingcontrols.php
new file mode 100644
index 00000000000..017f21c8b1c
--- /dev/null
+++ b/apps/user_ldap/templates/part.settingcontrols.php
@@ -0,0 +1,12 @@
+<div class="ldapSettingControls">
+ <input id="ldap_submit" type="submit" value="Save" />
+ <button id="ldap_action_test_connection" name="ldap_action_test_connection">
+ <?php p($l->t('Test Configuration'));?>
+ </button>
+ <a href="<?php p($theme->getDocBaseUrl()); ?>/server/5.0/admin_manual/auth_ldap.html"
+ target="_blank">
+ <img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>"
+ style="height:1.75ex" />
+ <?php p($l->t('Help'));?>
+ </a>
+</div> \ No newline at end of file
diff --git a/apps/user_ldap/templates/part.wizard-server.php b/apps/user_ldap/templates/part.wizard-server.php
new file mode 100644
index 00000000000..ae0a7e650c9
--- /dev/null
+++ b/apps/user_ldap/templates/part.wizard-server.php
@@ -0,0 +1,76 @@
+<fieldset id="ldapWizard1">
+ <p>
+ <select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
+ <?php if(count($_['serverConfigurationPrefixes']) === 0 ) {
+ ?>
+ <option value="" selected>1. Server</option>');
+ <?php
+ } else {
+ $i = 1;
+ $sel = ' selected';
+ foreach($_['serverConfigurationPrefixes'] as $prefix) {
+ ?>
+ <option value="<?php p($prefix); ?>"<?php p($sel); $sel = ''; ?>><?php p($i++); ?>. Server: <?php p($_['serverConfigurationHosts'][$prefix]); ?></option>
+ <?php
+ }
+ }
+ ?>
+ <option value="NEW"><?php p($l->t('Add Server Configuration'));?></option>
+ </select>
+ <button id="ldap_action_delete_configuration"
+ name="ldap_action_delete_configuration">Delete Configuration</button>
+ </p>
+
+ <div class="hostPortCombinator">
+ <div class="tablerow">
+ <div class="tablecell">
+ <div class="table">
+ <input type="text" class="host tablecell lwautosave" id="ldap_host"
+ name="ldap_host"
+ data-default="<?php p($_['ldap_host_default']); ?>"
+ placeholder="<?php p($l->t('Host'));?>"
+ title="<?php p($l->t('You can omit the protocol, except you require SSL. Then start with ldaps://'));?>"
+ />
+ <span>
+ <input type="number" id="ldap_port" name="ldap_port"
+ class="hidden lwautosave"
+ data-default="<?php p($_['ldap_port_default']); ?>"
+ placeholder="<?php p($l->t('Port'));?>" />
+ </span>
+ </div>
+ </div>
+ </div>
+ <div class="tablerow">
+ <input type="text" id="ldap_dn" name="ldap_dn"
+ class="tablecell lwautosave"
+ data-default="<?php p($_['ldap_dn_default']); ?>"
+ placeholder="<?php p($l->t('User DN'));?>"
+ 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.'));?>"
+ />
+ </div>
+
+ <div class="tablerow">
+ <input type="password" id="ldap_agent_password"
+ class="tablecell lwautosave" name="ldap_agent_password"
+ data-default="<?php p($_['ldap_agent_password_default']); ?>"
+ placeholder="<?php p($l->t('Password'));?>"
+ title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>"
+ />
+ </div>
+
+ <div class="tablerow">
+ <textarea id="ldap_base" name="ldap_base"
+ class="tablecell hidden lwautosave"
+ placeholder="<?php p($l->t('One Base DN per line'));?>"
+ title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>"
+ data-default="<?php p($_['ldap_base_default']); ?>" >
+ </textarea>
+ </div>
+
+ <div class="tablerow">
+ <div class="tablecell ldapWizardInfo hidden">&nbsp;
+ </div>
+ </div>
+ </div>
+ <?php print_unescaped($_['wizardControls']); ?>
+ </fieldset> \ No newline at end of file
diff --git a/apps/user_ldap/templates/part.wizardcontrols.php b/apps/user_ldap/templates/part.wizardcontrols.php
new file mode 100644
index 00000000000..588c70916fa
--- /dev/null
+++ b/apps/user_ldap/templates/part.wizardcontrols.php
@@ -0,0 +1,14 @@
+<div class="ldapWizardControls">
+ <button id="ldap_action_back" name="ldap_action_back" class="hidden">
+ <?php p($l->t('Back'));?>
+ </button>
+ <button id="ldap_action_continue" name="ldap_action_continue">
+ <?php p($l->t('Continue'));?>
+ </button>
+ <a href="<?php p($theme->getDocBaseUrl()); ?>/server/5.0/admin_manual/auth_ldap.html"
+ target="_blank">
+ <img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>"
+ style="height:1.75ex" />
+ <?php p($l->t('Help'));?>
+ </a>
+</div> \ No newline at end of file
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 319dc38a62d..9ca9673ada2 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -1,9 +1,12 @@
<form id="ldap" action="#" method="post">
<div id="ldapSettings" class="personalblock">
<ul>
- <li><a href="#ldapSettings-1">LDAP Basic</a></li>
- <li><a href="#ldapSettings-2">Advanced</a></li>
- <li><a href="#ldapSettings-3">Expert</a></li>
+ <?php foreach($_['toc'] as $id => $title) { ?>
+ <li><a href="<?php p($id); ?>"><?php p($title); ?></a></li>
+ <?php } ?>
+ <li class="ldapSettingsTabs"><a href="#ldapSettings-3">Expert</a></li>
+ <li class="ldapSettingsTabs"><a href="#ldapSettings-2">Advanced</a></li>
+ <li class="ldapSettingsTabs"><a href="#ldapSettings-1">LDAP Basic</a></li>
</ul>
<?php if(OCP\App::isEnabled('user_webdavauth')) {
print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them.').'</p>');
@@ -12,6 +15,7 @@
print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>');
}
?>
+ <?php print_unescaped($_['tabs']); ?>
<fieldset id="ldapSettings-1">
<p><label for="ldap_serverconfig_chooser"><?php p($l->t('Server configuration'));?></label>
<select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
@@ -60,6 +64,7 @@
<input type="text" id="ldap_group_filter" name="ldap_group_filter"
data-default="<?php p($_['ldap_group_filter_default']); ?>"
title="<?php p($l->t('Defines the filter to apply, when retrieving groups (no placeholders). Example: "objectClass=posixGroup"'));?>" /></p>
+ <?php print_unescaped($_['settingControls']); ?>
</fieldset>
<fieldset id="ldapSettings-2">
<div id="ldapAdvancedAccordion">
@@ -93,6 +98,7 @@
<p><label for="home_folder_naming_rule"><?php p($l->t('User Home Folder Naming Rule'));?></label><input type="text" id="home_folder_naming_rule" name="home_folder_naming_rule" title="<?php p($l->t('Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute.'));?>" data-default="<?php p($_['home_folder_naming_rule_default']); ?>" /></p>
</div>
</div>
+ <?php print_unescaped($_['settingControls']); ?>
</fieldset>
<fieldset id="ldapSettings-3">
<p><strong><?php p($l->t('Internal Username'));?></strong></p>
@@ -105,8 +111,8 @@
<p><strong><?php p($l->t('Username-LDAP User Mapping'));?></strong></p>
<p class="ldapIndent"><?php p($l->t('Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have a internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage.'));?></p>
<p class="ldapIndent"><button id="ldap_action_clear_user_mappings" name="ldap_action_clear_user_mappings"><?php p($l->t('Clear Username-LDAP User Mapping'));?></button><br/><button id="ldap_action_clear_group_mappings" name="ldap_action_clear_group_mappings"><?php p($l->t('Clear Groupname-LDAP Group Mapping'));?></button></p>
+ <?php print_unescaped($_['settingControls']); ?>
</fieldset>
- <input id="ldap_submit" type="submit" value="Save" /> <button id="ldap_action_test_connection" name="ldap_action_test_connection"><?php p($l->t('Test Configuration'));?></button> <a href="<?php p($theme->getDocBaseUrl()); ?>/server/5.0/admin_manual/auth_ldap.html" target="_blank"><img src="<?php print_unescaped(OCP\Util::imagePath('', 'actions/info.png')); ?>" style="height:1.75ex" /> <?php p($l->t('Help'));?></a>
</div>
</form>