From b519fea791c953eebf6cfee1a02d5cd6e4c01a1f Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Fri, 20 Sep 2024 14:13:53 +1000 Subject: [PATCH] changes based on the feedbacks --- tide_webform.module | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tide_webform.module b/tide_webform.module index ce0d625..f4fc764 100644 --- a/tide_webform.module +++ b/tide_webform.module @@ -460,7 +460,9 @@ function tide_webform_webform_third_party_settings_form_alter(array &$form, Form } catch (\Exception $e) { \Drupal::messenger()->addWarning('Unable to load CAPTCHA type options. Please contact the site administrator.'); - \Drupal::logger('tide_webform')->error('Error loading CAPTCHA type options: @message', ['@message' => $e->getMessage()]); + \Drupal::logger('tide_webform') + ->error('Error loading CAPTCHA type options for webform @webform: @message', + ['@webform' => $webform->id(), '@message' => $e->getMessage()]); return; } if (isset($third_party_settings['captcha_type'])) { @@ -488,12 +490,12 @@ function tide_webform_webform_third_party_settings_form_alter(array &$form, Form $form['third_party_settings']['tide_webform_captcha']['enable_captcha'] = [ '#type' => 'checkbox', '#default_value' => !empty($third_party_settings['enable_captcha']) ? $third_party_settings['enable_captcha'] : NULL, - '#title' => ('Enable captcha'), + '#title' => t('Enable captcha'), ]; $form['third_party_settings']['tide_webform_captcha']['captcha_type'] = [ '#type' => 'select', - '#title' => 'Captcha type', + '#title' => t('Captcha type'), '#options' => [ 'all' => '-Select-', ] + $allowed_values,