Source for file function.eaSubmitButton.php
Documentation is available at function.eaSubmitButton.php
* smarty function plugin to produce submit buttons
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* @subpackage code/base/smarty
* @author m2mtech <tech@m2m.at>
* @copyright 2007 m2m server software gmbh
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License Version 2
* @version $Id: function.eaSubmitButton.php 77 2007-06-04 04:50:15Z m2mtech $
* @link http://www.ea-geier.at/
* Smarty {eaSubmitButton} plugin
* creates <input type="submit" /> fields from {eaSubmitButton} constructs
* - {eaSubmitButton name=NAME} ->
* <input type="submit" name="NAME" ... class="submit" />
* - !existing {#NAME#} -> ...<input ... value="submit" />
* - existing {#NAME#} -> ...<input ... value="{#NAME#}" />
* @param array function parameters
* - name input name mandatory
require_once $smarty->_get_plugin_filepath('shared', 'escape_special_chars');
// ensure name parameter is available
if (!isset ($params['name'])) {
$smarty->trigger_error("eaSubmitButton: 'name' missing", E_USER_NOTICE);
$name = smarty_function_escape_special_chars($params['name']);
$return .= '<label> </label>';
$return .= '<input type="submit" name="' . $name . '" value="';
if ($value = $smarty->get_config_vars($nameL)) $return .= $value;
else $return .= 'submit';
$return.= '" class="submit" />';
|