From: Steve Sutton Date: Thu, 12 Jun 2014 18:58:40 +0000 (-0400) Subject: form update for coupons X-Git-Tag: v1.0^2~29^2~1^2~4^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=929b89bfacaf0a71fc16d3357ed3d642f51a2b48;p=web%2FSooLocks.git form update for coupons add a template to the main search form for the coupons so I can use the foundation class grid for the form. --- diff --git a/Toolkit/Coupons/UserSearch.php b/Toolkit/Coupons/UserSearch.php index d3961cc..91d5763 100644 --- a/Toolkit/Coupons/UserSearch.php +++ b/Toolkit/Coupons/UserSearch.php @@ -41,6 +41,27 @@ class Toolkit_Coupons_UserSearch extends Toolkit_FormBuilder // }}} + public function setupRenderers() + { + $renderer =& $this->defaultRenderer(); + $renderer->clearAllTemplates(); + $renderer->setFormTemplate( + '
+ +
+ {hidden} +
+ {requiredNote} +
+
+ {content} +
+
+ +
' + ); + } + // {{{ configureConstants() /** @@ -100,7 +121,8 @@ class Toolkit_Coupons_UserSearch extends Toolkit_FormBuilder 'name' => 'months', 'opts' => array( '' => '-- All Months --' - ) + $months + ) + $months, + 'att' => array('class' => 'small-12 medium-6') ); $e[] = array( 'type' => 'select', @@ -108,13 +130,15 @@ class Toolkit_Coupons_UserSearch extends Toolkit_FormBuilder 'name' => 'coupon_category', 'opts' => array( '' => '-- All Categories --' - ) + $categories + ) + $categories, + 'att' => array('class' => 'small-12 medium-6') ); $e[] = array( 'type' => 'submit', 'req' => false, 'name' => 'submit', - 'display' => 'Search' + 'display' => 'Search', + 'opts' => array('class' => 'small-12 medium-3') ); $this->setupElements($e); @@ -338,6 +362,12 @@ class Toolkit_Coupons_UserSearch extends Toolkit_FormBuilder } } + public function toHtml() + { + $this->setupRenderers(); + $output = parent::toHtml(); + return $output; + } + // }}} } -?> diff --git a/Toolkit/Forms/templates/tables/Element.tpl b/Toolkit/Forms/templates/tables/Element.tpl index 595457b..d159c79 100644 --- a/Toolkit/Forms/templates/tables/Element.tpl +++ b/Toolkit/Forms/templates/tables/Element.tpl @@ -1,14 +1,13 @@ - - - - * - - - - - -
{error}
- - {element} - - +
+
+ +
+
\ No newline at end of file diff --git a/Toolkit/Forms/templates/tables/Form.tpl b/Toolkit/Forms/templates/tables/Form.tpl index 8ed6c2f..07e9dd1 100644 --- a/Toolkit/Forms/templates/tables/Form.tpl +++ b/Toolkit/Forms/templates/tables/Form.tpl @@ -1,11 +1,14 @@ +

Testing for Steve

+
{hidden}
{requiredNote} - + {content} -
+ -
\ No newline at end of file + + hello \ No newline at end of file