$data["color_bar"] = $dao->color_progress_bar;
$defProf = civicrm_api3('setting', 'getValue', array('group' => 'Wci Preference', 'name' => 'default_wci_profile'));
$data["emailSignupGroupFormURL"] = CRM_Utils_System::baseCMSURL() . '/civicrm/profile/create?reset=1&gid=' . $defProf;
+ $data["color_btn_newsletter"] = $dao->color_btn_newsletter;
+ $data["color_btn_newsletter_bg"] = $dao->color_btn_newsletter_bg;
+ $data["newsletter_text"] = $dao->newsletter_text;
+ $data["color_newsletter_text"] = $dao->color_newsletter_text;
}
return $data;
}
* @var string
*/
public $custom_template;
+
+ /**
+ * Newsletter Button text color
+ *
+ * @var string
+ */
+ public $color_btn_newsletter;
+
+ /**
+ * Newsletter Button color
+ *
+ * @var string
+ */
+ public $color_btn_newsletter_bg;
+
+ /**
+ * Newsletter text
+ *
+ * @var string
+ */
+ public $newsletter_text;
+
+ /**
+ * Newsletter msg text color
+ *
+ * @var string
+ */
+ public $color_newsletter_text;
+
function __construct()
{
$this->__table = 'civicrm_wci_widget';
'title' => ts('Widget custom template', array('domain' => 'org.civicrm.wci')) ,
'required' => false,
) ,
+
+ 'color_btn_newsletter' => array(
+ 'name' => 'color_btn_newsletter',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Newsletter Button text color', array('domain' => 'org.civicrm.wci')) ,
+ 'required' => true,
+ 'maxlength' => 10,
+ ) ,
+ 'color_btn_newsletter_bg' => array(
+ 'name' => 'color_btn_newsletter_bg',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Newsletter Button color', array('domain' => 'org.civicrm.wci')) ,
+ 'required' => true,
+ 'maxlength' => 10,
+ ) ,
+ 'newsletter_text' => array(
+ 'name' => 'newsletter_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Newsletter text', array('domain' => 'org.civicrm.wci')) ,
+ 'required' => true,
+ 'maxlength' => 64,
+ ) ,
+ 'color_newsletter_text' => array(
+ 'name' => 'color_newsletter_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Newsletter text color', array('domain' => 'org.civicrm.wci')) ,
+ 'required' => true,
+ 'maxlength' => 10,
+ ) ,
);
}
return self::$_fields;
'color_button' => array(ts('Button text color'),
'text',
FALSE,
- '#000000',
+ '#FFFFFF',
),
'color_button_bg' => array(ts('Button background color'),
'text',
FALSE,
'#BF0F0F',
),
+ 'color_btn_newsletter' => array(ts('Newsletter Button text color'),
+ 'text',
+ FALSE,
+ '#FFFFFF',
+ ),
+ 'color_btn_newsletter_bg' => array(ts('Newsletter Button color'),
+ 'text',
+ FALSE,
+ '#BF0F0F',
+ ),
+ 'newsletter_text' => array(ts('Newsletter text'),
+ 'text',
+ FALSE,
+ 'Get the monthly newsletter',
+ ),
+ 'color_newsletter_text' => array(ts('Newsletter text color'),
+ 'text',
+ FALSE,
+ '#BF0F0F',
+ ),
);
}
'hide_border' => $wid_page[$dao->id]['hide_border']));
$this->setDefaults(array(
'hide_pbcap' => $wid_page[$dao->id]['hide_pbcap']));
+
+ $this->setDefaults(array(
+ 'color_btn_newsletter' => $wid_page[$dao->id]['color_btn_newsletter']));
+ $this->setDefaults(array(
+ 'color_btn_newsletter_bg' => $wid_page[$dao->id]['color_btn_newsletter_bg']));
+ $this->setDefaults(array(
+ 'newsletter_text' => $wid_page[$dao->id]['newsletter_text']));
+ $this->setDefaults(array(
+ 'color_newsletter_text' => $wid_page[$dao->id]['color_newsletter_text']));
+
if(true == $wid_page[$dao->id]['override']) {
$cust_templ = html_entity_decode($wid_page[$dao->id]['custom_template']);
$this->setDefaults(array(
. "', hide_title = '" . $hide_title
. "', hide_border = '" . $hide_border
. "', hide_pbcap = '" . $hide_pbcap
+ . "', color_btn_newsletter = '" . $values['color_btn_newsletter']
+ . "', color_btn_newsletter_bg = '" . $values['color_btn_newsletter_bg']
+ . "', newsletter_text = '" . $values['newsletter_text']
+ . "', color_newsletter_text = '" . $values['color_newsletter_text']
. "', style_rules = '" . str_replace("'", "''", $values['style_rules']) . "', override = '"
. $override . $quote . $coma . $cust_tmpl_col . $equals . $quote . $cust_tmpl . "' where id =" . $this->_id ;
}
button_title, button_link_to, progress_bar_id, description,
email_signup_group_id, size_variant, color_title, color_title_bg,
color_progress_bar, color_widget_bg, color_description, color_border,
- color_button, color_button_bg, hide_title, hide_border, hide_pbcap, style_rules, override" . $coma . $cust_tmpl_col ." )
+ color_button, color_button_bg, hide_title, hide_border, hide_pbcap,
+ color_btn_newsletter, color_btn_newsletter_bg, newsletter_text, color_newsletter_text,
+ style_rules, override" . $coma . $cust_tmpl_col ." )
VALUES ('" . $title . "','" . $values['logo_image'] . "','" .
$values['image'] . "','" . $values['button_title'] . "','" .
$values['button_link_to'] . "','" . $values['progress_bar'] . "','" .
$values['color_widget_bg'] . "','" . $values['color_description'] . "','" .
$values['color_border'] . "','" . $values['color_button'] . "','" .
$values['color_button_bg'] . "','" . $hide_title . "','" .
- $hide_border . "','" . $hide_pbcap . "','"
- . str_replace("'", "''", $values['style_rules']) . "','" .
+ $hide_border . "','" . $hide_pbcap . "','" .
+ $values['color_btn_newsletter'] . "','" . $values['color_btn_newsletter_bg'] . "','" .
+ $values['newsletter_text'] . "','" . $values['color_newsletter_text'] . "','" .
+ str_replace("'", "''", $values['style_rules']) . "','" .
$override . $quote . $coma . $quote . $cust_tmpl
. "')";
}
$this->fillData();
- $this->addElement('link', 'addmore_link',' ', 'addmore', 'Add more');
+ $this->addElement('link', 'addmore_link',' ', 'addmore', 'Add another contribution page');
$this->addButtons(array(
array(
c_page_sel.attr("name", "contribution_page_" + count);
var id_section = "crm-section-con-" + count;
- var sect_tag = "<div class=\"crm-section\" id=" + id_section + "> <div class=\"label\"><label>Contribution Page</label>";
+ var sect_tag = "<div class=\"crm-section\" id=" + id_section + "> <hr width='50%' size='1'> <div class=\"label\"><label>Contribution Page</label>";
$('#addmore_link').parent().parent().before(sect_tag);
var id_content = "content_con-" + count;
$('#' + id_section).append("<div class=\"content\" id="+ id_content + ">");
$('#' + id_content).append(c_page_sel);
$('#' + id_content).append('<a id=\"remove_link\" class=\"form-link\" href=\"remove\" name=\"remove_link-' + count + '\"> Remove</a>');
- $('#' + id_section).append("</div");
+ $('#' + id_section).append("</div>");
id_section = "crm-section-per-" + count;
sect_tag = "<div class=\"crm-section\" id=" + id_section + "> <div class=\"label\"><label>Percentage</label>";
hide_title tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide title, if 1.',
hide_border tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide widget border, if 1.',
hide_pbcap tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide pb caption, if 1.',
+ color_btn_newsletter varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter Button text color',
+ color_btn_newsletter_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter Button color',
+ newsletter_text varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter text',
+ color_newsletter_text varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter text color',
+
PRIMARY KEY (`id`),
UNIQUE KEY `unique_wci_title` (`title`),
CONSTRAINT FK_civicrm_wci_widget_progress_bar_id FOREIGN KEY (`progress_bar_id`) REFERENCES `civicrm_wci_progress_bar`(`id`) ON DELETE SET NULL
border: None;
{/literal}{/if}{literal}
background-color: {/literal}{$wciform.color_widget_bg}{literal}; /* background color */
- box-shadow: 3px 3px 6px;
}
.crm-wci-widget.thin {
text-align: center;
margin: 0 auto;
}
+ input.btnNL, button.btnNL {
+ color:{/literal}{$wciform.color_btn_newsletter}{literal};
+ background:{/literal}{$wciform.color_btn_newsletter_bg}{literal};
+ }
+ #newsletter_msg {
+ color:{/literal}{$wciform.color_newsletter_text}{literal};
+ }
</style>
<style>
<form action="{$wciform.emailSignupGroupFormURL}" method="post">
{/if}
<p id="newsletter_msg">
- Get the monthly newsletter
+ {$wciform.newsletter_text}
</p>
<p id="newsletter_mail">
<input id="frmEmail" type="text" name="email-Primary" size="18" maxlength="80" placeholder="email address">
</p>
<p id="newsletter_submit">
{if $embed eq 1 }
- <input type="submit" name="_qf_Edit_next" value="Subscribe me">
+ <input class ="btnNL" type="submit" name="_qf_Edit_next" value="Subscribe me">
{else}
- <input type="button" name="_qf_Edit_next" value="Subscribe me">
+ <button class ="btnNL" type="button" name="_qf_Edit_next" value="Subscribe me">Subscribe me</button>
{/if}
</p>
<div>