koblog/bl-kernel/admin/views/configure-plugin.php

45 lines
1 KiB
PHP
Raw Normal View History

<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
2015-07-14 04:16:28 +02:00
2018-11-09 00:59:06 +01:00
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
2015-07-14 04:16:28 +02:00
<?php
$returnPage = "plugins";
switch ($plugin->type()) {
case 'theme':
$returnPage = "themes";
break;
case 'widget':
$returnPage = "sidebar";
break;
default:
break;
}
?>
2025-01-18 16:28:15 +01:00
<div class="d-flex justify-content-between mb-2">
<?php echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'cog')); ?>
2018-11-09 00:59:06 +01:00
<?php if ($plugin->formButtons()): ?>
2025-01-18 16:28:15 +01:00
<div>
<button type="submit" class="btn btn-primary" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary" href="<?php echo HTML_PATH_ADMIN_ROOT.$returnPage ?>" role="button"><?php $L->p('Cancel') ?></a>
2018-11-09 00:59:06 +01:00
</div>
<?php endif; ?>
</div>
2015-07-14 04:16:28 +02:00
2025-01-18 16:28:15 +01:00
<div class="card">
<div class="card-body">
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
2015-07-14 04:16:28 +02:00
2025-01-18 16:28:15 +01:00
// Print the plugin form
echo $plugin->form();
?>
2015-07-14 04:16:28 +02:00
2025-01-18 16:28:15 +01:00
<?php echo Bootstrap::formClose(); ?>
</div>
</div>