Skip to content

Commit

Permalink
Merge pull request #37275 from nextcloud/backport/37244/stable26
Browse files Browse the repository at this point in the history
[stable26] Replace custom tooltips with native ones and add description to all e…
  • Loading branch information
JuliaKirschenheuter authored Mar 24, 2023
2 parents 8a8f6e6 + 9291267 commit 0a0c741
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 26 deletions.
1 change: 0 additions & 1 deletion apps/user_ldap/js/wizard/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ OCA = OCA || {};
this.$settings.tabs({});
$('#ldapSettings button:not(.icon-default-style):not(.ui-multiselect)').button();
$('#ldapSettings').tabs({ beforeActivate: this.onTabChange });
$('#ldapSettings :input').tooltip({placement: "right", container: "body", trigger: "hover"});

this.initControls();
this.disableTabs();
Expand Down
13 changes: 13 additions & 0 deletions apps/user_ldap/templates/part.wizard-groupfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@
<p class="ldapManyGroupsSupport hidden">
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
aria-describedby="ldapGroupListAvailable_instructions"
title="<?php p($l->t('Available groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListAvailable_instructions">
<?php p($l->t('Available groups'));?>
</p>
<span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>
<select class="ldapGroupList ldapGroupListSelected" multiple="multiple"
aria-describedby="ldapGroupListSelected_instructions"
title="<?php p($l->t('Selected groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListSelected_instructions">
<?php p($l->t('Selected groups'));?>
</p>
</p>
<p>
<label><a id='toggleRawGroupFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label>
Expand All @@ -45,8 +53,13 @@
<p id="rawGroupFilterContainer" class="invisible">
<textarea type="text" id="ldap_group_filter" name="ldap_group_filter"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="rawGroupFilterContainer_instructions"
title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()]));?>">
</textarea>
<p class="hidden-visually" id="rawGroupFilterContainer_instructions">
<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()]));?>
</p>

</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
Expand Down
18 changes: 17 additions & 1 deletion apps/user_ldap/templates/part.wizard-loginfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
</label>

<input type="checkbox" id="ldap_loginfilter_username"
aria-describedby="ldap_loginfilter_username_instructions"
title="<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>"
name="ldap_loginfilter_username" value="1" />
<p class="hidden-visually" id="ldap_loginfilter_username_instructions">
<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>
</p>
</p>
<p>
<label for="ldap_loginfilter_email">
Expand All @@ -19,7 +23,11 @@

<input type="checkbox" id="ldap_loginfilter_email"
title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>"
aria-describedby="ldap_loginfilter_email_instructions"
name="ldap_loginfilter_email" value="1" />
<p class="hidden-visually" id="ldap_loginfilter_email_instructions">
<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>
</p>
</p>
<p>
<label for="ldap_loginfilter_attributes">
Expand All @@ -41,8 +49,12 @@
<textarea type="text" id="ldap_login_filter" name="ldap_login_filter"
class="ldapFilterInputElement"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="ldap_login_filter_instructions"
title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>">
</textarea>
<p class="hidden-visually" id="ldap_login_filter_instructions">
<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>
</p>
</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
Expand All @@ -51,7 +63,11 @@ class="ldapFilterInputElement"
<input type="text" id="ldap_test_loginname" name="ldap_test_loginname"
placeholder="<?php p($l->t('Test Loginname'));?>"
class="ldapVerifyInput"
title="Attempts to receive a DN for the given loginname and the current login filter"/>
aria-describedby="ldap_test_loginname_instructions"
title="<?php p($l->t('Attempts to receive a DN for the given loginname and the current login filter'));?>"/>
<p class="hidden-visually" id="ldap_test_loginname_instructions">
<?php p($l->t('Attempts to receive a DN for the given loginname and the current login filter'));?>
</p>
<button class="ldapVerifyLoginName" name="ldapTestLoginSettings" type="button" disabled="disabled">
<?php p($l->t('Verify settings'));?>
</button>
Expand Down
32 changes: 32 additions & 0 deletions apps/user_ldap/templates/part.wizard-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,27 @@
?>
</select>
<button type="button" id="ldap_action_add_configuration"
aria-describedby="ldap_action_add_configuration_instructions"
name="ldap_action_add_configuration" class="icon-add icon-default-style"
title="<?php p($l->t('Add a new configuration'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_add_configuration_instructions">
<?php p($l->t('Add a new configuration'));?>
</p>
<button type="button" id="ldap_action_copy_configuration"
name="ldap_action_copy_configuration"
aria-describedby="ldap_action_copy_configuration_instructions"
class="ldapIconCopy icon-default-style"
title="<?php p($l->t('Copy current configuration into new directory binding'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_copy_configuration_instructions">
<?php p($l->t('Copy current configuration into new directory binding'));?>
</p>
<button type="button" id="ldap_action_delete_configuration"
aria-describedby="ldap_action_delete_configuration_instructions"
name="ldap_action_delete_configuration" class="icon-delete icon-default-style"
title="<?php p($l->t('Delete the current configuration'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_delete_configuration_instructions">
<?php p($l->t('Delete the current configuration'));?>
</p>
</p>

<div class="hostPortCombinator">
Expand All @@ -30,9 +42,13 @@ class="ldapIconCopy icon-default-style"
<div class="table">
<input type="text" class="host" id="ldap_host"
name="ldap_host"
aria-describedby="ldap_host_instructions"
placeholder="<?php p($l->t('Host'));?>"
title="<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>"
/>
<p class="hidden-visually" id="ldap_host_instructions">
<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>
</p>
<span class="hostPortCombinatorSpan">
<input type="number" id="ldap_port" name="ldap_port"
placeholder="<?php p($l->t('Port'));?>" />
Expand All @@ -47,17 +63,25 @@ class="ldapIconCopy icon-default-style"
<div class="tablerow">
<input type="text" id="ldap_dn" name="ldap_dn"
class="tablecell"
aria-describedby="ldap_dn_instructions"
placeholder="<?php p($l->t('User DN'));?>" autocomplete="off"
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.'));?>"
/>
<p class="hidden-visually" id="ldap_dn_instructions">
<?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.'));?>
</p>
</div>

<div class="tablerow">
<input type="password" id="ldap_agent_password"
class="tablecell" name="ldap_agent_password"
aria-describedby="ldap_agent_password_instructions"
placeholder="<?php p($l->t('Password'));?>" autocomplete="off"
title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>"
/>
<p class="hidden-visually" id="ldap_agent_password_instructions">
<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>
</p>
<button class="ldapSaveAgentCredentials" name="ldapSaveAgentCredentials" type="button">
<?php p($l->t('Save Credentials'));?>
</button>
Expand All @@ -67,9 +91,13 @@ class="tablecell" name="ldap_agent_password"
<div class="tablerow">
<textarea id="ldap_base" name="ldap_base"
class="tablecell"
aria-describedby="ldap_base_instructions"
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'));?>">
</textarea>
<p class="hidden-visually" id="ldap_base_instructions">
<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>
</p>
<button class="ldapDetectBase" name="ldapDetectBase" type="button">
<?php p($l->t('Detect Base DN'));?>
</button>
Expand All @@ -81,8 +109,12 @@ class="tablecell"
<div class="tablerow left">
<input type="checkbox" id="ldap_experienced_admin" value="1"
name="ldap_experienced_admin" class="tablecell"
aria-describedby="ldap_experienced_admin_instructions"
title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>"
/>
<p class="hidden-visually" id="ldap_experienced_admin_instructions">
<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>
</p>
<label for="ldap_experienced_admin" class="tablecell">
<?php p($l->t('Manually enter LDAP filters (recommended for large directories)'));?>
</label>
Expand Down
12 changes: 12 additions & 0 deletions apps/user_ldap/templates/part.wizard-userfilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@
<p class="ldapManyGroupsSupport hidden">
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
aria-describedby="ldapGroupListAvailable_instructions"
title="<?php p($l->t('Available groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListAvailable_instructions">
<?php p($l->t('Available groups'));?>
</p>
<span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>
<select class="ldapGroupList ldapGroupListSelected" multiple="multiple"
aria-describedby="ldapGroupListSelected_instructions"
title="<?php p($l->t('Selected groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListSelected_instructions">
<?php p($l->t('Selected groups'));?>
</p>
</p>
<p>
<label><a id='toggleRawUserFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label>
Expand All @@ -49,8 +57,12 @@
<textarea type="text" id="ldap_userlist_filter" name="ldap_userlist_filter"
class="ldapFilterInputElement"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="ldap_userlist_filter_instructions"
title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()]));?>">
</textarea>
<p class="hidden-visually" id="ldap_userlist_filter_instructions">
<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()]));?>
</p>
</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/user_ldap/templates/renewpassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
placeholder="<?php echo $l->t('New password');?>"
data-typetoggle="#personal-show" autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/>
</p>
<input type="submit" id="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Renew password')); ?>"/>

<input type="submit" id="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Renew password')); ?>"/>

<?php if (!empty($_['invalidpassword'])) { ?>
<p class="warning">
Expand Down
Loading

0 comments on commit 0a0c741

Please sign in to comment.