Problem/Motivation

Certificate related fields should be only visible if the field "Use certificate for login (use_cert)" is set to "Use certificate"

Proposed resolution

Make $form['plugin_settings']['oauth2_client']['cert_file_path'] and $form['plugin_settings']['oauth2_client']['cert_file'] fields conditional with '#states' settings:

'#states' => [
  'visible' => [
    ':input[name="use_cert"]' => ['value' => '1'],
  ],
],

Issue fork pwbi-3508867

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phergo created an issue. See original summary.

enriquelacoma made their first commit to this issue’s fork.

enriquelacoma’s picture

Version: 1.x-dev » 2.0.3
Assigned: Unassigned » enriquelacoma

enriquelacoma’s picture

In this form #states does not work, so I created a js file to take care of hidding the fields

enriquelacoma’s picture

Status: Active » Needs review
aaron gil martinez’s picture

Looks good to me +1

enriquelacoma’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

enriquelacoma’s picture

Status: Fixed » Closed (fixed)