Source for file function.pnformfloatinput.php
Documentation is available at function.pnformfloatinput.php
* @copyright (c) 2006, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: function.pnformfloatinput.php 24425 2008-07-02 12:13:57Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
/** Make sure to use require_once() instead of Loader::requireOnce() since "function.pnformtextinput.php"
is loaded by Smarty (the base render class) with the use of require_once(). We do not want to
get in conflict with that.*/
require_once 'system/pnForm/plugins/function.pnformtextinput.php';
* Use for text inputs where you only want to accept floats. The value saved by
* {@link pnForm::pnFormGetValues()} is either null or a valid float.
* Minimum value for validation
* Maximum value for validation
return __FILE__ ; // FIXME: may be found in smarty's data???
function create(&$render, &$params)
$params['width'] = '6em';
parent::create($render, $params);
parent::validate($render);
$this->setError(pnML('_PNFORM_RANGEMINERROR', array('i' => $this->minValue)));
$this->setError(pnML('_PNFORM_RANGEMAXERROR', array('i' => $this->maxValue)));
return $render->pnFormRegisterPlugin('pnFormFloatInput', $params);
|