Skip to content

Commit

Permalink
Option consent_modal_equal_weight_buttons ermöglichen
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w committed Sep 13, 2024
1 parent c0271d5 commit e5a73a6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fragments/wsm.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
consentModal: {
layout: '<?= Wsm::getConfig('consent_settings_layout', 'string', '') ?>',
position: '<?= Wsm::getConfig('consent_modal_position', 'string', '') ?>',
equalWeightButtons: true,
equalWeightButtons: <?= Wsm::getConfig('consent_modal_equal_weight_buttons', 'bool') ? 'true' : 'false' ?>,
flipButtons: <?= Wsm::getConfig('consent_modal_swap_buttons', 'bool') ? 'true' : 'false' ?>,
},
preferencesModal: {
Expand Down
4 changes: 4 additions & 0 deletions lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ consent_modal_description = Einleitung
consent_modal_settings = Einstellungen
consent_modal_accept_all = Alle zulassen
consent_modal_accept_necessary = Nur notwendige zulassen
consent_modal_equal_weight_buttons = Buttons gleich gewichten
consent_modal_equal_weight_buttons_yes = Ja (empfohlen)
consent_modal_equal_weight_buttons_no = Nein, "Alle zulassen" optisch hervorheben (nicht empfohlen)


consent_settings = Einstellungs-Dialog

Expand Down
1 change: 1 addition & 0 deletions package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ default_config:
consent_modal_layout: cloud
consent_modal_position: bottom center
consent_modal_swap_buttons: true
consent_modal_equal_weight_buttons: false
consent_settings_layout: box

consent_modal_open: Einstellungen öffnen
Expand Down
7 changes: 7 additions & 0 deletions pages/settings.consent.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@
$select->addOption('invert buttons', 1);
$select->addOption('do not invert buttons', 0);

$field = $form->addSelectField('consent_modal_equal_weight_buttons', null, ['class' => 'form-control selectpicker']);
$field->setLabel($addon->i18n('consent_modal_equal_weight_buttons'));
$select = $field->getSelect();
$select->addOption($addon->i18n('consent_modal_equal_weight_buttons_yes'), 1);
$select->addOption($addon->i18n('consent_modal_equal_weight_buttons_no'), 0);

$field = $form->addSelectField('consent_settings_layout', null, ['class' => 'form-control selectpicker']);
$field->setLabel($addon->i18n('consent_settings_layout'));
$select = $field->getSelect();
$select->addOption('box', 'box');
$select->addOption('bar', 'bar');


$field = $form->addSelectField('disable_page_interaction', null, ['class' => 'form-control selectpicker']);
$field->setLabel($addon->i18n('disable_page_interaction'));
$select = $field->getSelect();
Expand Down

0 comments on commit e5a73a6

Please sign in to comment.