* @copyright 2017 Azelab * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of Azelab */ include_once dirname(__FILE__).'/ArContactUsModel.php'; abstract class ArContactUsAbstract extends ArContactUsModel { public static function getIcons() { return array( 'facebook-messenger' => '', 'facebook' => '', 'facebook-f' => '', 'viber' => '', 'telegram-plane' => '', 'skype' => '', 'envelope' => '', 'phone' => '', 'whatsapp' => '', 'twitter' => '', 'odnoklassniki' => '', 'vk' => '', 'slack-hash' => '', 'intercom' => '', 'line' => '', 'wechat' => '', 'google-play' => '', 'app-store-ios' => '', 'android' => '', 'apple' => '', 'comment-lines-solid' => '', 'comment-lines-light' => '', 'comment-dots-solid' => '', 'comment-dots-light' => '', 'comment-check-solid' => '', 'comment-check-light' => '', 'comment-alt-smile-solid' => '', 'comment-alt-smile-light' => '', 'comment-alt-lines-solid' => '', 'comment-alt-lines-light' => '', 'comment-alt-dots-solid' => '', 'comment-alt-dots-light' => '', 'comments-alt-solid' => '', 'comments-alt-light' => '', 'comments' => '', 'comments-light' => '', 'comment-smile-solid' => '', 'comment-smile-light' => '', 'hangouts' => '', 'zalo' => '', 'linked-in' => '', 'linked-in2' => '', 'zendesk' => '', 'instagram' => '', 'open-book' => '', 'open-book-2' => '', 'pinterest' => '' ); } public function buttonIconSizeSelectOptions() { return array( array( 'id' => '24', 'name' => $this->l('24px', 'ArContactUsAbstract') ), array( 'id' => '28', 'name' => $this->l('28px', 'ArContactUsAbstract') ), array( 'id' => '32', 'name' => $this->l('32px', 'ArContactUsAbstract') ), array( 'id' => '36', 'name' => $this->l('36px', 'ArContactUsAbstract') ), array( 'id' => '42', 'name' => $this->l('42px', 'ArContactUsAbstract') ), array( 'id' => '48', 'name' => $this->l('48px', 'ArContactUsAbstract') ), ); } public function buttonHookSelectOptions() { return array( array( 'id' => 'displayFooter', 'name' => $this->l('displayFooter', 'ArContactUsAbstract') ), array( 'id' => 'displayHeader', 'name' => $this->l('displayHeader', 'ArContactUsAbstract') ), array( 'id' => 'displayBeforeBodyClosingTag', 'name' => $this->l('displayBeforeBodyClosingTag', 'ArContactUsAbstract') ) ); } public function buttonIconTypeSelectOptions() { return array( array( 'id' => 'builtin', 'name' => $this->l('Built-in', 'ArContactUsAbstract') ), array( 'id' => 'fa', 'name' => $this->l('FontAwesome icon', 'ArContactUsAbstract') ), array( 'id' => 'uploaded', 'name' => $this->l('Uploaded', 'ArContactUsAbstract') ), ); } public function modeSelectOptions() { return array( array( 'id' => 'regular', 'name' => $this->l('Menu', 'ArContactUsAbstract') ), array( 'id' => 'callback', 'name' => $this->l('Callback only', 'ArContactUsAbstract') ), ); } public function promptPositionSelectOptions() { return array( array( 'id' => 'top', 'name' => $this->l('Above the button', 'ArContactUsAbstract') ), array( 'id' => 'side', 'name' => $this->l('Side of the button', 'ArContactUsAbstract') ), ); } public function menuSizeSelectOptions() { return array( array( 'id' => 'large', 'name' => $this->l('Large', 'ArContactUsAbstract') ), array( 'id' => 'small', 'name' => $this->l('Small', 'ArContactUsAbstract') ) ); } public function menuStyleSelectOptions() { return array( array( 'id' => 0, 'name' => $this->l('Popup', 'ArContactUsAbstract'), ), array( 'id' => 1, 'name' => $this->l('Sidebar', 'ArContactUsAbstract'), ), ); } public function sidebarAnimationSelectOptions() { return array( array( 'id' => 'elastic', 'name' => $this->l('Elastic', 'ArContactUsAbstract'), ), array( 'id' => 'bubble', 'name' => $this->l('Bubble', 'ArContactUsAbstract'), ), ); } public function popupAnimationSelectOptions() { return array( array( 'id' => 'scale', 'name' => $this->l('ScaleIn', 'ArContactUsAbstract'), ), array( 'id' => 'scaleout', 'name' => $this->l('ScaleOut', 'ArContactUsAbstract'), ), array( 'id' => 'fadeindown', 'name' => $this->l('FadeInDown', 'ArContactUsAbstract'), ), array( 'id' => 'fadeinup', 'name' => $this->l('FadeInUp', 'ArContactUsAbstract'), ), ); } public function itemsAnimationSelectOptions() { return array( array( 'id' => '', 'name' => $this->l('None', 'ArContactUsAbstract'), ), array( 'id' => 'downtoup', 'name' => $this->l('Down to up', 'ArContactUsAbstract'), ), array( 'id' => 'uptodown', 'name' => $this->l('Up to down', 'ArContactUsAbstract'), ), array( 'id' => 'fromaside', 'name' => $this->l('From aside', 'ArContactUsAbstract'), ), ); } public function itemBorderStyleSelectOptions() { return array( array( 'id' => 'none', 'name' => $this->l('None', 'ArContactUsAbstract'), ), array( 'id' => 'solid', 'name' => $this->l('Solid', 'ArContactUsAbstract'), ), array( 'id' => 'dashed', 'name' => $this->l('Dashed', 'ArContactUsAbstract'), ), ); } public function itemStyleSelectOptions() { return array( array( 'id' => 'rounded', 'name' => $this->l('Icon in circle', 'ArContactUsAbstract'), ), array( 'id' => 'non-rounded', 'name' => $this->l('Icon without circle', 'ArContactUsAbstract'), ), ); } public function buttonSizeSelectOptions() { return array( array( 'id' => 'large', 'name' => $this->l('Large', 'ArContactUsAbstract') ), array( 'id' => 'medium', 'name' => $this->l('Medium', 'ArContactUsAbstract') ), array( 'id' => 'small', 'name' => $this->l('Small', 'ArContactUsAbstract') ) ); } public function skypeTypeSelectOptions() { return array( array( 'id' => 'user', 'name' => $this->l('Skype user', 'ArContactUsAbstract') ), array( 'id' => 'bot', 'name' => $this->l('Skype bot', 'ArContactUsAbstract') ) ); } public function animationSelectOptions() { return array( array( 'id' => 'bounce', 'name' => $this->l('Bounce'), 'items' => array( array( 'id' => 'bounceIn', 'name' => $this->l('bounceIn') ), array( 'id' => 'bounceInDown', 'name' => $this->l('bounceInDown') ), array( 'id' => 'bounceInLeft', 'name' => $this->l('bounceInLeft') ), array( 'id' => 'bounceInRight', 'name' => $this->l('bounceInRight') ), array( 'id' => 'bounceInUp', 'name' => $this->l('bounceInUp') ), ) ), array( 'id' => 'fade', 'name' => $this->l('Fade'), 'items' => array( array( 'id' => 'fadeIn', 'name' => $this->l('fadeIn') ), array( 'id' => 'fadeInDown', 'name' => $this->l('fadeInDown') ), array( 'id' => 'fadeInDownBig', 'name' => $this->l('fadeInDownBig') ), array( 'id' => 'fadeInLeft', 'name' => $this->l('fadeInLeft') ), array( 'id' => 'fadeInLeftBig', 'name' => $this->l('fadeInLeftBig') ), array( 'id' => 'fadeInRight', 'name' => $this->l('fadeInRight') ), array( 'id' => 'fadeInRightBig', 'name' => $this->l('fadeInRightBig') ), array( 'id' => 'fadeInUp', 'name' => $this->l('fadeInUp') ), array( 'id' => 'fadeInUpBig', 'name' => $this->l('fadeInUpBig') ), ) ), array( 'id' => 'flip', 'name' => $this->l('Flip'), 'items' => array( array( 'id' => 'flip', 'name' => $this->l('flip') ), array( 'id' => 'flipInX', 'name' => $this->l('flipInX') ), array( 'id' => 'flipInY', 'name' => $this->l('flipInY') ), ) ), array( 'id' => 'lightSpeed', 'name' => $this->l('LightSpeed'), 'items' => array( array( 'id' => 'lightSpeedIn', 'name' => $this->l('lightSpeedIn') ), ) ), array( 'id' => 'rotate', 'name' => $this->l('Rotate'), 'items' => array( array( 'id' => 'rotateIn', 'name' => $this->l('rotateIn') ), array( 'id' => 'rotateInDownLeft', 'name' => $this->l('rotateInDownLeft') ), array( 'id' => 'rotateInDownRight', 'name' => $this->l('rotateInDownRight') ), array( 'id' => 'rotateInUpLeft', 'name' => $this->l('rotateInUpLeft') ), array( 'id' => 'rotateInUpRight', 'name' => $this->l('rotateInUpRight') ), ) ), array( 'id' => 'slide', 'name' => $this->l('Slide'), 'items' => array( array( 'id' => 'slideInUp', 'name' => $this->l('slideInUp') ), array( 'id' => 'slideInDown', 'name' => $this->l('slideInDown') ), array( 'id' => 'slideInLeft', 'name' => $this->l('slideInLeft') ), array( 'id' => 'slideInRight', 'name' => $this->l('slideInRight') ), ) ), array( 'id' => 'zoom', 'name' => $this->l('Zoom'), 'items' => array( array( 'id' => 'zoomIn', 'name' => $this->l('zoomIn') ), array( 'id' => 'zoomInDown', 'name' => $this->l('zoomInDown') ), array( 'id' => 'zoomInLeft', 'name' => $this->l('zoomInLeft') ), array( 'id' => 'zoomInRight', 'name' => $this->l('zoomInRight') ), array( 'id' => 'zoomInUp', 'name' => $this->l('zoomInUp') ), ) ), array( 'id' => 'roll', 'name' => $this->l('Roll'), 'items' => array( array( 'id' => 'rollIn', 'name' => $this->l('rollIn') ), ) ) ); } public function positionSelectOptions() { return array( array( 'id' => 'left', 'name' => $this->l('Left', 'ArContactUsAbstract') ), array( 'id' => 'right', 'name' => $this->l('Right', 'ArContactUsAbstract') ) ); } public function fbPositionSelectOptions() { return array( array( 'id' => 'left', 'name' => $this->l('Left', 'ArContactUsAbstract') ), array( 'id' => 'right', 'name' => $this->l('Right', 'ArContactUsAbstract') ) ); } public static function getIcon($name) { $icons = self::getIcons(); return isset($icons[$name])? $icons[$name] : null; } public function rules() { return array( array( array( 'button_icon_img', ), 'validateImage', 'params' => array( 'mime' => array( 'image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml', 'text/plain', 'image/gif' ), 'size' => array( 'min' => '48x48' ), 'dimensions' => array( 1 ) ), 'message' => $this->l('Please check is file format is allowed, dimensions of file is min 48*48px and image proportions is 1:1') ), array( array( 'mobile', 'desktop', 'pages', 'sandbox', 'allowed_ips', 'font_awesome', 'desktop_css', 'mobile_css', 'button_hook', 'mode', 'button_icon_type', 'button_icon', 'button_icon_svg', 'button_color', 'button_size', 'button_icon_size', 'position', 'animation', 'x_offset', 'y_offset', 'pulsate_speed', 'icon_speed', 'icon_animation_pause', 'text', 'drag', 'menu_style', 'item_style', 'sidebar_animation', 'popup_animation', 'items_animation', 'item_border_style', 'item_border_color', 'menu_header_on', 'menu_header', 'header_close', 'header_close_bg', 'header_close_color', 'menu_subtitle_color', 'menu_subtitle_hcolor', 'menu_size', 'menu_bg', 'menu_color', 'menu_hbg', 'menu_hcolor', 'shadow_size', 'shadow_opacity', 'enable_prompt', 'prompt_position', 'first_delay', 'loop', 'close_last', 'typing_time', 'message_time', 'name', 'name_validation', 'name_max_len', 'name_filter_laters', 'name_required', 'name_title', 'name_placeholder', 'email_field', 'email_required', 'email_title', 'email_placeholder', 'hhr1', 'hhr2', 'hhr3', 'hhr4', 'twilio', 'twilio_api_key', 'twilio_auth_token', 'twilio_phone', 'twilio_tophone', 'twilio_message', 'tawk_to_head', 'tawk_to_on', 'tawk_to_site_id', 'tawk_to_widget', 'tawk_to_userinfo', 'tawk_to_custom_script', 'hr1', 'crisp_head', 'crisp_on', 'crisp_site_id', 'hr2', 'intercom_head', 'intercom_on', 'intercom_app_id', 'hr3', 'fb_head', 'fb_on', 'fb_page_id', 'fb_init', 'fb_color', 'fb_lang', 'fb_xfbml', 'fb_version', 'fb_one_line', 'hr4', 'vk_head', 'vk_page_id', 'vk_on', 'hr5', 'zopim_head', 'zopim_id', 'zopim_on', 'zopim_userinfo', 'hr6', 'skype_head', 'skype_id', 'skype_type', 'skype_on', 'skype_message_color', 'hr7', 'zalo_head', 'zalo_id', 'zalo_on', 'zalo_welcome', 'hr8', 'lhc_head', 'lhc_on', 'lhc_uri', 'lhc_department', 'hr9', 'ss_head', 'ss_on', 'ss_key', 'ss_userinfo', 'hr10', 'lc_head', 'lc_on', 'lc_userinfo', 'hr11', 'tidio_head', 'tidio_on', 'tidio_userinfo', 'hr12', 'lcp_head', 'lcp_on', 'hr13', 'lz_head', 'lz_on', 'jivosite_head', 'jivosite_on', 'jivosite_id', 'jivosite_userinfo', 'hr15', 'zoho_head', 'zoho_on', 'zoho_id', 'zoho_userinfo', 'hr16', 'fc_head', 'fc_on', 'fc_token', 'fc_host', 'fc_userinfo', 'hr17', 'phplive_head', 'phplive_on', 'phplive_src', 'phplive_userinfo', 'hr18', 'paldesk_head', 'paldesk_on', 'paldesk_key', //'paldesk_userinfo', 'hr19', 'hubspot_head', 'hubspot_on', 'hubspot_id', 'hubspot_userinfo', 'hr20', 'socialintents_head', 'socialintents_on', 'socialintents_id', 'socialintents_userinfo', 'hr21', 'botmake_head', 'botmake_on', 'botmake_id', 'hr22', 'timeout', 'message', 'phone_placeholder', 'phone_mask', 'maskedinput', 'phone_mask_on', 'proccess_message', 'success_message', 'fail_message', 'btn_title', 'onesignal', 'onesignal_title', 'onesignal_message', 'tg', 'tg_token', 'tg_chat_id', 'tg_text', 'gdpr', 'gdpr_title', 'email', 'email_list', 'recaptcha', 'key', 'secret' ), 'safe' ), array( array( 'timeout', 'popup_width', 'menu_width', 'x_offset', 'y_offset', 'pulsate_speed', 'icon_speed', 'icon_icon_animation_pause', 'show_after_close', 'close_timeout', 'icon_animation_pause', 'close_timeout' ), 'isInt' ) ); } public function attributeLabels() { return array( 'mobile' => $this->l('Enable on mobile', 'ArContactUsAbstract'), 'desktop' => $this->l('Enable on desktop', 'ArContactUsAbstract'), 'sandbox' => $this->l('Sandbox mode', 'ArContactUsAbstract'), 'allowed_ips' => $this->l('Allowed IPs', 'ArContactUsAbstract'), 'font_awesome' => $this->l('Include FontAwesome CSS file', 'ArContactUsAbstract'), 'desktop_css' => $this->l('Desktop custom CSS styles', 'ArContactUsAbstract'), 'mobile_css' => $this->l('Mobile custom CSS styles', 'ArContactUsAbstract'), 'button_hook' => $this->l('Render button in hook', 'ArContactUsAbstract'), 'mode' => $this->l('Button mode', 'ArContactUsAbstract'), 'button_icon_type' => $this->l('Button icon type', 'ArContactUsAbstract'), 'button_icon' => $this->l('Button icon', 'ArContactUsAbstract'), 'button_icon_svg' => $this->l('FontAwesome icon code', 'ArContactUsAbstract'), 'button_icon_img' => $this->l('Upload image', 'ArContactUsAbstract'), 'button_icon_preview' => $this->l('Current button icon', 'ArContactUsAbstract'), 'button_color' => $this->l('Color theme', 'ArContactUsAbstract'), 'button_size' => $this->l('Button size', 'ArContactUsAbstract'), 'button_icon_size' => $this->l('Button icon size', 'ArContactUsAbstract'), 'position' => $this->l('Position', 'ArContactUsAbstract'), 'animation' => $this->l('Appearing animation', 'ArContactUsAbstract'), 'x_offset' => $this->l('X-axis offset', 'ArContactUsAbstract'), 'y_offset' => $this->l('Y-axis offset', 'ArContactUsAbstract'), 'pulsate_speed' => $this->l('Pulsate speed', 'ArContactUsAbstract'), 'icon_speed' => $this->l('Icon slider speed', 'ArContactUsAbstract'), 'icon_animation_pause' => $this->l('Icon slider animation pause', 'ArContactUsAbstract'), 'text' => $this->l('Text', 'ArContactUsAbstract'), 'drag' => $this->l('Enable button drag', 'ArContactUsAbstract'), 'enable_prompt' => $this->l('Enable', 'ArContactUsAbstract'), 'prompt_position' => $this->l('Position', 'ArContactUsAbstract'), 'first_delay' => $this->l('Delay first message', 'ArContactUsAbstract'), 'loop' => $this->l('Loop mesages', 'ArContactUsAbstract'), 'close_last' => $this->l('Close last message', 'ArContactUsAbstract'), 'typing_time' => $this->l('Typing time', 'ArContactUsAbstract'), 'message_time' => $this->l('Message time', 'ArContactUsAbstract'), 'show_after_close' => $this->l('Show after closed', 'ArContactUsAbstract'), 'menu_style' => $this->l('Menu style', 'ArContactUsAbstract'), 'item_style' => $this->l('Items style', 'ArContactUsAbstract'), 'sidebar_animation' => $this->l('Sidebar animation', 'ArContactUsAbstract'), 'popup_animation' => $this->l('Popup animation', 'ArContactUsAbstract'), 'items_animation' => $this->l('Items animation', 'ArContactUsAbstract'), 'item_border_style' => $this->l('Items border', 'ArContactUsAbstract'), 'item_border_color' => $this->l('Items border color', 'ArContactUsAbstract'), 'menu_header_on' => $this->l('Show header', 'ArContactUsAbstract'), 'menu_header' => $this->l('Header text', 'ArContactUsAbstract'), 'header_close' => $this->l('Show close button in header', 'ArContactUsAbstract'), 'menu_subtitle_color' => $this->l('Item subtitle color', 'ArContactUsAbstract'), 'menu_subtitle_hcolor' => $this->l('Hovered item subtitle color', 'ArContactUsAbstract'), 'header_close_bg' => $this->l('Close button background color', 'ArContactUsAbstract'), 'header_close_color' => $this->l('Close button icon color', 'ArContactUsAbstract'), 'shadow_size' => $this->l('Shadow size', 'ArContactUsAbstract'), 'shadow_opacity' => $this->l('Shadow opacity', 'ArContactUsAbstract'), 'menu_size' => $this->l('Menu size', 'ArContactUsAbstract'), 'menu_width' => $this->l('Menu width', 'ArContactUsAbstract'), 'menu_bg' => $this->l('Menu background color', 'ArContactUsAbstract'), 'menu_color' => $this->l('Item title color', 'ArContactUsAbstract'), 'menu_hbg' => $this->l('Hovered item background color', 'ArContactUsAbstract'), 'menu_hcolor' => $this->l('Hovered item title color', 'ArContactUsAbstract'), 'popup_width' => $this->l('Popup desktop width', 'ArContactUsAbstract'), 'timeout' => $this->l('Countdown', 'ArContactUsAbstract'), 'message' => $this->l('Message', 'ArContactUsAbstract'), 'phone_placeholder' => $this->l('Phone field placeholder', 'ArContactUsAbstract'), 'phone_mask' => $this->l('Phone mask', 'ArContactUsAbstract'), 'phone_mask_on' => $this->l('Enable phone mask', 'ArContactUsAbstract'), 'maskedinput' => $this->l('Include jquery.maskedinput.min.js', 'ArContactUsAbstract'), 'proccess_message' => $this->l('Proccess message', 'ArContactUsAbstract'), 'success_message' => $this->l('Success message', 'ArContactUsAbstract'), 'fail_message' => $this->l('Fail message', 'ArContactUsAbstract'), 'close_timeout' => $this->l('Close callback popup timeout', 'ArContactUsAbstract'), 'btn_title' => $this->l('Button title', 'ArContactUsAbstract'), 'onesignal' => $this->l('Enable Onesignal integration', 'ArContactUsAbstract'), 'onesignal_title' => $this->l('Webpush message title', 'ArContactUsAbstract'), 'onesignal_message' => $this->l('Webpush message text', 'ArContactUsAbstract'), 'name' => $this->l('Show Name field', 'ArContactUsAbstract'), 'name_validation' => $this->l('Validate name value', 'ArContactUsAbstract'), 'name_max_len' => $this->l('Max lenght for name value', 'ArContactUsAbstract'), 'name_filter_laters' => $this->l('Enable only laters, numbers and spaces in name field.', 'ArContactUsAbstract'), 'name_required' => $this->l('Name field required', 'ArContactUsAbstract'), 'name_title' => $this->l('Name field title', 'ArContactUsAbstract'), 'name_placeholder' => $this->l('Name field placeholder', 'ArContactUsAbstract'), 'email_field' => $this->l('Show email field', 'ArContactUsAbstract'), 'email_required' => $this->l('Email field required', 'ArContactUsAbstract'), 'email_title' => $this->l('Email field title', 'ArContactUsAbstract'), 'email_placeholder' => $this->l('Email field placeholder', 'ArContactUsAbstract'), 'gdpr' => $this->l('Show GDPR checkbox', 'ArContactUsAbstract'), 'gdpr_title' => $this->l('GDPR checkbox title', 'ArContactUsAbstract'), 'email' => $this->l('Send email', 'ArContactUsAbstract'), 'email_list' => $this->l('Email list', 'ArContactUsAbstract'), 'recaptcha' => $this->l('Integrate with Google reCaptcha', 'ArContactUsAbstract'), 'key' => $this->l('Google reCaptcha Site Key', 'ArContactUsAbstract'), 'secret' => $this->l('Google reCaptcha Secret', 'ArContactUsAbstract'), 'tawk_to_head' => '', 'hr1' => '', 'tawk_to_widget' => $this->l('Widget', 'ArContactUsAbstract'), 'tawk_to_site_id' => $this->l('Site ID', 'ArContactUsAbstract'), 'tawk_to_userinfo' => $this->l('Send customer info to Tawk.to', 'ArContactUsAbstract'), 'tawk_to_custom_script' => $this->l('Use custom Tawk.to script', 'ArContactUsAbstract'), 'crisp_head' => '', 'crisp_site_id' => $this->l('Site ID', 'ArContactUsAbstract'), 'hr2' => '', 'intercom_head' => '', 'hr3' => '', 'fb_head' => '', 'hr4' => '', 'intercom_app_id' => $this->l('App ID', 'ArContactUsAbstract'), 'tawk_to_on' => $this->l('Enable', 'ArContactUsAbstract'), 'crisp_on' => $this->l('Enable', 'ArContactUsAbstract'), 'intercom_on' => $this->l('Enable', 'ArContactUsAbstract'), 'fb_on' => $this->l('Enable', 'ArContactUsAbstract'), 'fb_page_id' => $this->l('Facebook page ID', 'ArContactUsAbstract'), 'fb_init' => $this->l('Initilize Facebook SDK', 'ArContactUsAbstract'), 'fb_color' => $this->l('Color scheme', 'ArContactUsAbstract'), 'fb_lang' => $this->l('Language', 'ArContactUsAbstract'), 'fb_xfbml' => $this->l('XFBML', 'ArContactUsAbstract'), 'fb_version' => $this->l('Script version', 'ArContactUsAbstract'), 'fb_one_line' => $this->l('One-line init', 'ArContactUsAbstract'), 'vk_head' => '', 'vk_page_id' => $this->l('VK page ID', 'ArContactUsAbstract'), 'vk_on' => $this->l('Enable', 'ArContactUsAbstract'), 'hr5' => '', 'zopim_head' => '', 'zopim_id' => $this->l('Widget ID', 'ArContactUsAbstract'), 'zopim_on' => $this->l('Enable', 'ArContactUsAbstract'), 'zopim_userinfo' => $this->l('Send customer info to Zendesk', 'ArContactUsAbstract'), 'hr6' => '', 'skype_head' => '', 'skype_id' => $this->l('Skype ID/Microsoft App ID', 'ArContactUsAbstract'), 'skype_type' => $this->l('Set receiver', 'ArContactUsAbstract'), 'skype_on' => $this->l('Enable', 'ArContactUsAbstract'), 'skype_message_color' => $this->l('Message color', 'ArContactUsAbstract'), 'hr7' => '', 'zalo_head' => '', 'zalo_id' => $this->l('Account ID', 'ArContactUsAbstract'), 'zalo_on' => $this->l('Enable', 'ArContactUsAbstract'), 'zalo_welcome' => $this->l('Welcome message', 'ArContactUsAbstract'), 'zalo_height' => $this->l('Height', 'ArContactUsAbstract'), 'zalo_width' => $this->l('Width', 'ArContactUsAbstract'), 'hr8' => '', 'lhc_head' => '', 'lhc_on' => $this->l('Enable', 'ArContactUsAbstract'), 'lhc_uri' => $this->l('Installation URL', 'ArContactUsAbstract'), 'lhc_width' => $this->l('Width', 'ArContactUsAbstract'), 'lhc_height' => $this->l('Height', 'ArContactUsAbstract'), 'lhc_popup_height' => $this->l('Popup height', 'ArContactUsAbstract'), 'lhc_popup_width' => $this->l('Popup width', 'ArContactUsAbstract'), 'lhc_department' => $this->l('Department', 'ArContactUsAbstract'), 'hr9' => '', 'ss_head' => '', 'ss_on' => $this->l('Enable', 'ArContactUsAbstract'), 'ss_key' => $this->l('Smartsupp Key', 'ArContactUsAbstract'), 'ss_userinfo' => $this->l('Send customer info to smartsupp', 'ArContactUsAbstract'), 'hr10' => '', 'lc_head' => '', 'lc_on' => $this->l('Enable', 'ArContactUsAbstract'), 'lc_key' => $this->l('License ID', 'ArContactUsAbstract'), 'lc_userinfo' => $this->l('Send customer info to LiveChat', 'ArContactUsAbstract'), 'hr11' => '', 'tidio_head' => '', 'tidio_on' => $this->l('Enable', 'ArContactUsAbstract'), 'tidio_key' => $this->l('Public key', 'ArContactUsAbstract'), 'tidio_userinfo' => $this->l('Send customer info to Tidio', 'ArContactUsAbstract'), 'hr12' => '', 'lcp_head' => '', 'lcp_on' => $this->l('Enable', 'ArContactUsAbstract'), 'lcp_uri' => $this->l('Script URL', 'ArContactUsAbstract'), 'hr13' => '', 'lz_head' => '', 'lz_id' => $this->l('Script URL', 'ArContactUsAbstract'), 'lz_on' => $this->l('Enable', 'ArContactUsAbstract'), 'twilio' => $this->l('Enable Twilio integration', 'ArContactUsAbstract'), 'twilio_api_key' => $this->l('Twilio API Key', 'ArContactUsAbstract'), 'twilio_auth_token' => $this->l('Twilio Auth Token', 'ArContactUsAbstract'), 'twilio_phone' => $this->l('Twilio phone', 'ArContactUsAbstract'), 'twilio_tophone' => $this->l('Send SMS to this phone', 'ArContactUsAbstract'), 'twilio_message' => $this->l('SMS text', 'ArContactUsAbstract'), 'jivosite_head' => '', 'jivosite_on' => $this->l('Enable', 'ArContactUsAbstract'), 'jivosite_id' => $this->l('Jivosite ID', 'ArContactUsAbstract'), 'jivosite_userinfo' => $this->l('Send customer info to Jivosite', 'ArContactUsAbstract'), 'hr15' => '', 'zoho_head' => '', 'zoho_on' => $this->l('Enable', 'ArContactUsAbstract'), 'zoho_id' => $this->l('Zoho SalesIQ widget ID', 'ArContactUsAbstract'), 'zoho_userinfo' => $this->l('Send customer info to SalesIQ', 'ArContactUsAbstract'), 'hr16' => '', 'fc_head' => '', 'fc_on' => $this->l('Enable', 'ArContactUsAbstract'), 'fc_token' => $this->l('FreshChat token', 'ArContactUsAbstract'), 'fc_host' => $this->l('FreshChat host', 'ArContactUsAbstract'), 'fc_userinfo' => $this->l('Send customer info to FreshChat', 'ArContactUsAbstract'), 'hr17' => '', 'phplive_head' => '', 'phplive_on' => $this->l('Enable', 'ArContactUsAbstract'), 'phplive_src' => $this->l('PhpLive widget URL', 'ArContactUsAbstract'), 'phplive_userinfo' => $this->l('Send customer info to PhpLive', 'ArContactUsAbstract'), 'hr18' => '', 'paldesk_head' => '', 'paldesk_on' => $this->l('Enable', 'ArContactUsAbstract'), 'paldesk_key' => $this->l('Paldesk API Key', 'ArContactUsAbstract'), 'paldesk_userinfo' => $this->l('Send customer info to Paldesk', 'ArContactUsAbstract'), 'hr19' => '', 'hubspot_head' => '', 'hubspot_on' => $this->l('Enable', 'ArContactUsAbstract'), 'hubspot_id' => $this->l('Hubspot ID', 'ArContactUsAbstract'), 'hubspot_userinfo' => $this->l('Send customer info to Hubspot', 'ArContactUsAbstract'), 'hr20' => '', 'socialintents_head' => '', 'socialintents_on' => $this->l('Enable', 'ArContactUsAbstract'), 'socialintents_id' => $this->l('Socialintents ID', 'ArContactUsAbstract'), 'socialintents_userinfo' => $this->l('Send customer info to SocialIntents', 'ArContactUsAbstract'), 'hr21' => '', 'botmake_head' => '', 'botmake_on' => $this->l('Enable', 'ArContactUsAbstract'), 'botmake_id' => $this->l('Botmake ID', 'ArContactUsAbstract'), 'hr22' => '', 'tg' => $this->l('Enable telegram integration', 'ArContactUsAbstract'), 'tg_token' => $this->l('Telegram bot token', 'ArContactUsAbstract'), 'tg_chat_id' => $this->l('Telegram chat id', 'ArContactUsAbstract'), 'tg_text' => $this->l('Telegram message', 'ArContactUsAbstract'), 'hr1' => '', 'hr2' => '', 'hhr1' => '', 'hhr2' => '', 'hhr3' => '', 'hhr4' => '', ); } public function fieldSuffix() { return array( 'x_offset' => $this->l('px', 'ArContactUsAbstract'), 'y_offset' => $this->l('px', 'ArContactUsAbstract'), 'pulsate_speed' => $this->l('ms', 'ArContactUsAbstract'), 'icon_speed' => $this->l('ms', 'ArContactUsAbstract'), 'icon_animation_pause' => $this->l('ms', 'ArContactUsAbstract'), 'menu_border' => $this->l('px', 'ArContactUsAbstract'), 'timeout' => $this->l('seconds', 'ArContactUsAbstract'), 'first_delay' => $this->l('ms', 'ArContactUsAbstract'), 'typing_time' => $this->l('ms', 'ArContactUsAbstract'), 'message_time' => $this->l('ms', 'ArContactUsAbstract'), 'zalo_width' => $this->l('px', 'ArContactUsAbstract'), 'zalo_height' => $this->l('px', 'ArContactUsAbstract'), 'show_after_close' => $this->l('minutes', 'ArContactUsAbstract'), 'lhc_width' => $this->l('px', 'ArContactUsAbstract'), 'lhc_height' => $this->l('px', 'ArContactUsAbstract'), 'lhc_popup_height' => $this->l('px', 'ArContactUsAbstract'), 'lhc_popup_width' => $this->l('px', 'ArContactUsAbstract'), 'shadow_size' => $this->l('px', 'ArContactUsAbstract'), 'menu_width' => $this->l('px', 'ArContactUsAbstract'), 'popup_width' => $this->l('px', 'ArContactUsAbstract'), 'close_timeout' => $this->l('seconds', 'ArContactUsAbstract') ); } public function attributeTypes() { return array( 'mobile' => 'switch', 'desktop' => 'switch', 'sandbox' => 'switch', 'allowed_ips' => 'textarea', 'font_awesome' => 'switch', 'desktop_css' => 'textarea', 'mobile_css' => 'textarea', 'button_hook' => 'select', 'mode' => 'select', 'button_icon_type' => 'select', 'button_icon' => 'html', 'button_icon_svg' => 'textarea', 'button_icon_img' => 'file', 'button_icon_preview' => 'html', 'button_color' => 'color', 'button_size' => 'select', 'button_icon_size' => 'select', 'position' => 'select', 'animation' => 'select', 'x_offset' => 'text', 'y_offset' => 'text', 'pulsate_speed' => 'text', 'icon_speed' => 'text', 'text' => 'textarea', 'drag' => 'switch', 'enable_prompt' => 'switch', 'loop' => 'switch', 'close_last' => 'switch', 'menu_style' => 'select', 'item_style' => 'select', 'sidebar_animation' => 'select', 'popup_animation' => 'select', 'items_animation' => 'select', 'item_border_style' => 'select', 'item_border_color' => 'color', 'menu_header_on' => 'switch', 'menu_header' => 'text', 'header_close' => 'switch', 'menu_subtitle_color' => 'color', 'menu_subtitle_hcolor' => 'color', 'header_close_bg' => 'color', 'header_close_color' => 'color', 'shadow_size' => 'text', 'shadow_opacity' => 'text', 'prompt_position' => 'select', 'menu_size' => 'select', 'menu_bg' => 'color', 'menu_color' => 'color', 'menu_hbg' => 'color', 'menu_hcolor' => 'color', 'tawk_to_head' => 'html', 'crisp_head' => 'html', 'intercom_head' => 'html', 'fb_head' => 'html', 'hr1' => 'html', 'hr2' => 'html', 'hr3' => 'html', 'hr4' => 'html', 'tawk_to_on' => 'switch', 'tawk_to_userinfo' => 'switch', 'tawk_to_custom_script' => 'switch', 'crisp_on' => 'switch', 'intercom_on' => 'switch', 'fb_on' => 'switch', 'fb_init' => 'switch', 'fb_color' => 'color', 'fb_xfbml' => 'switch', 'fb_one_line' => 'switch', 'fb_version' => 'text', 'vk_head' => 'html', 'vk_on' => 'switch', 'hr5' => 'html', 'zopim_head' => 'html', 'zopim_on' => 'switch', 'zopim_userinfo' => 'switch', 'hr6' => 'html', 'skype_head' => 'html', 'skype_on' => 'switch', 'skype_type' => 'select', 'skype_message_color' => 'color', 'hr7' => 'html', 'zalo_head' => 'html', 'zalo_on' => 'switch', 'hr8' => 'html', 'lhc_head' => 'html', 'lhc_on' => 'switch', 'hr9' => 'html', 'ss_head' => 'html', 'ss_on' => 'switch', 'ss_userinfo' => 'switch', 'hr10' => 'html', 'lc_head' => 'html', 'lc_on' => 'switch', 'lc_userinfo' => 'switch', 'hr11' => 'html', 'tidio_head' => 'html', 'tidio_on' => 'switch', 'tidio_userinfo' => 'switch', 'hr12' => 'html', 'lcp_head' => 'html', 'lcp_on' => 'switch', 'hr13' => 'html', 'lz_head' => 'html', 'lz_on' => 'switch', 'jivosite_head' => 'html', 'jivosite_on' => 'switch', 'jivosite_userinfo' => 'switch', 'hr15' => 'html', 'zoho_head' => 'html', 'zoho_on' => 'switch', 'zoho_userinfo' => 'switch', 'hr16' => 'html', 'fc_head' => 'html', 'fc_on' => 'switch', 'fc_userinfo' => 'switch', 'hr17' => 'html', 'phplive_head' => 'html', 'phplive_on' => 'switch', 'phplive_userinfo' => 'switch', 'hr18' => 'html', 'paldesk_head' => 'html', 'paldesk_on' => 'switch', 'paldesk_userinfo' => 'switch', 'hr19' => 'html', 'socialintents_head' => 'html', 'socialintents_on' => 'switch', 'socialintents_userinfo' => 'switch', 'hr21' => 'html', 'hubspot_head' => 'html', 'hubspot_on' => 'switch', 'hubspot_userinfo' => 'switch', 'hr20' => 'html', 'botmake_head' => 'html', 'botmake_on' => 'switch', 'botmake_id' => 'text', 'hr22' => 'html', 'twilio' => 'switch', 'message' => 'textarea', 'proccess_message' => 'textarea', 'success_message' => 'textarea', 'phone_mask_on' => 'switch', 'maskedinput' => 'switch', 'fail_message' => 'textarea', 'onesignal' => 'switch', 'onesignal_message' => 'textarea', 'name' => 'switch', 'name_validation' => 'switch', 'name_filter_laters' => 'switch', 'email_field' => 'switch', 'email_required' => 'switch', 'name_required' => 'switch', 'name_title' => 'text', 'name_placeholder' => 'text', 'gdpr' => 'switch', 'gdpr_title' => 'textarea', 'email_list' => 'textarea', 'email' => 'switch', 'recaptcha' => 'switch', 'tg' => 'switch', 'tg_text' => 'textarea', 'hr1' => 'html', 'hr2' => 'html', 'hhr1' => 'html', 'hhr2' => 'html', 'hhr3' => 'html', 'hhr4' => 'html', ); } public function attributeDescriptions() { return array( 'timeout' => $this->l('Set to 0 to disable countdown.', 'ArContactUsAbstract'), 'allowed_ips' => sprintf($this->l('One IP address per line. Your current IP %s', 'ArContactUsAbstract'), $this->getCurrentIP()), 'font_awesome' => $this->l('If you have already included FontAwesome CSS file, please disable this option', 'ArContactUsAbstract'), 'button_icon_img' => $this->l('Minimum size is 48x48. Allowed formats: PNG, JPG, JPEG, SVG. Proportions should be 1:1', 'ArContactUsAbstract'), 'sandbox' => $this->l('If enabled, module will be shown from allowed IPs only.', 'ArContactUsAbstract'), 'email_list' => $this->l('One email per line.', 'ArContactUsAbstract'), 'recaptcha' => $this->l('You can use Google reCaptcha to prevent bots from sending callback requests. This module uses invisible reCaptcha V3', 'ArContactUsAbstract'), 'onesignal' => $this->l('Onesignal module is detected on your shop. You can use this option to enable send web push notification to admin users if customer requested callback. To receive these messages you need to subscribe for onesignal admin push notifications.', 'ArContactUsAbstract'), 'key' => $this->l('You can get your Key here https://g.co/recaptcha/v3', 'ArContactUsAbstract'), 'secret' => $this->l('You can get your Secret here https://g.co/recaptcha/v3', 'ArContactUsAbstract'), 'icon_speed' => $this->l('Type 0 here to disable button animation', 'ArContactUsAbstract'), 'icon_animation_pause' => $this->l('Pause beetwen slide icon animations loop', 'ArContactUsAbstract'), 'twilio_phone' => $this->l('Your Twilio phone in international format', 'ArContactUsAbstract'), 'twilio_tophone' => $this->l('SMS message will be send to this phone number. Use international format', 'ArContactUsAbstract'), 'twilio_message' => $this->l('{phone} token will be replaced to phone entered in callback request form. {site} token will be replaced to site domain. {name} token will be replaced to customer name. {referer} token will be replaced to page url which used for callback request. {email} token will be replaced to customer email address (if filled).', 'ArContactUsAbstract'), 'onesignal_title' => $this->l('{phone} token will be replaced to phone entered in callback request form. {site} token will be replaced to site domain. {name} token will be replaced to customer name. {referer} token will be replaced to page url which used for callback request. {email} token will be replaced to customer email address (if filled).', 'ArContactUsAbstract'), 'onesignal_message' => $this->l('{phone} token will be replaced to phone entered in callback request form. {site} token will be replaced to site domain. {name} token will be replaced to customer name. {referer} token will be replaced to page url which used for callback request. {email} token will be replaced to customer email address (if filled).', 'ArContactUsAbstract'), 'fb_lang' => $this->l('SDK locale. For example: en_EN, ru_RU, fr_FR. Default: en_EN', 'ArContactUsAbstract'), 'fb_init' => $this->l('You can disable Facebook SDK initialization to avoid conflicts with other modules that uses Facebook SDK', 'ArContactUsAbstract'), 'phone_mask' => $this->l('X means any number', 'ArContactUsAbstract'), 'maskedinput' => $this->l('Please toggle off this option if you already using maskedinput.js on your site', 'ArContactUsAbstract'), 'vk_page_id' => $this->l('You need to enable "Community messages" for your page in your page administration section', 'ArContactUsAbstract'), 'zopim_id' => $this->l('Zopim or Zendesk chat Widget ID', 'ArContactUsAbstract'), 'show_after_close' => $this->l('Show prompt messages again if visitor has closed prompts after this interval (in minutes). Type 0 if you want to show prompts on next session. Type -1 to show prompts after page reload', 'ArContactUsAbstract'), 'close_timeout' => $this->l('If positive, callback popup will be closed after this interval. Leave 0 value if your want disable this feature.', 'ArContactUsAbstract'), 'tg_token' => $this->l('To create new bot please write to bot t.me/botFather. Write /start then /newbot and follow instructions', 'ArContactUsAbstract'), 'tg_chat_id' => $this->l('Messages will be received to this chatID. To know your chatID please write to bot t.me/userinfobot. You can set few chatID comma-separated. Please note that each chatID must be subscribed to your bot to receive messages from the bot. To subscribe please find your bot in telegram and write /start to the bot.', 'ArContactUsAbstract'), 'tg_text' => $this->l('This message will be received to your telegram. {phone} token will be replaced to phone entered in callback request form. {name} token will be replaced to customer name. {referer} token will be replaced to page url which used for callback request. {email} token will be replaced to customer email address (if filled).', 'ArContactUsAbstract'), 'fb_version' => $this->l('Default is "10.0"', 'ArContactUsAbstract'), ); } public function multiLangFields() { return array( 'text' => true, 'message' => true, 'phone_placeholder' => true, 'proccess_message' => true, 'success_message' => true, 'fail_message' => true, 'btn_title' => true, 'tawk_to_widget' => true, 'tawk_to_site_id' => true, 'fb_lang' => true, 'phone_mask' => true, 'zalo_welcome' => true, 'gdpr_title' => true, 'menu_header' => true, 'name_title' => true, 'name_placeholder' => true, 'email_title' => true, 'email_placeholder' => true, 'onesignal_message' => true, 'onesignal_title' => true, 'tg_text' => true ); } public function htmlFields() { return array( 'tawk_to_head' => '

' . $this->l('Tawk.to integration', 'ArContactUsAbstract') . '

', 'hr1' => '
', 'crisp_head' => '

' . $this->l('Crisp integration', 'ArContactUsAbstract') . '

', 'hr2' => '
', 'intercom_head' => '

' . $this->l('Intercom integration', 'ArContactUsAbstract') . '

', 'hr3' => '
', 'fb_head' => '

' . $this->l('Facebook customer chat', 'ArContactUsAbstract') . '

', 'hr4' => '
', 'vk_head' => '

' . $this->l('VK community messages', 'ArContactUsAbstract') . '

', 'hr5' => '
', 'zopim_head' => '

' . $this->l('Zendesk chat', 'ArContactUsAbstract') . '

', 'hr6' => '
', 'skype_head' => '

' . $this->l('Skype Web Control', 'ArContactUsAbstract') . '

', 'hr7' => '
', 'hr8' => '
', 'hr9' => '
', 'hr10' => '
', 'hr11' => '
', 'hr12' => '
', 'hr13' => '
', 'hr14' => '
', 'hr15' => '
', 'hr16' => '
', 'hr17' => '
', 'hr18' => '
', 'hr19' => '
', 'hr20' => '
', 'hr21' => '
', 'hr22' => '
', 'hr1' => '
', 'hr2' => '
', 'hhr1' => '
', 'hhr2' => '
', 'hhr3' => '
', 'hhr4' => '
', 'zalo_head' => '

' . $this->l('Zalo chat widget', 'ArContactUsAbstract') . '

', 'fb_alert' => '
' . $this->l('Facebook customer chat requires HTTPS for full functionality', 'ArContactUsAbstract') . '
', 'onesignal_alert' => '
' . $this->l('Onesignal requires HTTPS', 'ArContactUsAbstract') . '
', 'lhc_head' => '

' . $this->l('Live helper chat', 'ArContactUsAbstract') . '

', 'ss_head' => '

' . $this->l('Smartsupp', 'ArContactUsAbstract') . '

', 'lc_head' => '

' . $this->l('LiveChat', 'ArContactUsAbstract') . '

', 'tidio_head' => '

' . $this->l('Tidio', 'ArContactUsAbstract') . '

', 'lcp_head' => '

' . $this->l('LiveChat Pro', 'ArContactUsAbstract') . '

', 'lz_head' => '

' . $this->l('LiveZilla chat widget', 'ArContactUsAbstract') . '

', 'jivosite_head' => '

' . $this->l('Jivosite chat widget', 'ArContactUsAbstract') . '

', 'zoho_head' => '

' . $this->l('Zoho SalesIQ chat widget', 'ArContactUsAbstract') . '

', 'fc_head' => '

' . $this->l('FreshChat chat widget', 'ArContactUsAbstract') . '

', 'phplive_head' => '

' . $this->l('PhpLive chat widget', 'ArContactUsAbstract') . '

', 'paldesk_head' => '

' . $this->l('Paldesk chat widget', 'ArContactUsAbstract') . '

', 'hubspot_head' => '

' . $this->l('Hubspot chat widget', 'ArContactUsAbstract') . '

', 'socialintents_head' => '

' . $this->l('SocialIntents chat widget', 'ArContactUsAbstract') . '

', 'botmake_head' => '

' . $this->l('Botmake chat widget', 'ArContactUsAbstract') . '

' ); } public function groupedSelects() { return array( 'animation' => true ); } public function getCurrentIP() { if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') { return $_SERVER['REMOTE_ADDR']; } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } } }