Skip to content

Commit

Permalink
Merge pull request #75 from joachimdoerr/master
Browse files Browse the repository at this point in the history
Remove "block" and add css permanent
  • Loading branch information
joachimdoerr authored Jul 12, 2016
2 parents 5c1435d + e9a38b9 commit 21bb662
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
17 changes: 7 additions & 10 deletions boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@

if (rex::isBackend())
{
$files = glob(rex_path::addon('mform')."/lib/functions/*.php");
array_walk($files,create_function('$file', 'return (is_file ( $file )) ? require_once($file) : false;'));
$files = glob(rex_path::addon('mform') . "/lib/functions/*.php");
array_walk($files, create_function('$file', 'return (is_file ( $file )) ? require_once($file) : false;'));

if (rex_request('function', 'string') == 'edit' or rex_request('function', 'string') == 'add')
{
rex_view::addCssFile('?mform_theme=' . rex_addon::get('mform')->getConfig('mform_template'));
rex_view::addJsFile($this->getAssetsUrl('parsley/i18n/messages.de.js'));
rex_view::addJsFile($this->getAssetsUrl('parsley/parsley.js'));

rex_extension::register('OUTPUT_FILTER', 'a967_add_parsley');
}

if (rex_request('mform_theme', 'string', '') != '')
{
mform_generate_css(rex_request('mform_theme', 'string', rex_addon::get('mform')->getConfig('mform_template')));
exit;
}
if (rex_request('mform_theme', 'string', '') != '')
{
mform_generate_css(rex_request('mform_theme', 'string', rex_addon::get('mform')->getConfig('mform_template')));
exit;
}
}
5 changes: 2 additions & 3 deletions pages/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
* @license MIT
*/

// set headline
$strForm = '<h2 class="rex-hl2">' . $this->i18n('config') . '</h2>';
$strForm = '';

// rex request
$config = rex_post('config', array(
Expand Down Expand Up @@ -86,4 +85,4 @@
</form>
';

echo rex_view::content('block', $strForm);
echo rex_view::content($strForm, $this->i18n('config'));
6 changes: 1 addition & 5 deletions pages/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
* @license MIT
*/

$strModulInputHeadline = '
<h2 class="rex-hl2">' . $this->i18n('demo_modul') . '</h2>
';

$strModulInputDemo = '<?php
// instanziieren
$mform = new mform();
Expand Down Expand Up @@ -115,4 +111,4 @@
echo $mform->show();
?>';

echo rex_view::content('block', $strModulInputHeadline . rex_string::highlight($strModulInputDemo));
echo rex_view::content(rex_string::highlight($strModulInputDemo), $this->i18n('demo_modul'));
3 changes: 1 addition & 2 deletions pages/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<p>Dieses Addon erleichtert das Erstellen von Modul Input Formularen.</p>
';
} else {
$strInfoHeadline = '<h2 class="rex-hl2">'. $this->i18n('help_headline') .'</h2>';
$strPageContent = '
<h3>'. $this->i18n('help_subheadline_1') .'</h3>
<p>'. $this->i18n('help_infotext_1') .'</p>
Expand All @@ -26,5 +25,5 @@
}

if (rex_be_controller::getCurrentPagePart(2) == 'info') {
echo rex_view::content('block', $strInfoHeadline.$strPageContent);
echo rex_view::content($strPageContent, $this->i18n('help_headline'));
}

0 comments on commit 21bb662

Please sign in to comment.