Skip to content

Commit ffff1b4

Browse files
committed
fix(form): bad path to css
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 4819b26 commit ffff1b4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

inc/form.class.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,12 @@ public function displayUserForm() {
11771177
}
11781178

11791179
// Print css media
1180-
echo Html::css(FORMCREATOR_ROOTDOC . "/css/print_form.css", ['media' => 'print']);
1180+
if (method_exists(Plugin::class, 'getWebDir')) {
1181+
$css = '/' . Plugin::getWebDir('formcreator', false) . '/css/print_form.css';
1182+
} else {
1183+
$css = '/plugins/formcreator/css/print_form.css';
1184+
}
1185+
echo Html::css($css, ['media' => 'print']);
11811186

11821187
// Display form
11831188
$formName = 'plugin_formcreator_form';

0 commit comments

Comments
 (0)