Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_theme_admin
Commits
26f27bae
Commit
26f27bae
authored
Oct 14, 2022
by
Eric Bremner
Browse files
ISTWCMS-5880: adding js to ensure required is in correct place for banners
parent
fbfff313
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/uw_admin.js
View file @
26f27bae
...
...
@@ -12,3 +12,19 @@
};
}
})(
jQuery
,
Drupal
);
/**
* Adding required to banner images image field.
*/
(
function
(
$
,
Drupal
)
{
Drupal
.
behaviors
.
uwBannerImageRequire
=
{
attach
:
function
(
context
,
settings
)
{
$
(
document
).
ready
(
function
()
{
if
(
$
(
"
[id^=field_uw_ban_image-media-library-wrapper]
"
).
hasClass
(
'
form-required
'
))
{
$
(
"
[id^=field_uw_ban_image-media-library-wrapper]
"
).
removeClass
(
'
form-required
'
);
$
(
"
[id^=field_uw_ban_image-media-library-wrapper] legend span
"
).
addClass
(
'
form-required
'
);
}
});
}
};
})(
jQuery
,
Drupal
);
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment