Skip to content

Commit

Permalink
add reachgoal
Browse files Browse the repository at this point in the history
  • Loading branch information
CB9TOIIIA committed May 7, 2017
1 parent e695abb commit 911a888
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
19 changes: 17 additions & 2 deletions mod_simplecallback/mod_simplecallback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<author>Eugene Kopylov</author>
<authoremail>[email protected]</authoremail>
<authorurl>https://github.com/CB9TOIIIA/simplecallback_fork_cb9t</authorurl>
<version>1.3.1</version>
<version>1.3.2</version>
<creationdate>24.02.2015</creationdate>
<description>
<![CDATA[Продвинутый модуль формы обратной связи для CMS Joomla! Возможность отправлять сообщения: на почту, Вконтакте, Slack, PushAll, Telegram, SMS, Callback - обратный звонок через сервис Pozvonim и т.д.<br><b>Для настройки и добавление новых возможностей (мои контакты): Skype: cb9t.ru / Telegram: <a href="https://t.me/cb9toiiia" target="_blank">@CB9TOIIIA</a> / Почта: [email protected] </b><br><iframe frameborder='0' allowtransparency='true' scrolling='no' src='https://tpv.sr/1QoBXDF/' width='510' height='315'></iframe>]]>
Expand Down Expand Up @@ -313,8 +313,23 @@
name="simplacallback_my_inline_css"
label="Свои CSS правила"
default=".simplecallback textarea { width: 100%; height: 125px; }" >

</field>
<field
type="radio"
name="simplacallback_reachgoal_enabled"
label="Включить цели в GA/Ya?"
description=""
default="0"
class="btn-group btn-group-yesno">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
type="text"
name="simplacallback_reachgoal_text"
label="Reachgoal (цель)"
description=""
default="yaCounterXXXXXX.reachGoal('buy_button');"></field>

</fieldset>
<fieldset name="crossposting" label="Кросспостинг">
Expand Down
11 changes: 10 additions & 1 deletion mod_simplecallback/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
$zv_message_req = ($message_req == 'required') ? '<span style="needreq">*</span>' : '' ;
$zv_textsimple_req = ($custom_textsimple_req == 'required') ? '<span style="needreq">*</span>' : '' ;
$my_inline_css_enabled = $params->get('simplacallback_my_inline_css_enabled', 0);
$reachgoal_enabled = $params->get('simplacallback_reachgoal_enabled', 0);
$my_inline_css = $params->get('simplacallback_my_inline_css', '');
$textarea_width = $params->get('simplecallback_textarea_width', 0);
$textarea_width_cols = $params->get('simplecallback_textarea_width_cols', '');
$textarea_width_rows = $params->get('simplecallback_textarea_width_rows', '');
$reachgoal_text = $params->get('simplacallback_reachgoal_text', '');

if ($my_inline_css_enabled == 1) {
echo '<style>'.$my_inline_css.'</style>';
Expand All @@ -68,6 +70,13 @@
$textarea_width_rows = '';
}

if ($reachgoal_enabled == 1) {
$reachgoal_text = 'onClick="'.$reachgoal_text.'"';
}
else {
$reachgoal_text = '';
}

?>

<form enctype="multipart/form-data" id="simplecallback-<?php echo $module->id; ?>" action="<?php echo JURI::root(); ?>index.php?option=com_ajax&module=simplecallback&format=json" class="form-inline simplecallback<?php echo $moduleclass_sfx ?> <?php if ($overlayed == 1) { echo " simplecallback-overlayed
Expand Down Expand Up @@ -230,7 +239,7 @@
<input type="hidden" name="simplecallback_page_title" value="<?php echo $document->getTitle(); ?>">
<input type="hidden" name="simplecallback_page_url" value="<?php echo JUri::getInstance()->toString(); ?>">
<input type="hidden" name="simplecallback_custom_data" value="">
<button type="submit" class="<?php echo $submit_field_css; ?>">
<button type="submit" <?php echo $reachgoal_text ?> class="<?php echo $submit_field_css; ?>">
<?php echo $params->get('simplecallback_submit_field_label'); ?>
</button>
</div>
Expand Down

0 comments on commit 911a888

Please sign in to comment.