[zi-cvs] packages/com.zzoss.installer.lib Widget.php,1.6,1.7
Sandro Zic <[email protected]> Mon, 22 Mar 2004 08:33:41 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18011
Modified Files:
Widget.php
Log Message:
allow customized values in checkbox
Index: Widget.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib/Widget.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Widget.php 18 Mar 2004 09:41:38 -0000 1.6
--- Widget.php 22 Mar 2004 08:33:39 -0000 1.7
***************
*** 425,428 ****
--- 425,431 ----
{
$checked = '';
+ if(!isset($this->options['value'])){
+ $this->options['value'] = 'on';
+ }
ob_start();
?>
***************
*** 433,440 ****
echo '<div class="warning-inline">'.$this->errors[$this->name].'</div>';
}
! if(isset($_REQUEST['ZI_VALUES'][$this->name]) && $_REQUEST['ZI_VALUES'][$this->name] == 'on'){
$checked = ' checked';
}
! ?><input type="checkbox" name="ZI_VALUES[<?php echo $this->name; ?>]" value="on"<?php echo $checked; ?><?php
if(isset($this->options['disabled']) && $this->options['disabled']){
echo ' disabled';
--- 436,443 ----
echo '<div class="warning-inline">'.$this->errors[$this->name].'</div>';
}
! if(isset($_REQUEST['ZI_VALUES'][$this->name]) && $_REQUEST['ZI_VALUES'][$this->name] == $this->options['value']){
$checked = ' checked';
}
! ?><input type="checkbox" name="ZI_VALUES[<?php echo $this->name; ?>]" value="<?php echo $this->options['value']; ?>"<?php echo $checked; ?><?php
if(isset($this->options['disabled']) && $this->options['disabled']){
echo ' disabled';
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click