tainewoo / redmine_ldap_sync

A redmine plugin to synchronize both users and groups with an ldap server, forked from thorin which is unmaintained.
http://www.redmine.org/plugins/redmine_ldap_sync
GNU General Public License v3.0
17 stars 13 forks source link

Fix error: form control with name='...' is not focusable #6

Closed LukasK32 closed 4 years ago

LukasK32 commented 4 years ago

Current Behavior

Clicking "Save" button in plugin settings does not submit the form. The following error is thrown (in Chrome):

An invalid form control with name='ldap_setting[parent_group]' is not focusable.
An invalid form control with name='ldap_setting[group_parentid]' is not focusable.
An invalid form control with name='ldap_setting[member_group]' is not focusable.
An invalid form control with name='ldap_setting[group_memberid]' is not focusable.

Solution

Error is thrown because there are hidden required inputs. To solve this, required attribute must be removed when inputs are hidden and added when they are shown again.

Tests

This PR has been tested in the following browsers:

Redmine version: 4.1.0.stable with Easy Redmine 9.00 (ER 2019)

tainewoo commented 4 years ago

Hi @LukasK32 ,

Thank you for your PR. Because I don't have the Redmine4.1 with Easy Redmine, so I didn't test it. I merged this PR, and if there is any new issue pop up, we will look into it again. Thank you again for your help.