Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
5736cc3e
Commit
5736cc3e
authored
Nov 23, 2005
by
Dries
Browse files
- Patch
#38349
by chx: form API bugfixes.
parent
fa771b97
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/filter.module
View file @
5736cc3e
...
...
@@ -770,7 +770,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
$form
[
'format'
]
=
array
(
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Input format'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#weight'
=>
-
16
);
// Multiple formats available: display radio buttons with tips.
foreach
(
$formats
as
$format
)
{
$form
[
'format'
][
$format
->
format
]
=
array
(
'#type'
=>
'filter_format'
,
'#title'
=>
$format
->
name
,
'#default_value'
=>
$value
,
'#return_value'
=>
$format
->
format
,
'#parents'
=>
array
(
'format'
),
'#description'
=>
theme
(
'filter_tips'
,
_filter_tips
(
$format
->
format
,
false
)),
'#valid'
=>
'filter_form'
);
$form
[
'format'
][
$format
->
format
]
=
array
(
'#type'
=>
'filter_format'
,
'#title'
=>
$format
->
name
,
'#default_value'
=>
$value
,
'#return_value'
=>
$format
->
format
,
'#parents'
=>
array
(
'format'
),
'#description'
=>
theme
(
'filter_tips'
,
_filter_tips
(
$format
->
format
,
false
)),
'#valid
ate
'
=>
'filter_form
_validate
'
);
}
return
$form
;
}
...
...
@@ -797,7 +797,7 @@ function theme_filter_format($element) {
return
$output
;
}
function
filter_form_valid
(
$element
)
{
function
filter_form_valid
ate
(
$element
)
{
static
$validated
;
if
(
$validated
)
{
return
;
...
...
modules/filter/filter.module
View file @
5736cc3e
...
...
@@ -770,7 +770,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT) {
$form
[
'format'
]
=
array
(
'#type'
=>
'fieldset'
,
'#title'
=>
t
(
'Input format'
),
'#collapsible'
=>
TRUE
,
'#collapsed'
=>
TRUE
,
'#weight'
=>
-
16
);
// Multiple formats available: display radio buttons with tips.
foreach
(
$formats
as
$format
)
{
$form
[
'format'
][
$format
->
format
]
=
array
(
'#type'
=>
'filter_format'
,
'#title'
=>
$format
->
name
,
'#default_value'
=>
$value
,
'#return_value'
=>
$format
->
format
,
'#parents'
=>
array
(
'format'
),
'#description'
=>
theme
(
'filter_tips'
,
_filter_tips
(
$format
->
format
,
false
)),
'#valid'
=>
'filter_form'
);
$form
[
'format'
][
$format
->
format
]
=
array
(
'#type'
=>
'filter_format'
,
'#title'
=>
$format
->
name
,
'#default_value'
=>
$value
,
'#return_value'
=>
$format
->
format
,
'#parents'
=>
array
(
'format'
),
'#description'
=>
theme
(
'filter_tips'
,
_filter_tips
(
$format
->
format
,
false
)),
'#valid
ate
'
=>
'filter_form
_validate
'
);
}
return
$form
;
}
...
...
@@ -797,7 +797,7 @@ function theme_filter_format($element) {
return
$output
;
}
function
filter_form_valid
(
$element
)
{
function
filter_form_valid
ate
(
$element
)
{
static
$validated
;
if
(
$validated
)
{
return
;
...
...
modules/system.module
View file @
5736cc3e
...
...
@@ -59,8 +59,8 @@ function system_elements() {
// Inputs
$type
[
'checkbox'
]
=
array
(
'#input'
=>
TRUE
,
'#return_value'
=>
1
);
$type
[
'submit'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
execu
te'
=>
TRUE
);
$type
[
'button'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
execu
te'
=>
FALSE
);
$type
[
'submit'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
form_submit
te
d
'
=>
TRUE
);
$type
[
'button'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
form_submit
te
d
'
=>
FALSE
);
$type
[
'textfield'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
60
,
'#maxlength'
=>
128
,
'#autocomplete_path'
=>
FALSE
);
$type
[
'password'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
30
,
'#maxlength'
=>
64
);
$type
[
'textarea'
]
=
array
(
'#input'
=>
TRUE
,
'#cols'
=>
60
,
'#rows'
=>
5
);
...
...
modules/system/system.module
View file @
5736cc3e
...
...
@@ -59,8 +59,8 @@ function system_elements() {
// Inputs
$type
[
'checkbox'
]
=
array
(
'#input'
=>
TRUE
,
'#return_value'
=>
1
);
$type
[
'submit'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
execu
te'
=>
TRUE
);
$type
[
'button'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
execu
te'
=>
FALSE
);
$type
[
'submit'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
form_submit
te
d
'
=>
TRUE
);
$type
[
'button'
]
=
array
(
'#input'
=>
TRUE
,
'#name'
=>
'op'
,
'#button_type'
=>
'submit'
,
'#
form_submit
te
d
'
=>
FALSE
);
$type
[
'textfield'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
60
,
'#maxlength'
=>
128
,
'#autocomplete_path'
=>
FALSE
);
$type
[
'password'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
30
,
'#maxlength'
=>
64
);
$type
[
'textarea'
]
=
array
(
'#input'
=>
TRUE
,
'#cols'
=>
60
,
'#rows'
=>
5
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment