• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View/Helper/FormReset.php

00001 <?php
00027 require_once 'Zend/View/Helper/FormElement.php';
00028 
00029 
00039 class Zend_View_Helper_FormReset extends Zend_View_Helper_FormElement
00040 {
00056     public function formReset($name = '', $value = 'Reset', $attribs = null)
00057     {
00058         $info = $this->_getInfo($name, $value, $attribs);
00059         extract($info); // name, value, attribs, options, listsep, disable
00060 
00061         // check if disabled
00062         $disabled = '';
00063         if ($disable) {
00064             $disabled = ' disabled="disabled"';
00065         }
00066 
00067         // get closing tag
00068         $endTag = '>';
00069         if ($this->view->doctype()->isXhtml()) {
00070             $endTag = ' />';
00071         }
00072 
00073         // Render button
00074         $xhtml = '<input type="reset"'
00075                . ' name="' . $this->view->escape($name) . '"'
00076                . ' id="' . $this->view->escape($id) . '"'
00077                . $disabled;
00078 
00079         // add a value if one is given
00080         if (! empty($value)) {
00081             $xhtml .= ' value="' . $this->view->escape($value) . '"';
00082         }
00083 
00084         // add attributes, close, and return
00085         $xhtml .= $this->_htmlAttribs($attribs) . $endTag;
00086         return $xhtml;
00087     }
00088 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2