Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rules-3458225
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
rules-3458225
Commits
2aab4f66
Commit
2aab4f66
authored
14 years ago
by
Klaus Purer
Browse files
Options
Downloads
Patches
Plain Diff
bug
#758000
by klausi: fixed display of form element IDs to also include those from after build
parent
ab3ac61e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rules_forms/rules_forms.module
+5
-5
5 additions, 5 deletions
rules_forms/rules_forms.module
with
5 additions
and
5 deletions
rules_forms/rules_forms.module
+
5
−
5
View file @
2aab4f66
...
...
@@ -55,9 +55,6 @@ function rules_forms_form_alter(&$form, &$form_state, $form_id) {
if
(
isset
(
$form_events
[
$form_id
]))
{
rules_forms_invoke_event
(
'form_built'
,
$form
,
$form_state
,
$form_id
);
$form
[
'#after_build'
][]
=
'rules_forms_after_build'
;
if
(
!
empty
(
$_SESSION
[
'rules_forms_element_ids'
]))
{
rules_forms_add_element_id
(
$form
);
}
}
// Display form ID message if enabled for this session.
if
(
!
empty
(
$_SESSION
[
'rules_forms_message'
]))
{
...
...
@@ -121,10 +118,13 @@ function rules_forms_add_element_id(&$form, $parent = '') {
}
/**
* Add
submit and validation callbacks to form, buttons, etc. to invoke
* corresponding events.
* Add
element IDs on the form if the setting is enabled. Add submit and
*
validation callbacks to form, buttons, etc. to invoke
corresponding events.
*/
function
rules_forms_after_build
(
$form
,
&
$form_state
)
{
if
(
!
empty
(
$_SESSION
[
'rules_forms_element_ids'
]))
{
rules_forms_add_element_id
(
$form
);
}
drupal_add_css
(
drupal_get_path
(
'module'
,
'rules_forms'
)
.
'/rules_forms.css'
);
if
(
!
$form_state
[
'submitted'
])
{
return
$form
;
...
...
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