MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mcsspform.class
Ir para a documentação deste ficheiro.
1
<?php
2
class
MCSSPForm
extends
MForm
3
{
4
var
$height
;
5
var
$_top
;
6
var
$_left
;
7
8
function
__construct
(
$title
=
''
,
$action
=
''
)
9
{
10
global
$page
;
11
12
parent::__construct(
$title
,
$action
);
13
$this->heigth = 50;
14
$this->_top = 0;
15
$this->_left = 0;
16
}
17
18
function
SetFieldPos
(
$name
, $x, $y, $w = 0)
19
{
20
$field = &$this->$name;
21
22
if
($w)
23
$field->SetCSSPWidth($w);
24
25
$field->SetCSSPPosition($x, $y);
26
}
27
28
function
SetHeight
($value =
null
)
29
{
30
$this->height = $value;
31
}
32
33
function
SetOrigin
($top, $left)
34
{
35
$this->_top = $top;
36
$this->_left = $left;
37
}
38
39
function
GenerateLayoutFields
(&$hidden)
40
{
41
global
$MIOLO
;
42
43
if
(!is_array($this->fields))
44
return
;
45
46
$t =
new
SimpleTable
(
''
);
47
$t->attributes[
'table'
] =
"border=\"0\" height=\"{$this->height}\" width=\"100%\" cellpadding=\"0\" cellspacing=\"2\" class=\"formBody\" "
;
48
$row = 0;
49
50
foreach
($this->fields as $f)
51
{
52
if
(!$f->visible)
53
{
54
continue
;
55
}
56
57
if
((($f->classname ==
'textfield'
) && ($f->size == 0)) || ($f->classname ==
'hiddenfield'
))
58
{
59
$hidden[] = $f;
60
continue
;
61
}
62
63
if
(($f->readonly || $f->maintainstate))
64
{
65
$hidden[] = $f;
66
}
67
68
$t->cell[0][0][] = $f;
69
}
70
71
return
$t;
72
}
73
74
function
Generate
()
75
{
76
if
(!isset($this->buttons))
77
{
78
if
($this->defaultButton)
79
{
80
$this->buttons[] =
new
FormButton
(
FORM_SUBMIT_BTN_NAME
,
'Enviar'
,
'SUBMIT'
);
81
}
82
}
83
84
$title
= HtmlPainter::GenerateToString($this->GenerateTitle());
85
$body = HtmlPainter::GenerateToString($this->
GenerateBody
());
86
$footer
= HtmlPainter::GenerateToString($this->
GenerateFooter
());
87
88
$style
=
"style=\"\{height:{$form->height}px; position:absolute}\""
;
89
$b =
new
Div
(
''
, $body,
'formBox'
,
$style
);
90
91
if
(($form->_top) && ($form->_left))
92
$style
=
"style=\"\{width:{$form->width}; top:{$form->_top}px; left:{$form->_left}px; position:absolute}\""
;
93
else
94
$style
=
"style=\"\{width:{$form->width}; position:relative}\""
;
95
96
$f =
new
Div
(
''
, array(
$title
, $b,
$footer
),
'formContainer'
,
$style
);
97
HtmlPainter::GenerateElements($f);
98
}
99
}
100
?>
Div
Definição
compatibility.class:68
FormButton
Definição
compatibility.class:72
MCSSPForm
Definição
mcsspform.class:3
MCSSPForm\$height
$height
Definição
mcsspform.class:4
MCSSPForm\SetFieldPos
SetFieldPos($name, $x, $y, $w=0)
Definição
mcsspform.class:18
MCSSPForm\Generate
Generate()
Definição
mcsspform.class:74
MCSSPForm\GenerateLayoutFields
GenerateLayoutFields(&$hidden)
Definição
mcsspform.class:39
MCSSPForm\SetHeight
SetHeight($value=null)
Definição
mcsspform.class:28
MCSSPForm\SetOrigin
SetOrigin($top, $left)
Definição
mcsspform.class:33
MCSSPForm\$_left
$_left
Definição
mcsspform.class:6
MCSSPForm\__construct
__construct($title='', $action='')
Definição
mcsspform.class:8
MCSSPForm\$_top
$_top
Definição
mcsspform.class:5
MComponent\$page
$page
Definição
mcomponent.class:12
MComponent\$name
$name
Definição
mcomponent.class:17
MControl\$style
$style
Definição
mcontrol.class:90
MForm
Definição
mform.class:9
MForm\$action
$action
Definição
mform.class:18
MForm\$footer
$footer
Definição
mform.class:58
MForm\GenerateFooter
GenerateFooter()
Definição
mform.class:1954
MForm\$title
$title
Definição
mform.class:13
MForm\GenerateBody
GenerateBody()
Definição
mform.class:1897
SimpleTable
Definição
compatibility.class:178
$MIOLO
$MIOLO
Definição
mdatetimefield.class:25
FORM_SUBMIT_BTN_NAME
const FORM_SUBMIT_BTN_NAME
Definição
mform.class:2
classes
ui
controls
mcsspform.class
Gerado por
1.10.0