]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent button click when enter key is pressed in LDAP wizard
authorVincent Petry <pvince81@owncloud.com>
Wed, 8 Oct 2014 13:09:02 +0000 (15:09 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 8 Oct 2014 13:09:02 +0000 (15:09 +0200)
Pressing enter in the LDAP wizard will trigger a click on the first
button. In the main page it would trigger the delete dialog, which is
quite inconvenient.

Added a type attribute to suppress this behavior.

apps/user_ldap/templates/part.settingcontrols.php
apps/user_ldap/templates/part.wizard-server.php
apps/user_ldap/templates/settings.php

index ddf65e8a7541a3b7036dc54cbf9cc85b88f6015d..bcccb59a7dd24fd0bb3ece54b6efb763a43cb5a9 100644 (file)
@@ -1,6 +1,6 @@
 <div class="ldapSettingControls">
        <input class="ldap_submit" value="<?php p($l->t('Save'));?>" type="submit">
-       <button class="ldap_action_test_connection" name="ldap_action_test_connection">
+       <button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection">
                <?php p($l->t('Test Configuration'));?>
        </button>
        <a href="<?php p(\OC_Helper::linkToDocs('admin-ldap')); ?>"
index 422faad028b0679b401e76439603c85ac35d4983..bee2b874178504cff2f3fc3bb6c2655e740bd783 100644 (file)
@@ -24,7 +24,7 @@
                ?>
                <option value="NEW"><?php p($l->t('Add Server Configuration'));?></option>
                </select>
-               <button id="ldap_action_delete_configuration"
+               <button type="button" id="ldap_action_delete_configuration"
                        name="ldap_action_delete_configuration"><?php p($l->t('Delete Configuration'));?></button>
                </p>
 
index 38043fb34a801ae869f93843fcf3f69ef9b05102..6a02b795258b188bcc707e8b05a4d1494dc1beb3 100644 (file)
@@ -59,7 +59,7 @@
                <p class="ldapIndent"><label for="ldap_expert_uuid_group_attr"><?php p($l->t('UUID Attribute for Groups:'));?></label><input type="text" id="ldap_expert_uuid_group_attr" name="ldap_expert_uuid_group_attr" data-default="<?php p($_['ldap_expert_uuid_group_attr_default']); ?>" /></p>
                <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>
+               <p class="ldapIndent"><button type="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 type="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>
        </div>