|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Jul 13, 2004 3:12 pm Post subject: SmartyFormtool 1.2 released |
|
|
Just a few minor changes:
* fix Safari problem when moving elements down (was only half fixed) (monte)
* add ability to turn off limit message alert (kills, Monte)
* add LGPL license text to README
http://www.phpinsider.com/php/code/SmartyFormtool/
Enjoy! |
|
Back to top |
|
jasrags Smarty n00b
Joined: 21 Sep 2004 Posts: 2 Location: Dallas, TX
|
Posted: Fri Oct 29, 2004 2:47 pm Post subject: Mod of formtool_checkall |
|
|
If anyone needs it i have modified formtool_checkall to accept a class param so you can apply your CSS to the button created. I'm sure this can be applied to all other formtool plugins that may accept a class tag element.
Code: |
/**
* Smarty {formtool_checkall} function plugin
*
* File: function.formtool_checkall.php<br>
* Type: function<br>
* Name: html_radios<br>
* Date: 29.Oct.2004<br>
* Purpose: formtool checkall and uncheck all items in a list<br>
* Input:<br>
* - name (required) - string default "radio"
* - class (optional) - string
* Examples:
* <pre>
* {formtool_checkall name="exclude[]"}
* {formtool_checkall name="exclude[]" class="BUTTON"}
* </pre>
*/
function smarty_function_formtool_checkall($params, &$smarty)
{
$_class= null;
if (empty($params['name'])) {
$smarty->trigger_error("formtool_checkall: missing 'name' parameter");
return;
}
if ($params['class']) {
$_class = $params['class'];
}
$_name = $params['name'];
$_checkall_text = empty($params['checkall_text']) ? 'Check All' : $params['checkall_text'];
$_uncheckall_text = empty($params['uncheckall_text']) ? 'Uncheck All' : $params['uncheckall_text'];
return "<input type=button class=\"$_class\" value=\"$_checkall_text\" onClick=\"this.value=formtool_checkall('$_name', this.form.elements['$_name'],'"
. addslashes($_checkall_text)
. "','"
. addslashes($_uncheckall_text)
. "')\">\n";
}
/* vim: set expandtab: */
| [/code] |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Oct 29, 2004 3:22 pm Post subject: |
|
|
Synchronicity--I just finished adding class and style support to all the plugins (and a bunch of other things). It is in the CVS and can probably stand some testing
Last edited by boots on Fri Oct 29, 2004 3:23 pm; edited 1 time in total |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Oct 29, 2004 3:23 pm Post subject: |
|
|
These things are slowly getting migrated into the CVS version (thanks to boots), you should see them in the next release. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|