joomlagerman / joomla

The J!German translation team provides German translation for Joomla!
https://www.jgerman.de
GNU General Public License v2.0
25 stars 46 forks source link

[5.1] Guided Tours - Add checkbox/radio/select target element support, enhanced required field handling #3094

Closed jgerman-bot closed 6 months ago

jgerman-bot commented 7 months ago

New language relevant PR in upstream repo: https://github.com/joomla/joomla-cms/pull/40994 Here are the upstream changes:

Click to expand the diff! ```diff diff --git a/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-10.sql b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-10.sql new file mode 100644 index 0000000000000..946516cde5104 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-10.sql @@ -0,0 +1 @@ +ALTER TABLE `#__guidedtour_steps` ADD COLUMN `params` text NULL /** CAN FAIL **/; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-10.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-10.sql new file mode 100644 index 0000000000000..29375e78c1f50 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-10.sql @@ -0,0 +1 @@ +ALTER TABLE "#__guidedtour_steps" ADD COLUMN "params" text NULL /** CAN FAIL **/; diff --git a/administrator/components/com_guidedtours/forms/step.xml b/administrator/components/com_guidedtours/forms/step.xml index e0d1ba212d012..69d9b6cf31968 100644 --- a/administrator/components/com_guidedtours/forms/step.xml +++ b/administrator/components/com_guidedtours/forms/step.xml @@ -120,6 +120,8 @@ > + + @@ -189,4 +191,47 @@ maxlength="255" /> + + +
+ +
+ + + + + + + + + +
+
+
+ diff --git a/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php b/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php index 19703055ae07c..b043f9868e192 100644 --- a/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php +++ b/administrator/components/com_guidedtours/src/Extension/GuidedtoursComponent.php @@ -100,6 +100,20 @@ class GuidedtoursComponent extends MVCComponent implements BootableExtensionInte */ public const STEP_INTERACTIVETYPE_OTHER = 3; + /** + * An interactive step for checkbox/radio fields + * + * @since __DEPLOY_VERSION__ + */ + public const STEP_INTERACTIVETYPE_CHECKBOX_RADIO = 5; + + /** + * An interactive step for select element fields + * + * @since __DEPLOY_VERSION__ + */ + public const STEP_INTERACTIVETYPE_SELECT = 6; + /** * Booting the extension. This is the function to set up the environment of the extension like * registering new class loaders, etc. diff --git a/administrator/components/com_guidedtours/src/Model/StepsModel.php b/administrator/components/com_guidedtours/src/Model/StepsModel.php index e81680b990f7b..acf733565fec2 100644 --- a/administrator/components/com_guidedtours/src/Model/StepsModel.php +++ b/administrator/components/com_guidedtours/src/Model/StepsModel.php @@ -16,6 +16,7 @@ use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper; use Joomla\Database\DatabaseQuery; use Joomla\Database\ParameterType; +use Joomla\Registry\Registry; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects @@ -248,6 +249,13 @@ public function getItems() $item->title = Text::_($item->title); $item->description = Text::_($item->description); + + if (isset($item->params)) { + $params = new Registry($item->params); + if (!empty($item->params->requiredvalue)) { + $item->params->requiredvalue = Text::_($item->params->requiredvalue); + } + } } return $items; diff --git a/administrator/components/com_guidedtours/src/Model/TourModel.php b/administrator/components/com_guidedtours/src/Model/TourModel.php index 12ff03e0f585a..8876680680f62 100644 --- a/administrator/components/com_guidedtours/src/Model/TourModel.php +++ b/administrator/components/com_guidedtours/src/Model/TourModel.php @@ -371,6 +371,7 @@ public function duplicate(&$pks) 'checked_out_time', 'checked_out', 'language', + 'params', 'note', ] ) @@ -400,6 +401,7 @@ public function duplicate(&$pks) $db->quoteName('modified'), $db->quoteName('modified_by'), $db->quoteName('language'), + $db->quoteName('params'), $db->quoteName('note'), ] ); @@ -421,6 +423,7 @@ public function duplicate(&$pks) ParameterType::INTEGER, ParameterType::STRING, ParameterType::STRING, + ParameterType::STRING, ]; $query->values( @@ -442,6 +445,7 @@ public function duplicate(&$pks) $date, $user->id, $step->language, + $step->params, $step->note, ], $dataTypes diff --git a/administrator/components/com_guidedtours/src/Table/StepTable.php b/administrator/components/com_guidedtours/src/Table/StepTable.php index b856b75a8dd13..5a6d21281554d 100644 --- a/administrator/components/com_guidedtours/src/Table/StepTable.php +++ b/administrator/components/com_guidedtours/src/Table/StepTable.php @@ -16,6 +16,7 @@ use Joomla\CMS\User\CurrentUserTrait; use Joomla\Database\DatabaseDriver; use Joomla\Event\DispatcherInterface; +use Joomla\Registry\Registry; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; @@ -51,6 +52,28 @@ public function __construct(DatabaseDriver $db, DispatcherInterface $dispatcher parent::__construct('#__guidedtour_steps', 'id', $db, $dispatcher); } + /** + * Overloaded bind function. + * + * @param array $array named array + * @param string $ignore An optional array or space separated list of properties + * to ignore while binding. + * + * @return mixed Null if operation was satisfactory, otherwise returns an error + * + * @see Table::bind() + * @since __DEPLOY_VERSION__ + */ + public function bind($array, $ignore = '') + { + if (isset($array['params']) && \is_array($array['params'])) { + $registry = new Registry($array['params']); + $array['params'] = (string) $registry; + } + + return parent::bind($array, $ignore); + } + /** * Stores a step. * diff --git a/administrator/components/com_guidedtours/tmpl/step/edit.php b/administrator/components/com_guidedtours/tmpl/step/edit.php index a17b46147074b..83e046bbfc28d 100644 --- a/administrator/components/com_guidedtours/tmpl/step/edit.php +++ b/administrator/components/com_guidedtours/tmpl/step/edit.php @@ -19,13 +19,16 @@ /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ $wa = $this->document->getWebAssetManager(); $wa->useScript('keepalive') - ->useScript('form.validate'); + ->useScript('form.validate') + ->useScript('com_guidedtours.tour-edit'); if (empty($this->item->tour_id)) { throw new GenericDataException("\nThe Tour id was not set!\n", 500); } $lang = $this->getLanguage()->getTag(); + +$this->useCoreUI = true; ?>
@@ -86,7 +91,7 @@
fields = []; + $this->fields = []; $this->hidden_fields = []; echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
diff --git a/administrator/language/en-GB/com_guidedtours.ini b/administrator/language/en-GB/com_guidedtours.ini index 84b009fb525dc..f7e1789ed2171 100644 --- a/administrator/language/en-GB/com_guidedtours.ini +++ b/administrator/language/en-GB/com_guidedtours.ini @@ -13,8 +13,10 @@ COM_GUIDEDTOURS_EXTENSIONS_DESC="Restrict the tour to be displayed only when the COM_GUIDEDTOURS_EXTENSIONS_LABEL="Component Selector" COM_GUIDEDTOURS_FIELD_NOTE_LABEL="Note" COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_BUTTON="Button" +COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_CHECKBOX_RADIO_FIELD="Checkbox/Radio" COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_FORM_SUBMIT="Form Submit" COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_OTHER="Other" +COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_SELECT_LIST="Select List" COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_TEXT_FIELD="Text Field" COM_GUIDEDTOURS_FIELD_VALUE_STEP_TYPE_INTERACTIVE="Interactive" COM_GUIDEDTOURS_FIELD_VALUE_STEP_TYPE_NEXT="Next" @@ -49,6 +51,8 @@ COM_GUIDEDTOURS_STEP_FILTER_SEARCH_LABEL="Search Steps" COM_GUIDEDTOURS_STEP_NEW_STEP="New Step" COM_GUIDEDTOURS_STEP_POSITION_DESC="Select the position of the step popup, relative to the element it points to." COM_GUIDEDTOURS_STEP_POSITION_LABEL="Position" +COM_GUIDEDTOURS_STEP_TARGETNOTE_MESSAGE="When a step is identified as interactive, specific interactive options might carry extra parameters for the user's interaction with a target." +COM_GUIDEDTOURS_STEP_TARGETVALUES_HEADING="Target Value Options" COM_GUIDEDTOURS_STEP_TITLE="Title" COM_GUIDEDTOURS_STEP_TITLE_TRANSLATION="Title (%s)" COM_GUIDEDTOURS_STEP_TARGET_DESC="The target element the step will be attached to. Options: .classname, #id, any selector following the CSS syntax (make sure it is a focusable element if the step is interactive), or leave blank for a centered step." @@ -74,7 +78,11 @@ COM_GUIDEDTOURS_TOURS_LIST="Guided Tours" COM_GUIDEDTOURS_TOURS_LIST_EMPTYSTATE_BUTTON_ADD="Add your first tour" COM_GUIDEDTOURS_TOURS_LIST_EMPTYSTATE_CONTENT="Create a tour to make it functional." COM_GUIDEDTOURS_TOURS_LIST_EMPTYSTATE_TITLE="No tours have been created yet." -COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_DESC="Select Form Submit to submit a form, Text Field for user input, Button for buttons, or Other for any other interaction." +COM_GUIDEDTOURS_TYPE_INPUT_REQUIRED_DESC="Enable if the user is required to provide a value, activate a radio button or check a box to move forward to the next step of the tour." +COM_GUIDEDTOURS_TYPE_INPUT_REQUIRED_LABEL="Required" +COM_GUIDEDTOURS_TYPE_INPUT_REQUIREDVALUE_DESC="The exact value to be entered, including case and punctuation, to move forward to the next step (if the target is a list of items, use the value of the select's option element)." +COM_GUIDEDTOURS_TYPE_INPUT_REQUIREDVALUE_LABEL="Required Value" +COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_DESC="Select Form Submit to submit a form, Text Field for user input, Button for buttons, Checkbox/Radio or Select List for selection, or Other for any other interaction." COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_LABEL="Interactive Type" COM_GUIDEDTOURS_TYPE_REDIRECT_URL_DESC="Enter the relative URL of the page you want the step to redirect to, eg administrator/index.php?option=com_guidedtours&view=tours for the tours' list page." COM_GUIDEDTOURS_TYPE_REDIRECT_URL_LABEL="Relative URL" diff --git a/build/media_source/com_guidedtours/joomla.asset.json b/build/media_source/com_guidedtours/joomla.asset.json new file mode 100644 index 0000000000000..32b9bf4a8527c --- /dev/null +++ b/build/media_source/com_guidedtours/joomla.asset.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json", + "name": "com_guidedtours", + "version": "4.0.0", + "description": "Joomla CMS", + "license": "GPL-2.0-or-later", + "assets": [ + { + "name": "com_guidedtours.tour-edit", + "type": "script", + "uri": "com_guidedtours/tour-edit.min.js", + "dependencies": [ + "core" + ], + "attributes": { + "type": "module", + "defer": true + } + } + ] +} diff --git a/build/media_source/com_guidedtours/js/tour-edit.es6.js b/build/media_source/com_guidedtours/js/tour-edit.es6.js new file mode 100644 index 0000000000000..6858160ce31a5 --- /dev/null +++ b/build/media_source/com_guidedtours/js/tour-edit.es6.js @@ -0,0 +1,37 @@ +/** + * @copyright (C) 2018 Open Source Matters, Inc. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +(() => { + 'use strict'; + + // before 'joomla:showon-processed' is implemented in Showon we must use more frequent 'joomla:showon-show' and'joomla:showon-hide' events + ['joomla:showon-show', 'joomla:showon-hide'].forEach((eventType) => { + document.addEventListener(eventType, () => { + document.querySelectorAll('#guidedtour-dates-form fieldset').forEach((fieldset) => { + // Only hide fieldsets containing field control-group i.e. not radio selectors etc. that may use fieldsets + if (fieldset.querySelectorAll(':scope .control-group').length === 0) { + return; + } + const visibleChildren = fieldset.querySelectorAll(':scope .control-group:not(.hidden)'); + if (visibleChildren.length) { + fieldset.classList.remove('hidden'); + } else { + fieldset.classList.add('hidden'); + } + }); + document.querySelectorAll('#guidedtour-dates-form joomla-tab-element').forEach((tabelement) => { + const tabLabel = document.querySelector(`button[aria-controls="${tabelement.id}"]`); + if (tabLabel) { + const visibleChildren = tabelement.querySelectorAll(':scope .control-group:not(.hidden)'); + if (visibleChildren.length) { + tabLabel.removeAttribute('hidden'); + } else { + tabLabel.setAttribute('hidden', 'hidden'); + } + } + }); + }); + }); +})(); diff --git a/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js b/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js index 363dfb08d0f23..decc52bacfe4a 100644 --- a/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js +++ b/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js @@ -66,6 +66,17 @@ function setFocus(primaryButton, secondaryButton, cancelButton) { } } +function enableButton(eventElement) { + const element = eventElement instanceof Event ? document.querySelector(`.step-next-button-${eventElement.currentTarget.step_id}`) : eventElement; + element.removeAttribute('disabled'); + element.classList.remove('disabled'); +} +function disableButton(eventElement) { + const element = eventElement instanceof Event ? document.querySelector(`.step-next-button-${eventElement.currentTarget.step_id}`) : eventElement; + element.setAttribute('disabled', 'disabled'); + element.classList.add('disabled'); +} + function addStepToTourButton(tour, stepObj, buttons) { const step = new Shepherd.Step(tour, { title: stepObj.title, @@ -74,6 +85,7 @@ function addStepToTourButton(tour, stepObj, buttons) { buttons, id: stepObj.id, arrow: true, + params: stepObj.params, beforeShowPromise() { return new Promise((resolve) => { // Set graceful fallbacks in case there is an issue with the target. @@ -116,6 +128,14 @@ function addStepToTourButton(tour, stepObj, buttons) { const element = this.getElement(); const target = this.getTarget(); + // if target element doesn't exist e.g. because we have navigated to a new page mid-tour then end the tour here! + // Take care though since some steps have no target to we check for these too + if (!target && this.options.attachTo.element) { + emptyStorage(); + this.cancel(); + return; + } + // Force the screen reader to only read the content of the popup after a refresh element.setAttribute('aria-live', 'assertive'); @@ -127,19 +147,66 @@ function addStepToTourButton(tour, stepObj, buttons) { const primaryButton = element.querySelector('.shepherd-button-primary'); const secondaryButton = element.querySelector('.shepherd-button-secondary'); - // The 'next' button should always be enabled if the target input field of type 'text' has a value - if ( - target.tagName.toLowerCase() === 'input' - && target.hasAttribute('required') - && (['email', 'password', 'search', 'tel', 'text', 'url'].includes(target.type)) - ) { - if (target.value.trim().length) { - primaryButton.removeAttribute('disabled'); - primaryButton.classList.remove('disabled'); - } else { - primaryButton.setAttribute('disabled', 'disabled'); - primaryButton.classList.add('disabled'); - } + // Check to see if the 'next' button should be enabled before showing the step based on being required or + // matching the required value + switch (this.options.attachTo.interactive_type) { + case 'text': + if ( + (target.hasAttribute('required') || (this.options.params.required || 0)) + && ( + (target.tagName.toLowerCase() === 'input' && ['email', 'password', 'search', 'tel', 'text', 'url'].includes(target.type)) + || target.tagName.toLowerCase() === 'textarea' + ) + ) { + if ((this.options.params.requiredvalue || '') !== '') { + if (target.value.trim() === this.options.params.requiredvalue) { + enableButton(primaryButton); + } else { + disableButton(primaryButton); + } + } else if (target.value.trim().length) { + enableButton(primaryButton); + } else { + disableButton(primaryButton); + } + } + break; + + case 'checkbox_radio': + if ( + target.tagName.toLowerCase() === 'input' + && (target.hasAttribute('required') || (this.options.params.required || 0)) + && ['checkbox', 'radio'].includes(target.type) + ) { + if (target.checked) { + enableButton(primaryButton); + } else { + disableButton(primaryButton); + } + } + break; + + case 'select': + if ( + target.tagName.toLowerCase() === 'select' + && (target.hasAttribute('required') || (this.options.params.required || 0)) + ) { + if ((this.options.params.requiredvalue || '') !== '') { + if (target.value.trim() === this.options.params.requiredvalue) { + enableButton(primaryButton); + } else { + disableButton(primaryButton); + } + } else if (target.value.trim().length) { + enableButton(primaryButton); + } else { + disableButton(primaryButton); + } + } + break; + + default: + break; } cancelButton.addEventListener('keydown', (event) => { @@ -206,6 +273,7 @@ function addStepToTourButton(tour, stepObj, buttons) { url: stepObj.url, type: stepObj.type, interactive_type: stepObj.interactive_type, + params: stepObj.params, }, }); } else { @@ -214,6 +282,7 @@ function addStepToTourButton(tour, stepObj, buttons) { url: stepObj.url, type: stepObj.type, interactive_type: stepObj.interactive_type, + params: stepObj.params, }, }); } @@ -292,17 +361,6 @@ function addBackButton(buttons, step) { }); } -function enableButton(event) { - const element = document.querySelector(`.step-next-button-${event.currentTarget.step_id}`); - element.removeAttribute('disabled'); - element.classList.remove('disabled'); -} -function disableButton(event) { - const element = document.querySelector(`.step-next-button-${event.currentTarget.step_id}`); - element.setAttribute('disabled', 'disabled'); - element.classList.add('disabled'); -} - function startTour(obj) { // We store the tour id to restart on site refresh sessionStorage.setItem('tourId', obj.id); @@ -342,7 +400,7 @@ function startTour(obj) { ind = 1; } - // Now let's add all follow up steps + // Now let's add all followup steps const len = obj.steps.length; let buttons; @@ -362,6 +420,12 @@ function startTour(obj) { && obj.steps[index].target && obj.steps[index].type === 'interactive' ) { + if (typeof obj.steps[index].params === 'string' && obj.steps[index].params !== '') { + obj.steps[index].params = JSON.parse(obj.steps[index].params); + } else { + obj.steps[index].params = []; + } + const ele = document.querySelector(obj.steps[index].target); if (ele) { if (obj && obj.steps && obj.steps[index] && obj.steps[index].interactive_type) { @@ -377,12 +441,63 @@ function startTour(obj) { case 'text': ele.step_id = index; - if (ele.hasAttribute('required') && ['email', 'password', 'search', 'tel', 'text', 'url'].includes(ele.type)) { + if ( + (ele.hasAttribute('required') || (obj.steps[index].params.required || 0)) + && ( + (ele.tagName.toLowerCase() === 'input' && ['email', 'password', 'search', 'tel', 'text', 'url'].includes(ele.type)) + || ele.tagName.toLowerCase() === 'textarea' + ) + ) { ['input', 'focus'].forEach((eventName) => ele.addEventListener(eventName, (event) => { if (!sessionStorage.getItem('tourId')) { return; } - if (event.target.value.trim().length) { + if ((obj.steps[index].params.requiredvalue || '') !== '') { + if (event.target.value.trim() === obj.steps[index].params.requiredvalue) { + enableButton(event); + } else { + disableButton(event); + } + } else if (event.target.value.trim().length) { + enableButton(event); + } else { + disableButton(event); + } + })); + } + break; + + case 'checkbox_radio': + ele.step_id = index; + if ( + ele.tagName.toLowerCase() === 'input' + && (ele.hasAttribute('required') || (obj.steps[index].params.required || 0)) + && ['checkbox', 'radio'].includes(ele.type) + ) { + ['click'].forEach((eventName) => ele.addEventListener(eventName, (event) => { + if (event.target.checked) { + enableButton(event); + } else { + disableButton(event); + } + })); + } + break; + + case 'select': + ele.step_id = index; + if ( + ele.tagName.toLowerCase() === 'select' + && (ele.hasAttribute('required') || (obj.steps[index].params.required || 0)) + ) { + ['change'].forEach((eventName) => ele.addEventListener(eventName, (event) => { + if ((obj.steps[index].params.requiredvalue || '') !== '') { + if (event.target.value.trim() === obj.steps[index].params.requiredvalue) { + enableButton(event); + } else { + disableButton(event); + } + } else if (event.target.value.trim().length) { enableButton(event); } else { disableButton(event); @@ -410,8 +525,7 @@ function startTour(obj) { if (index < len - 1) { if ( (obj && obj.steps[index].type !== 'interactive') - || (obj && obj.steps[index].interactive_type === 'text') - || (obj && obj.steps[index].interactive_type === 'other') + || (obj && ['text', 'checkbox_radio', 'select', 'other'].includes(obj.steps[index].interactive_type)) ) { pushNextButton(buttons, obj.steps[index]); } diff --git a/installation/sql/mysql/extensions.sql b/installation/sql/mysql/extensions.sql index 87c387478226f..83c56d346b0ae 100644 --- a/installation/sql/mysql/extensions.sql +++ b/installation/sql/mysql/extensions.sql @@ -1022,6 +1022,7 @@ CREATE TABLE IF NOT EXISTS `#__guidedtour_steps` ( `checked_out` int unsigned, `language` varchar(7) NOT NULL, `note` varchar(255) NOT NULL DEFAULT '', + `params` text, PRIMARY KEY (`id`), KEY `idx_tour` (`tour_id`), KEY `idx_state` (`published`), diff --git a/installation/sql/postgresql/extensions.sql b/installation/sql/postgresql/extensions.sql index 8adb349556c59..d266e720615bf 100644 --- a/installation/sql/postgresql/extensions.sql +++ b/installation/sql/postgresql/extensions.sql @@ -989,6 +989,7 @@ CREATE TABLE IF NOT EXISTS "#__guidedtour_steps" ( "checked_out" integer, "language" varchar(7) DEFAULT '' NOT NULL, "note" varchar(255) DEFAULT '' NOT NULL, + "params" text, PRIMARY KEY ("id") ); diff --git a/plugins/system/guidedtours/src/Extension/GuidedTours.php b/plugins/system/guidedtours/src/Extension/GuidedTours.php index a885920d79c2c..6ea48bbffedff 100644 --- a/plugins/system/guidedtours/src/Extension/GuidedTours.php +++ b/plugins/system/guidedtours/src/Extension/GuidedTours.php @@ -50,10 +50,12 @@ final class GuidedTours extends CMSPlugin implements SubscriberInterface * @since 4.3.0 */ protected $stepInteractiveType = [ - GuidedtoursComponent::STEP_INTERACTIVETYPE_FORM_SUBMIT => 'submit', - GuidedtoursComponent::STEP_INTERACTIVETYPE_TEXT => 'text', - GuidedtoursComponent::STEP_INTERACTIVETYPE_OTHER => 'other', - GuidedtoursComponent::STEP_INTERACTIVETYPE_BUTTON => 'button', + GuidedtoursComponent::STEP_INTERACTIVETYPE_FORM_SUBMIT => 'submit', + GuidedtoursComponent::STEP_INTERACTIVETYPE_TEXT => 'text', + GuidedtoursComponent::STEP_INTERACTIVETYPE_OTHER => 'other', + GuidedtoursComponent::STEP_INTERACTIVETYPE_BUTTON => 'button', + GuidedtoursComponent::STEP_INTERACTIVETYPE_CHECKBOX_RADIO => 'checkbox_radio', + GuidedtoursComponent::STEP_INTERACTIVETYPE_SELECT => 'select', ]; /** @@ -248,6 +250,7 @@ private function processTour($item) $temp->target = $step->target; $temp->type = $this->stepType[$step->type]; $temp->interactive_type = $this->stepInteractiveType[$step->interactive_type]; + $temp->params = $step->params; $temp->url = $step->url; $temp->tour_id = $step->tour_id; $temp->step_id = $step->id; ```