Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
133617cb
Commit
133617cb
authored
18 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
#57834
by chx, Replace theme_weight with more appropriate process_weight
parent
a6588672
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includes/form.inc
+4
-10
4 additions, 10 deletions
includes/form.inc
modules/system.module
+1
-1
1 addition, 1 deletion
modules/system.module
modules/system/system.module
+1
-1
1 addition, 1 deletion
modules/system/system.module
with
6 additions
and
12 deletions
includes/form.inc
+
4
−
10
View file @
133617cb
...
...
@@ -1071,22 +1071,16 @@ function theme_password($element) {
}
/**
* Format a weight selection menu.
*
* @param $element
* An associative array containing the properties of the element.
* Properties used: title, delta, description
* @return
* A themed HTML string representing the form.
* Expand weight elements into selects.
*/
function
theme
_weight
(
$element
)
{
function
process
_weight
(
$element
)
{
for
(
$n
=
(
-
1
*
$element
[
'#delta'
]);
$n
<=
$element
[
'#delta'
];
$n
++
)
{
$weights
[
$n
]
=
$n
;
}
$element
[
'#options'
]
=
$weights
;
$element
[
'#type'
]
=
'select'
;
return
form_render
(
$element
)
;
$element
[
'#is_weight'
]
=
TRUE
;
return
$element
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
modules/system.module
+
1
−
1
View file @
133617cb
...
...
@@ -72,7 +72,7 @@ function system_elements() {
$type
[
'radio'
]
=
array
(
'#input'
=>
TRUE
);
$type
[
'checkboxes'
]
=
array
(
'#input'
=>
TRUE
,
'#process'
=>
array
(
'expand_checkboxes'
=>
array
()),
'#tree'
=>
TRUE
);
$type
[
'select'
]
=
array
(
'#input'
=>
TRUE
);
$type
[
'weight'
]
=
array
(
'#input'
=>
TRUE
,
'#delta'
=>
10
,
'#default_value'
=>
0
);
$type
[
'weight'
]
=
array
(
'#input'
=>
TRUE
,
'#delta'
=>
10
,
'#default_value'
=>
0
,
'#process'
=>
array
(
'process_weight'
=>
array
())
);
$type
[
'date'
]
=
array
(
'#input'
=>
TRUE
,
'#process'
=>
array
(
'expand_date'
=>
array
()));
$type
[
'file'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
60
);
...
...
This diff is collapsed.
Click to expand it.
modules/system/system.module
+
1
−
1
View file @
133617cb
...
...
@@ -72,7 +72,7 @@ function system_elements() {
$type
[
'radio'
]
=
array
(
'#input'
=>
TRUE
);
$type
[
'checkboxes'
]
=
array
(
'#input'
=>
TRUE
,
'#process'
=>
array
(
'expand_checkboxes'
=>
array
()),
'#tree'
=>
TRUE
);
$type
[
'select'
]
=
array
(
'#input'
=>
TRUE
);
$type
[
'weight'
]
=
array
(
'#input'
=>
TRUE
,
'#delta'
=>
10
,
'#default_value'
=>
0
);
$type
[
'weight'
]
=
array
(
'#input'
=>
TRUE
,
'#delta'
=>
10
,
'#default_value'
=>
0
,
'#process'
=>
array
(
'process_weight'
=>
array
())
);
$type
[
'date'
]
=
array
(
'#input'
=>
TRUE
,
'#process'
=>
array
(
'expand_date'
=>
array
()));
$type
[
'file'
]
=
array
(
'#input'
=>
TRUE
,
'#size'
=>
60
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment