From 6320652c2fcb36bb61822f6f8b76679c193b07c0 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 19 Jun 2018 11:55:25 -0400 Subject: [PATCH] Use html5 color input for contribution page widget --- .../Form/ContributionPage/Widget.php | 18 +++++++++--------- .../Form/ContributionPage/Widget.tpl | 3 --- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage/Widget.php b/CRM/Contribute/Form/ContributionPage/Widget.php index df8905af0a..9d8a621354 100644 --- a/CRM/Contribute/Form/ContributionPage/Widget.php +++ b/CRM/Contribute/Form/ContributionPage/Widget.php @@ -85,55 +85,55 @@ class CRM_Contribute_Form_ContributionPage_Widget extends CRM_Contribute_Form_Co $this->_colorFields = array( 'color_title' => array( ts('Title Text Color'), - 'text', + 'color', FALSE, '#2786C2', ), 'color_bar' => array( ts('Progress Bar Color'), - 'text', + 'color', FALSE, '#2786C2', ), 'color_main_text' => array( ts('Additional Text Color'), - 'text', + 'color', FALSE, '#FFFFFF', ), 'color_main' => array( ts('Background Color'), - 'text', + 'color', FALSE, '#96C0E7', ), 'color_main_bg' => array( ts('Background Color Top Area'), - 'text', + 'color', FALSE, '#B7E2FF', ), 'color_bg' => array( ts('Border Color'), - 'text', + 'color', FALSE, '#96C0E7', ), 'color_about_link' => array( ts('Button Text Color'), - 'text', + 'color', FALSE, '#556C82', ), 'color_button' => array( ts('Button Background Color'), - 'text', + 'color', FALSE, '#FFFFFF', ), 'color_homepage_link' => array( ts('Homepage Link Color'), - 'text', + 'color', FALSE, '#FFFFFF', ), diff --git a/templates/CRM/Contribute/Form/ContributionPage/Widget.tpl b/templates/CRM/Contribute/Form/ContributionPage/Widget.tpl index d32391961f..75ca3aa3fc 100644 --- a/templates/CRM/Contribute/Form/ContributionPage/Widget.tpl +++ b/templates/CRM/Contribute/Form/ContributionPage/Widget.tpl @@ -92,9 +92,6 @@ {ts}Edit Widget Colors{/ts}
-
- {ts}Enter colors in hexadecimal format prefixed with #. EXAMPLE: #FF0000 = Red. You can do a web search on 'hexadecimal colors' to find a chart of color codes.{/ts} -
{foreach from=$colorFields item=field key=fieldName} -- 2.25.1
{$form.$fieldName.label} *{$form.$fieldName.html}