mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 20:27:40 +02:00
Sandbox Plugin: updates
This commit is contained in:
@@ -62,10 +62,12 @@
|
|||||||
*/
|
*/
|
||||||
public static function formComponentSave() {
|
public static function formComponentSave() {
|
||||||
if (Request::post('sandbox_component_save')) {
|
if (Request::post('sandbox_component_save')) {
|
||||||
|
if (Security::check(Request::post('csrf'))) {
|
||||||
Option::update('sandbox_template', Request::post('sandbox_form_template'));
|
Option::update('sandbox_template', Request::post('sandbox_form_template'));
|
||||||
Request::redirect('index.php?id=themes');
|
Request::redirect('index.php?id=themes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,10 +76,13 @@
|
|||||||
public static function formComponent() {
|
public static function formComponent() {
|
||||||
|
|
||||||
$_templates = Themes::getTemplates();
|
$_templates = Themes::getTemplates();
|
||||||
foreach($_templates as $template) $templates[basename($template, '.template.php')] = basename($template, '.template.php');
|
foreach($_templates as $template) {
|
||||||
|
$templates[] = basename($template, '.template.php');
|
||||||
|
}
|
||||||
|
|
||||||
echo (
|
echo (
|
||||||
Form::open().
|
Form::open().
|
||||||
|
Form::hidden('csrf', Security::token()).
|
||||||
Form::label('sandbox_form_template', __('Sandbox template')).
|
Form::label('sandbox_form_template', __('Sandbox template')).
|
||||||
Form::select('sandbox_form_template', $templates, Option::get('sandbox_template')).
|
Form::select('sandbox_form_template', $templates, Option::get('sandbox_template')).
|
||||||
Html::br().
|
Html::br().
|
||||||
|
Reference in New Issue
Block a user