RomanL пре 8 година
родитељ
комит
57db18a634

+ 1 - 1
modules/boonex/attendant/classes/BxAttendantModule.php

@@ -143,7 +143,7 @@ class BxAttendantModule extends BxDolModule
                     $aTmp = BxDolService::call($sModuleName, BX_ATTENDANT_ON_PROFILE_CREATION_METHOD, array('unit_view' => 'showcase', 'empty_message' => false, "ajax_paginate" => false));
                     $aTmp = BxDolService::call($sModuleName, BX_ATTENDANT_ON_PROFILE_CREATION_METHOD, array('unit_view' => 'showcase', 'empty_message' => false, "ajax_paginate" => false));
                     if (isset($aTmp['content'])){
                     if (isset($aTmp['content'])){
                         $sTmp = $aTmp['content'];
                         $sTmp = $aTmp['content'];
-                        $sTmp = str_replace("bx_conn_action", 'bx_attendant_conn_action', $sTmp);
+                        $sTmp = str_replace('bx_conn_action', 'bx_attendant_conn_action', $sTmp);
                         $aModulteData[$sModuleName] = $sTmp;
                         $aModulteData[$sModuleName] = $sTmp;
                     }
                     }
                 }
                 }

+ 2 - 1
modules/boonex/attendant/classes/BxAttendantTemplate.php

@@ -35,7 +35,8 @@ class BxAttendantTemplate extends BxBaseModGeneralTemplate
     public function getJsCode($sType, $aParams = array(), $bWrap = true)
     public function getJsCode($sType, $aParams = array(), $bWrap = true)
     {
     {
         $aParams = array_merge(array(
         $aParams = array_merge(array(
-            'sContainerId' => $this->sContainerId
+            'sContainerId' => $this->sContainerId,
+            'sUrlAfterShow' => getParam('bx_attendant_on_profile_after_action_url')
         ), $aParams);
         ), $aParams);
         
         
         return parent::getJsCode($sType, $aParams, $bWrap);
         return parent::getJsCode($sType, $aParams, $bWrap);

+ 1 - 0
modules/boonex/attendant/install/langs/en.xml

@@ -4,6 +4,7 @@
   <string name="_bx_attendant_adm_stg_cpt_type"><![CDATA[Attendant]]></string>
   <string name="_bx_attendant_adm_stg_cpt_type"><![CDATA[Attendant]]></string>
   <string name="_bx_attendant_adm_stg_cpt_category_on_profile_creation"><![CDATA[Popup with recomended profiles on profile add]]></string>
   <string name="_bx_attendant_adm_stg_cpt_category_on_profile_creation"><![CDATA[Popup with recomended profiles on profile add]]></string>
   <string name="_bx_attendant_adm_stg_on_profile_creation_modules_list"><![CDATA[Modules list]]></string>
   <string name="_bx_attendant_adm_stg_on_profile_creation_modules_list"><![CDATA[Modules list]]></string>
+  <string name="_bx_attendant_adm_stg_on_profile_after_action_url"><![CDATA[Url for redirect after shows]]></string>
   <string name="_bx_attendant_adm_stg_on_profile_creation_event_list"><![CDATA[Show popup after]]></string>
   <string name="_bx_attendant_adm_stg_on_profile_creation_event_list"><![CDATA[Show popup after]]></string>
   <string name="_bx_attendant_popup_with_recommended_title_default"><![CDATA[Default title]]></string>
   <string name="_bx_attendant_popup_with_recommended_title_default"><![CDATA[Default title]]></string>
   <string name="_bx_attendant_popup_with_recommended_description_default"><![CDATA[Default description]]></string>
   <string name="_bx_attendant_popup_with_recommended_description_default"><![CDATA[Default description]]></string>

+ 2 - 1
modules/boonex/attendant/install/sql/enable.sql

@@ -13,7 +13,8 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 
 INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
 INSERT INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `order`) VALUES
 (@iCategoryId, 'bx_attendant_on_profile_creation_modules', '_bx_attendant_adm_stg_on_profile_creation_modules_list', '', 'list', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:19:"get_profile_modules";}', '', '', '', 1),
 (@iCategoryId, 'bx_attendant_on_profile_creation_modules', '_bx_attendant_adm_stg_on_profile_creation_modules_list', '', 'list', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:19:"get_profile_modules";}', '', '', '', 1),
-(@iCategoryId, 'bx_attendant_on_profile_event_list', '_bx_attendant_adm_stg_on_profile_creation_event_list', 'confirmation', 'select', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:40:"get_popup_with_recommended_on_event_show";}', '', '', '', 2);
+(@iCategoryId, 'bx_attendant_on_profile_event_list', '_bx_attendant_adm_stg_on_profile_creation_event_list', 'confirmation', 'select', 'a:2:{s:6:"module";s:12:"bx_attendant";s:6:"method";s:40:"get_popup_with_recommended_on_event_show";}', '', '', '', 2),
+(@iCategoryId, 'bx_attendant_on_profile_after_action_url', '_bx_attendant_adm_stg_on_profile_after_action_url', '', 'digit', '', '', '', '', 3);
 
 
 -- INJECTION
 -- INJECTION
 INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
 INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES

+ 4 - 0
modules/boonex/attendant/js/main.js

@@ -10,6 +10,7 @@
 
 
 function BxAttendantPopupWithRecommendedOnProfileAdd(oOptions) {
 function BxAttendantPopupWithRecommendedOnProfileAdd(oOptions) {
     this._sContainerId = oOptions.sContainerId == undefined ? 'oBxAttendantPopupWithRecommendedOnProfileAdd' : oOptions.sContainerId;
     this._sContainerId = oOptions.sContainerId == undefined ? 'oBxAttendantPopupWithRecommendedOnProfileAdd' : oOptions.sContainerId;
+    this._sUrlAfterShow = oOptions.sUrlAfterShow == undefined ? '' : oOptions.sUrlAfterShow;
     var $this = this;
     var $this = this;
     $(document).ready(function () {
     $(document).ready(function () {
         $this.init();
         $this.init();
@@ -26,6 +27,9 @@ BxAttendantPopupWithRecommendedOnProfileAdd.prototype.init = function () {
         $this.ReInitFlickity();
         $this.ReInitFlickity();
         if (!$oNext.length) {
         if (!$oNext.length) {
             $('#' + $this._sContainerId).dolPopupHide();
             $('#' + $this._sContainerId).dolPopupHide();
+            if ($this._sUrlAfterShow != '') {
+                location.href = $this._sUrlAfterShow;
+            }
         }
         }
     });
     });
 }
 }