Browse Source

Change the type of $p->classForm to array

Visman 3 years ago
parent
commit
9adb7ffe45

+ 2 - 2
app/Models/Pages/Admin/Categories.php

@@ -59,7 +59,7 @@ class Categories extends Admin
         $this->nameTpl   = 'admin/form';
         $this->aIndex    = 'categories';
         $this->form      = $this->formEdit();
-        $this->classForm = 'editcategories';
+        $this->classForm = ['editcategories'];
         $this->titleForm = 'Categories';
 
         return $this;
@@ -184,7 +184,7 @@ class Categories extends Admin
         ];
         $this->aCrumbs[] = __(['"%s"', $category['cat_name']]);
         $this->form      = $this->formDelete($args, $category);
-        $this->classForm = 'deletecategory';
+        $this->classForm = ['deletecategory'];
         $this->titleForm = 'Delete category head';
 
         return $this;

+ 1 - 1
app/Models/Pages/Admin/Censoring.php

@@ -51,7 +51,7 @@ class Censoring extends Admin
         $this->nameTpl   = 'admin/form';
         $this->aIndex    = 'censoring';
         $this->form      = $this->formEdit();
-        $this->classForm = 'editcensorship';
+        $this->classForm = ['editcensorship'];
         $this->titleForm = 'Censoring';
 
         return $this;

+ 3 - 3
app/Models/Pages/Admin/Forums.php

@@ -273,7 +273,7 @@ class Forums extends Admin
         ];
         $this->aCrumbs[] = __(['"%s"', $forum->forum_name]);
         $this->form      = $this->formDelete($args, $forum);
-        $this->classForm = 'deleteforum';
+        $this->classForm = ['deleteforum'];
         $this->titleForm = 'Delete forum head';
 
         return $this;
@@ -342,7 +342,7 @@ class Forums extends Admin
                 __('Add forum head'),
             ];
             $this->titleForm = 'Add forum head';
-            $this->classForm = 'createforum';
+            $this->classForm = ['createforum'];
         } else {
             $forum           = $this->c->forums->loadTree($args['id']); //?????
             $marker          = 'AdminForumsEdit';
@@ -352,7 +352,7 @@ class Forums extends Admin
             ];
             $this->aCrumbs[] = __(['"%s"', $forum->forum_name]);
             $this->titleForm = 'Edit forum head';
-            $this->classForm = 'editforum';
+            $this->classForm = ['editforum'];
         }
 
         if (! $forum instanceof Forum) {

+ 3 - 3
app/Models/Pages/Admin/Groups.php

@@ -208,7 +208,7 @@ class Groups extends Admin
             ];
             $this->aCrumbs[] = __(['"%s"', $group->g_title]);
             $this->titleForm = 'Edit group';
-            $this->classForm = 'editgroup';
+            $this->classForm = ['editgroup'];
         } else {
             $marker          = 'AdminGroupsNew';
             $vars            = ['base' => $group->g_id];
@@ -216,7 +216,7 @@ class Groups extends Admin
             $group->g_id     = null;
             $this->aCrumbs[] = __('Create new group');
             $this->titleForm = 'Create new group';
-            $this->classForm = 'creategroup';
+            $this->classForm = ['creategroup'];
         }
 
         if (
@@ -767,7 +767,7 @@ class Groups extends Admin
         $this->aCrumbs[] = __(['"%s"', $group->g_title]);
         $this->form      = $this->formDelete($args, $group, $count, $groups);
         $this->titleForm = 'Group delete';
-        $this->classForm = 'deletegroup';
+        $this->classForm = ['deletegroup'];
 
         return $this;
     }

+ 1 - 1
app/Models/Pages/Admin/Logs.php

@@ -132,7 +132,7 @@ class Logs extends Admin
 
         $this->nameTpl    = 'admin/form';
         $this->titleForm  = 'Delete log head';
-        $this->classForm  = 'logdel';
+        $this->classForm  = ['logdel'];
         $this->form       = $this->formDelete($path, $args);
         $this->aCrumbs[]  = [
             $this->c->Router->link('AdminLogsAction', $args),

+ 1 - 1
app/Models/Pages/Admin/Options.php

@@ -130,7 +130,7 @@ class Options extends Admin
         $this->nameTpl   = 'admin/form';
         $this->form      = $this->formEdit($config);
         $this->titleForm = 'Options head';
-        $this->classForm = 'editoptions';
+        $this->classForm = ['editoptions'];
 
         return $this;
     }

+ 2 - 2
app/Models/Pages/Admin/Parser/BBCode.php

@@ -102,7 +102,7 @@ class BBCode extends Parser
         ];
         $this->form      = $this->formView();
         $this->titleForm = 'BBCode head';
-        $this->classForm = 'bbcode';
+        $this->classForm = ['bbcode'];
 
         return $this;
     }
@@ -353,7 +353,7 @@ class BBCode extends Parser
         ];
         $this->form      = $this->formEdit($id, $structure);
         $this->titleForm = $title;
-        $this->classForm = 'editbbcode';
+        $this->classForm = ['editbbcode'];
         $this->nameTpl   = 'admin/form';
 
         return $this;

+ 1 - 1
app/Models/Pages/Admin/Parser/Edit.php

@@ -61,7 +61,7 @@ class Edit extends Parser
         $this->nameTpl   = 'admin/form';
         $this->form      = $this->formEdit($config);
         $this->titleForm = 'Parser settings head';
-        $this->classForm = 'parser-settings';
+        $this->classForm = ['parser-settings'];
 
         return $this;
     }

+ 2 - 2
app/Models/Pages/Admin/Users/Action.php

@@ -142,7 +142,7 @@ class Action extends Users
         }
 
         $this->nameTpl    = 'admin/form';
-        $this->classForm  = 'delete-users';
+        $this->classForm  = ['delete-users'];
         $this->titleForm  = 'Deleting users';
         $this->aCrumbs[]  = [
             $this->c->Router->link('AdminUsersAction', $args),
@@ -297,7 +297,7 @@ class Action extends Users
         }
 
         $this->nameTpl    = 'admin/form';
-        $this->classForm  = 'change-group';
+        $this->classForm  = ['change-group'];
         $this->titleForm  = 'Change user group';
         $this->aCrumbs[]  = [
             $this->c->Router->link('AdminUsersAction', $args),

+ 1 - 1
app/templates/admin/form.forkbb.php

@@ -1,5 +1,5 @@
 @extends ('layouts/admin')
-      <section class="f-admin @if ($p->classForm) f-{{ \implode('-form f-', (array) $p->classForm) }}-form @endif">
+      <section class="f-admin @if ($p->classForm) f-{{ \implode('-form f-', $p->classForm) }}-form @endif">
         <h2>{!! __($p->titleForm) !!}</h2>
         <div class="f-fdiv">
 @if ($form = $p->form)