Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Upstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
ASC IRIS Web Services
Drupal Upstream
Commits
a160b66c
Unverified
Commit
a160b66c
authored
6 years ago
by
weaver299
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request
#62
from ASCWebServices/canini
asc_bootstrap - adding hook_form_alter for news filter
parents
dade2eca
3f18e7af
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/themes/asc_bootstrap/asc_bootstrap.theme
+5
-1
5 additions, 1 deletion
web/themes/asc_bootstrap/asc_bootstrap.theme
with
5 additions
and
1 deletion
web/themes/asc_bootstrap/asc_bootstrap.theme
+
5
−
1
View file @
a160b66c
...
...
@@ -56,7 +56,10 @@ function asc_bootstrap_preprocess_block(&$vars) {
* alters news and events filters so that AJAX doesn't remove headings, etc. upon request
*/
function
asc_bootstrap_form_alter
(
&
$form
,
\Drupal\Core\Form\FormStateInterface
$form_state
,
$form_id
)
{
if
((
$form
[
'#id'
]
==
'views-exposed-form-events-page-1'
)
||
(
$form
[
'#id'
]
==
'#views-exposed-form-news-page-1'
))
{
/*
* events and news filters
*/
if
((
$form
[
'#id'
]
==
'views-exposed-form-events-page-1'
)
||
(
$form
[
'#id'
]
==
'views-exposed-form-news-page-1'
))
{
/*
* add new HTML content to filters (headers and spacer)
* and setting weights for where they should appear in the form hierarchy
...
...
@@ -77,6 +80,7 @@ function asc_bootstrap_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $
* setting up weights for form elements
*/
$form
[
'field_evt_date_range_value'
][
'#weight'
]
=
1
;
$form
[
'end_date'
][
'#weight'
]
=
1
;
$form
[
'field_evt_taxonomy_target_id_1'
][
'#weight'
]
=
2
;
$form
[
'field_evt_taxonomy_target_id'
][
'#weight'
]
=
3
;
$form
[
'keys'
][
'#weight'
]
=
5
;
...
...
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