Skip to content

Commit 0f9c49e

Browse files
authored
Merge pull request #473 from TeamEver/codex/move-documentation-to-bottom-of-tabs-upr4m7
Move documentation cards to bottom of configuration tabs
2 parents a252b0b + c4940f8 commit 0f9c49e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

views/js/admin.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,24 @@ $(document).ready(function() {
2929
theme: "dracula",
3030
lineNumbers: true
3131
});
32+
33+
// Ensure documentation cards are displayed at the bottom of each tab in the
34+
// module configuration form. HelperForm renders documentation inputs as
35+
// ``type => html`` fields wrapped in a ``form-group`` element. We move that
36+
// wrapper to the end of the tab content so that tips are displayed after all
37+
// configuration fields, which matches the expected layout.
38+
$('.tab-content .tab-pane').each(function() {
39+
const $wrapper = $(this).find('.form-wrapper');
40+
41+
if (!$wrapper.length) {
42+
return;
43+
}
44+
45+
$wrapper
46+
.find('.form-group')
47+
.filter(function() {
48+
return $(this).find('.everblock-doc').length > 0;
49+
})
50+
.appendTo($wrapper);
51+
});
3252
});

0 commit comments

Comments
 (0)