Accept button text should be customizable.

Comments

greg.zielinski created an issue. See original summary.

greg.zielinski’s picture

StatusFileSize
new2.86 KB
sophie.sk’s picture

Just a couple of things:

  1. +++ b/iubenda.install
    @@ -16,6 +16,7 @@ function iubenda_update_8001() {
    +    ->set('buttons.accept_button_text', 'Accept')
    

    This will have to be a new update hook, because sites may already be using the current version/have already run this update hook.

  2. +++ b/src/Form/IubendaSettingsForm.php
    @@ -127,6 +127,17 @@ class IubendaSettingsForm extends ConfigFormBase {
    +      '#states' => [
    +        'required' => [
    +          ':input[name="accept_button[enabled]"]' => ['checked' => TRUE],
    +        ],
    +      ],
    

    If this is required, it would be good to provide a default value. Iubenda provides a value ("Accept") so that could go here.

Thank you for the contribution!

sophie.sk’s picture

Status: Active » Needs work
greg.zielinski’s picture

StatusFileSize
new3.13 KB
sophie.sk’s picture

Status: Needs work » Needs review
sophie.sk’s picture

Made a few small changes to the patch.

sophie.sk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.