[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.13,1.1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.13,1.14 class.html.inc.php,1.4,1.5 class.uietemplate.inc.php,1.16,1.17 |
Date: |
Thu, 12 Sep 2002 04:41:00 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv26394
Modified Files:
class.boetemplate.inc.php class.html.inc.php
class.uietemplate.inc.php
Log Message:
added eTemplate widget file / FileUpload
added options param to html.form
Index: class.boetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.boetemplate.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.boetemplate.inc.php 2 Sep 2002 17:09:49 -0000 1.13
--- class.boetemplate.inc.php 12 Sep 2002 08:40:57 -0000 1.14
***************
*** 50,53 ****
--- 50,54 ----
// size: -1=Single+not
assigned, 0=Single, >0=Multiple
'raw' => 'Raw', // Raw html in
$content[$cell['name']]
+ 'file' => 'FileUpload' // show an input type='file',
set the local name as ${name}_path
);
/*!
Index: class.html.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.html.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.html.inc.php 2 Sep 2002 11:11:08 -0000 1.4
--- class.html.inc.php 12 Sep 2002 08:40:57 -0000 1.5
***************
*** 96,102 ****
}
! function
form($content,$hidden_vars,$url,$url_vars='',$name='',$method='POST')
{
! $html = "<form method=\"$method\" ".($name != '' ?
"name=\"$name\" " : '')."action=\"".$this->link($url,$url_vars)."\">\n";
$html .= $this->input_hidden($hidden_vars);
--- 96,102 ----
}
! function
form($content,$hidden_vars,$url,$url_vars='',$name='',$options='',$method='POST')
{
! $html = "<form method=\"$method\" ".($name != '' ?
"name=\"$name\" " : '')."action=\"".$this->link($url,$url_vars)."\"
$options>\n";
$html .= $this->input_hidden($hidden_vars);
***************
*** 112,116 ****
{
return $this->form($this->submit_button($name,$lang),
!
$hidden_vars,$url,$url_vars,$form_name,$method);
}
--- 112,116 ----
{
return $this->form($this->submit_button($name,$lang),
!
$hidden_vars,$url,$url_vars,$form_name,'',$method);
}
Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.uietemplate.inc.php 12 Sep 2002 00:31:57 -0000 1.16
--- class.uietemplate.inc.php 12 Sep 2002 08:40:57 -0000 1.17
***************
*** 35,39 ****
var $html,$sbox; // instance of html / sbox2-class
var $loop = 0; // set by process_show if an other
Exec-ProcessExec loop is needed
-
/*!
@function etemplate
--- 35,38 ----
***************
*** 103,110 ****
$id = $this->appsession_id();
$html .=
$this->html->nextMatchStyles($this->style)."\n\n". // so they get included once
$this->html->form($this->include_java_script() .
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),
! array('etemplate_exec_id' =>
$id),'/index.php?menuaction=etemplate.etemplate.process_exec','','eTemplate');
$id = $this->save_appsession($this->as_array(1) + array(
--- 102,112 ----
$id = $this->appsession_id();
+ $GLOBALS['phpgw_info']['etemplate']['form_options'] =
''; // might be set in show
$html .=
$this->html->nextMatchStyles($this->style)."\n\n". // so they get included once
$this->html->form($this->include_java_script() .
$this->show($this->complete_array_merge($content,$changes),$sel_options,$readonlys,'exec'),
! array('etemplate_exec_id' => $id),
!
'/index.php?menuaction=etemplate.etemplate.process_exec','','eTemplate',
!
$GLOBALS['phpgw_info']['etemplate']['form_options']);
$id = $this->save_appsession($this->as_array(1) + array(
***************
*** 543,546 ****
--- 545,554 ----
$extra_label = False;
break;
+ case 'file':
+ $html .=
$this->html->input_hidden($path =
str_replace($name,$name.'_path',$form_name),'.');
+ $html .=
$this->html->input($form_name,'','file');
+
$GLOBALS['phpgw_info']['etemplate']['form_options'] =
+
"enctype=\"multipart/form-data\"
onSubmit=\"set_element2(this,'$path','$form_name')\"";
+ break;
default:
if
(!isset($this->extension[$cell['type']]))
***************
*** 854,857 ****
--- 862,886 ----
function set_element(form,name,value)
{
+ '. /* ' alert("set_element: "+name+"="+value);'. */ '
+ for (i = 0; i < form.length; i++)
+ {
+ if (form.elements[i].name == name)
+ {
+ form.elements[i].value = value;
+ }
+ }
+ }
+
+ function set_element2(form,name,vname)
+ {
+ '. /* ' alert("set_element2: "+name+"="+vname);'. */ '
+ for (i = 0; i < form.length; i++)
+ {
+ if (form.elements[i].name == vname)
+ {
+ value = form.elements[i].value;
+ }
+ }
+ '. /* ' alert("set_element2: "+name+"="+value);'. */ '
for (i = 0; i < form.length; i++)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.boetemplate.inc.php,1.13,1.14 class.html.inc.php,1.4,1.5 class.uietemplate.inc.php,1.16,1.17,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site config.inc.php.template,1.4,1.5
- Next by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.editor.inc.php,1.11,1.12 class.xul_io.inc.php,1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site config.inc.php.template,1.4,1.5
- Next by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.editor.inc.php,1.11,1.12 class.xul_io.inc.php,1.1,1.2
- Index(es):