forked from FriendsOfREDAXO/mform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.php
executable file
·35 lines (31 loc) · 1.38 KB
/
boot.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @author mail[at]doerr-softwaredevelopment[dot]com Joachim Doerr
* @package redaxo5
* @license MIT
*/
if (rex::isBackend()) {
// check theme css is exists
MFormThemeHelper::themeBootCheck(rex_addon::get('mform')->getConfig('mform_theme'));
// use theme helper class
if(MFormThemeHelper::getCssAssets(rex_addon::get('mform')->getConfig('mform_theme'))) {
// foreach all css files
foreach (MFormThemeHelper::getCssAssets(rex_addon::get('mform')->getConfig('mform_theme')) as $css) {
// add assets css file
rex_view::addCssFile($this->getAssetsUrl($css));
}
}
// add all parsley mform files
rex_view::addCssFile($this->getAssetsUrl('parsley/parsley.css'));
rex_view::addJsFile($this->getAssetsUrl('parsley/parsley.min.js'));
rex_view::addJsFile($this->getAssetsUrl('parsley/extra/validator/dateiso.js'));
rex_view::addJsFile($this->getAssetsUrl('parsley/extra/validator/words.js'));
rex_view::addJsFile($this->getAssetsUrl('parsley/i18n/de.js')); // TODO backend lang specific
// add toggle files
rex_view::addCssFile($this->getAssetsUrl('toggle/toggle.css'));
rex_view::addJsFile($this->getAssetsUrl('toggle/toggle.js'));
// add mform js
rex_view::addJsFile($this->getAssetsUrl('mform.js?v=' . $this->getVersion()));
// reset mblock page count
$_SESSION['mform_count'] = 0;
}