@@ -73,37 +73,43 @@ public function buildForm(array $form, FormStateInterface $form_state) {
7373 $ form ['show_drupal_login ' ] = [
7474 '#type ' => 'checkbox ' ,
7575 '#title ' => $ this ->t ('Show Drupal login ' ),
76- '#default_value ' => $ config ->get ('show_drupal_login ' ),
76+ '#default_value ' => FALSE ,
77+ '#disabled ' => TRUE ,
7778 '#description ' => $ this ->t (
78- 'Show Drupal (username and password) login on user login page. If not enabled, the login form will still be visible if <a href="@login_url"><code>#drupal-login</code></a> is appended to the url ( <a href="@login_url">@login_url </a>) . ' ,
79+ 'This option has been removed. This is now controlled by the "@config_title" setting in the <a href=":config_url">OpenID Connect settings </a>. ' ,
7980 [
80- '@login_url ' => Url::fromRoute ('user.login ' , [], [
81- 'absolute ' => TRUE ,
82- 'fragment ' => 'drupal-login ' ,
83- ])->toString (),
84- ]),
81+ '@config_title ' => $ this ->t ('OpenID buttons display in user login form ' ),
82+ ':config_url ' => Url::fromRoute ('openid_connect.admin_settings ' )->toString (),
83+ ],
84+ ),
8585 ];
8686
8787 $ form ['show_oidc_login ' ] = [
8888 '#type ' => 'checkbox ' ,
8989 '#title ' => $ this ->t ('Show OpenID Connect login ' ),
90- '#default_value ' => $ config ->get ('show_oidc_login ' ),
90+ '#default_value ' => FALSE ,
91+ '#disabled ' => TRUE ,
9192 '#description ' => $ this ->t (
92- 'Show OpenID Connect login button on user login page. Set up proper <a href="@ config_url">OpenID Connect configuration </a> before enabling this . ' ,
93+ 'This option has been removed. This is now controlled by the "@config_title" setting in the <a href=": config_url">OpenID Connect settings </a>. ' ,
9394 [
94- '@config_url ' => Url::fromRoute ('openid_connect.admin_settings ' )->toString (),
95- ]
95+ '@config_title ' => $ this ->t ('OpenID buttons display in user login form ' ),
96+ ':config_url ' => Url::fromRoute ('openid_connect.admin_settings ' )->toString (),
97+ ],
9698 ),
9799 ];
98100
99- $ options ['oidc ' ] = $ this ->t ('OpenID Connect ' );
100101 $ form ['default_login_method ' ] = [
101102 '#type ' => 'select ' ,
102103 '#title ' => $ this ->t ('Default login method ' ),
103- '#options ' => $ options ,
104- '#empty_value ' => '' ,
105- '#default_value ' => $ config ->get ('default_login_method ' ),
106- '#description ' => $ this ->t ('The default login method to use. If specified, anonymous users will automatically be logged in with this method. ' ),
104+ '#default_value ' => FALSE ,
105+ '#disabled ' => TRUE ,
106+ '#description ' => $ this ->t (
107+ 'This option has been removed. This is now controlled by the "@config_title" setting in the <a href=":config_url">OpenID Connect settings</a>. ' ,
108+ [
109+ '@config_title ' => $ this ->t ('Autostart login process ' ),
110+ ':config_url ' => Url::fromRoute ('openid_connect.admin_settings ' )->toString (),
111+ ],
112+ ),
107113 ];
108114
109115 $ form ['hide_logout_menu_item ' ] = [
@@ -121,9 +127,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
121127 */
122128 public function submitForm (array &$ form , FormStateInterface $ form_state ) {
123129 $ this ->configFactory ->getEditable (static ::SETTINGS_NAME )
124- ->set ('show_drupal_login ' , $ form_state ->getValue ('show_drupal_login ' ))
125- ->set ('show_oidc_login ' , $ form_state ->getValue ('show_oidc_login ' ))
126- ->set ('default_login_method ' , $ form_state ->getValue ('default_login_method ' ))
127130 ->set ('hide_logout_menu_item ' , $ form_state ->getValue ('hide_logout_menu_item ' ))
128131 ->save ();
129132
0 commit comments