Skip to content
Snippets Groups Projects

remove unnecessary i18n context

1 file
+ 8
8
Compare changes
  • Side-by-side
  • Inline
+ 8
8
@@ -30,7 +30,7 @@ class SettingsForm extends ConfigFormBase {
$form['disclose_registration'] = [
'#type' => 'checkbox',
'#title' => $this->t('Disclose user account identifiers', [], ['context' => 'Webauthn']),
'#title' => $this->t('Disclose user account identifiers'),
'#description' => $this->t("By default, users are not warned even when they provide an invalid userHandle. This is to increase security by preventing attackers from confirming whether a userHandle has been registered. However, this reduces usability because users may have mistyped the userHandle. Check this box if you want to disclose to users that accounts have been registered."),
'#required' => FALSE,
'#default_value' => $config->get('disclose_registration'),
@@ -45,8 +45,8 @@ class SettingsForm extends ConfigFormBase {
$form['relying_party']['name'] = [
'#type' => 'textfield',
'#title' => $this->t('Name', [], ['context' => 'WebAuthn']),
'#description' => $this->t('The name for the site under WebAuthn context. Defaults to Drupal site name.', [], ['context' => 'WebAuthn']),
'#title' => $this->t('Name'),
'#description' => $this->t('The name for the site under the WebAuthn context. Defaults to Drupal site name.'),
'#required' => TRUE,
'#default_value' => $config->get('relying_party.name') ?? $this->config('system.site')
->get('name'),
@@ -54,7 +54,7 @@ class SettingsForm extends ConfigFormBase {
$form['relying_party']['id_auto'] = [
'#type' => 'checkbox',
'#title' => $this->t('Automatically set ID to site domain', [], ['context' => 'Webauthn']),
'#title' => $this->t('Automatically set ID to site domain'),
'#description' => $this->t("Usually, the id is the site's current domain. This attempts to set the domain based on the Drupal request."),
'#required' => FALSE,
'#default_value' => $config->get('relying_party.id_auto'),
@@ -63,7 +63,7 @@ class SettingsForm extends ConfigFormBase {
$form['relying_party']['id'] = [
'#type' => 'textfield',
'#title' => $this->t('ID', [], ['context' => 'WebAuthn']),
'#description' => $this->t('The rp ID shall be the domain of the application without the scheme, userinfo, port, path, or user. No IP addresses.', [], ['context' => 'WebAuthn']),
'#description' => $this->t('The rp ID shall be the domain of the application without the scheme, userinfo, port, path, or user. No IP addresses.'),
'#required' => TRUE,
'#default_value' => $config->get('relying_party.id'),
'#states' => [
@@ -80,14 +80,14 @@ class SettingsForm extends ConfigFormBase {
'#upload_validators' => [
'file_validate_extensions' => ['jpg', 'jpeg', 'ico', 'svg', 'png'],
],
'#title' => $this->t('Logo', [], ['context' => 'WebAuthn']),
'#description' => $this->t('(optional) The logo. Is stored using Base64 encoding. The icon may be ignored by browsers, especially if its length is greater than 128 bytes.', [], ['context' => 'WebAuthn']),
'#title' => $this->t('Logo'),
'#description' => $this->t('(optional) The logo. Is stored using Base64 encoding. The icon may be ignored by browsers, especially if its length is greater than 128 bytes.'),
];
if (is_string($logo) && $logo !== '') {
$form_state->set('current_logo', $logo);
$form['relying_party']['current_logo_header'] = [
'#markup' => $this->t('Current logo', [], ['context' => 'Webauthn']) . '<br />',
'#markup' => $this->t('Current logo') . '<br />',
];
$form['relying_party']['current_logo'] = [
'#type' => 'html_tag',
Loading