From 14257a7a1f6fd926fb94a31c32affc098365f09a Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 25 May 2019 15:11:24 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Fieldsets Controller/Views implementation --- .../views/templates/extends/fieldsets/add.php | 47 --------------- .../templates/extends/fieldsets/edit.html | 23 +++++++ .../templates/extends/fieldsets/list.php | 60 ------------------- .../templates/extends/fieldsets/rename.php | 44 -------------- 4 files changed, 23 insertions(+), 151 deletions(-) delete mode 100644 site/plugins/admin/views/templates/extends/fieldsets/add.php create mode 100644 site/plugins/admin/views/templates/extends/fieldsets/edit.html delete mode 100644 site/plugins/admin/views/templates/extends/fieldsets/list.php delete mode 100644 site/plugins/admin/views/templates/extends/fieldsets/rename.php diff --git a/site/plugins/admin/views/templates/extends/fieldsets/add.php b/site/plugins/admin/views/templates/extends/fieldsets/add.php deleted file mode 100644 index 8496ae54..00000000 --- a/site/plugins/admin/views/templates/extends/fieldsets/add.php +++ /dev/null @@ -1,47 +0,0 @@ -display(); -Themes::view('admin/views/partials/navbar') - ->assign('links', [ - 'fieldsets' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets', - 'title' => __('admin_fieldsets'), - 'attributes' => ['class' => 'navbar-item'] - ], - 'fieldsets_add' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets/add', - 'title' => __('admin_create_new_fieldset'), - 'attributes' => ['class' => 'navbar-item active'] - ] - ]) - ->display(); -Themes::view('admin/views/partials/content-start')->display(); -?> - -
-
- - -
- 'fieldsetTitle']) ?> - 'form-control', 'id' => 'fieldsetTitle', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?> -
-
- 'fieldsetName']) ?> - 'form-control', 'id' => 'fieldsetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_name_empty_input')]) ?> -
-
-
- 'btn btn-black']) ?> - - -display() ?> -display() ?> diff --git a/site/plugins/admin/views/templates/extends/fieldsets/edit.html b/site/plugins/admin/views/templates/extends/fieldsets/edit.html new file mode 100644 index 00000000..254a7387 --- /dev/null +++ b/site/plugins/admin/views/templates/extends/fieldsets/edit.html @@ -0,0 +1,23 @@ +{% extends "plugins/admin/views/partials/base.html" %} + +{% block content %} +
+ {{ csrf() }} + +
+
+
+ + +
+
+ + +
+
+ +
+
+
+
+{% endblock %} diff --git a/site/plugins/admin/views/templates/extends/fieldsets/list.php b/site/plugins/admin/views/templates/extends/fieldsets/list.php deleted file mode 100644 index 2eaa7a0c..00000000 --- a/site/plugins/admin/views/templates/extends/fieldsets/list.php +++ /dev/null @@ -1,60 +0,0 @@ - - - -display() ?> -assign('links', [ - 'fieldsets' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets', - 'title' => __('admin_fieldsets'), - 'attributes' => ['class' => 'navbar-item active'] - ] - ]) - ->assign('buttons', [ - 'entries' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets/add', - 'title' => __('admin_create_new_fieldset'), - 'attributes' => ['class' => 'float-right btn'] - ] - ]) - ->display() -?> -display() ?> - - 0): ?> - - - - - - - - - $fieldset): ?> - - - - - - -
- - -
- - - -
- -
- - - - -display() ?> -display() ?> diff --git a/site/plugins/admin/views/templates/extends/fieldsets/rename.php b/site/plugins/admin/views/templates/extends/fieldsets/rename.php deleted file mode 100644 index 4e08b771..00000000 --- a/site/plugins/admin/views/templates/extends/fieldsets/rename.php +++ /dev/null @@ -1,44 +0,0 @@ -display(); -Themes::view('admin/views/partials/navbar') - ->assign('links', [ - 'fieldsets' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets', - 'title' => __('admin_fieldsets'), - 'attributes' => ['class' => 'navbar-item'] - ], - 'fieldsets_add' => [ - 'link' => Http::getBaseUrl() . '/admin/fieldsets/rename?fieldset=' . $name_current, - 'title' => __('admin_rename'), - 'attributes' => ['class' => 'navbar-item active'] - ] - ]) - ->display(); -Themes::view('admin/views/partials/content-start')->display(); -?> - -
-
- - - -
- 'fieldsetName']) ?> - 'form-control', 'id' => 'fieldsetName', 'required', 'data-validation' => 'length required', 'data-validation-allowing' => '-_', 'data-validation-length' => 'min1', 'data-validation-error-msg' => __('admin_error_title_empty_input')]) ?> -
- 'btn btn-black btn-fill btn-wd']) ?> - -
-
- -display() ?> -display() ?>