public static function send(PetitionSigning $signing, $subject_prefix = null) { if ($signing->getValidationKind() != PetitionSigning::VALIDATION_KIND_EMAIL) { return; } $widget = $signing->getWidget(); $petition = $widget->getPetition(); $petition_text = $widget->getPetitionText(); $subject = $petition_text->getEmailValidationSubject(); $body = $petition_text->getEmailValidationBody(); $validation = UtilLink::signValidation($signing->getId(), $signing->getValidationData()); $url_ref_ = $signing->getField(Petition::FIELD_REF); // $this->getValue('ref'); $url_readmore_ = $petition->getReadMoreUrl(); $url_ref = UtilPolicat::firstString(array($url_ref_, $url_readmore_)); $url_readmore = UtilPolicat::firstString(array($url_readmore_, $url_ref_)); $from = $petition->getFrom(); $to = $signing->getEmail(); $additional_subst = array('URL-REFERER' => $url_ref, 'URL-READMORE' => $url_readmore, 'VALIDATION' => $validation, '#REFERER-URL#' => $url_ref, '#READMORE-URL#' => $url_readmore, '#VALIDATION-URL#' => $validation); if ($subject_prefix) { $i18n = sfContext::getInstance()->getI18N(); $i18n->setCulture($signing->getWidget()->getPetitionText()->getLanguageId()); $translated = $i18n->__($subject_prefix); $subject = $translated . ' ' . $subject; } UtilMail::sendWithSubst(null, $from, $to, $subject, $body, $petition_text, $widget, $additional_subst, $signing->getSubst()); }
?> > <?php echo $title; ?> </p> <div <?php UtilPolicat::style($css, array('font-size' => '20px', 'color' => '#fff', 'background-color' => $stylings['button_color'], 'margin' => '0 10px', 'height' => '40px', 'line-height' => '40px', 'font-weight' => 'bold', 'font-size' => '20px', 'text-transform' => 'uppercase', 'background-image' => 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3))', '-webkit-border-radius' => '3px', '-moz-border-radius' => '3px', 'border-radius' => '3px')); ?> onmouseover="this.style.backgroundImage = 'linear-gradient(to bottom, rgba(200, 200, 200, 0.2), rgba(100, 100, 100, 0.3))';" onmouseout="this.style.backgroundImage = 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3))';"> <?php echo __('Take action'); ?> </div> <p <?php UtilPolicat::style($css, array('font-size' => '11px', 'line-height' => '11px', 'color' => $stylings['body_color'], 'margin' => '10px')); ?> > <?php echo $stylings['count']; ?> </p> </div> <?php $stylings['markup'] = ob_get_contents(); ob_end_clean(); $stylings = json_encode($stylings); echo UtilWidget::getInitJS(); echo UtilWidget::getAddStyleJS($widget['id'], $stylings); echo file_get_contents(sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'policat_widget_outer_opt.js'); ?>
><?php echo number_format($target, 0, '.', ','); ?> </span> </div> <div id="count-<?php echo $widgetid; ?> " <?php UtilPolicat::style($css, array('font-size' => '12px', 'background' => 'counter_bg_color', 'height' => '18px')); ?> > <div id="coloredbar-<?php echo $widgetid; ?> " <?php UtilPolicat::style($css, array('background' => 'line_bg_color', 'height' => '18px', 'position' => 'absolute', 'left' => '0', 'top' => '0', 'width' => '0')); ?> ></div> <span id="counternumber-<?php echo $widgetid; ?> " <?php UtilPolicat::style($css, array('position' => 'absolute', 'padding' => '0 2px', 'top' => '0', 'left' => '0', 'color' => 'number_text_color')); ?> ><?php echo number_format($count, 0, '.', ','); ?> </span> </div> </div>