File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -582,16 +582,17 @@ function gin_form_element($variables) {
582
582
}
583
583
// Add description toggle classes if settings call for them.
584
584
$ show_description_toggle = theme_get_setting ('show_description_toggle ' , 'gin ' );
585
- $ description ['class ' ][] = 'description ' ;
586
585
$ help_icon_open = '' ;
587
586
$ help_icon_close = '' ;
588
- if (!empty ($ element ['#description ' ]) && $ show_description_toggle ) {
589
- backdrop_add_library ('gin ' , 'gin_description_toggle ' );
590
- $ attributes ['class ' ][] = 'help-icon__description-container ' ;
587
+ if (!empty ($ element ['#description ' ])) {
591
588
$ description_attributes ['class ' ][] = 'description ' ;
592
- $ description_attributes ['class ' ][] = 'visually-hidden ' ;
593
- $ help_icon_open = '<div class="help-icon"> ' ;
594
- $ help_icon_close = '<button class="help-icon__description-toggle"></button></div> ' ;
589
+ if ($ show_description_toggle ) {
590
+ backdrop_add_library ('gin ' , 'gin_description_toggle ' );
591
+ $ attributes ['class ' ][] = 'help-icon__description-container ' ;
592
+ $ description_attributes ['class ' ][] = 'visually-hidden ' ;
593
+ $ help_icon_open = '<div class="help-icon"> ' ;
594
+ $ help_icon_close = '<button class="help-icon__description-toggle"></button></div> ' ;
595
+ }
595
596
}
596
597
$ output = '<div ' . backdrop_attributes ($ attributes ) . '> ' . "\n" ;
597
598
You can’t perform that action at this time.
0 commit comments