Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for checkboxes with Custom Login Fields #2372

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

varjolintu
Copy link
Member

Add support for selecting checkbox elements with Custom Login Fields.

Two different input query patterns are used, where only the String Fields selection allows checkboxes. Added :not([disabled]) to prevent selecting disabled checkboxes.
The checkbox selection overlay is fixed size, and centered to the element.
KPH value true (any case is accepted) will be used for the element's checked attribute. Other values are ignored.

For testing:

  • Go to GitLab's login page: https://gitlab.com/users/sign_in
  • Select Custom Login Fields for username and password, plus a String Field for the checkbox.
  • Add KPH: checkbox with value true to the entry attributes in KeePassXC.
  • Go to the login page and fill the credentials. The checkbox should be checked after fill.

Fixes #2050.

@varjolintu varjolintu added this to the 1.9.5 milestone Oct 27, 2024
Copy link
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, can we adjust the button from "String Field" to something like "Text or Checkbox". String is a programming term.

@varjolintu
Copy link
Member Author

This is awesome, can we adjust the button from "String Field" to something like "Text or Checkbox". String is a programming term.

Maybe something like "Extra fields" or "Extra input or checkbox" could do. "Text" could mean for the user that you can actually select some text elements from the page?

@droidmonkey
Copy link
Member

Extra fields is perfect, add a tool tip that describes what kind of fields are supported. Would it also be possible in a future update to automatically create the KPH entries in KPXC as well?

@varjolintu
Copy link
Member Author

Could be. Although it will require a credential selection where to save the settings. The feature can be used without credentials as well, so it can be tricky.

@varjolintu
Copy link
Member Author

I'll make a separate change for the String Fields -> Extra Fields. That has to be changed for many files and translations. I'd like to change the inner variable names as well + documentation.

@varjolintu varjolintu merged commit 82fef19 into develop Oct 27, 2024
@varjolintu varjolintu deleted the feature/custom_login_fields_checkbox_support branch October 27, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-tick "remember me" boxes on login pages
2 participants