Przeglądaj źródła

Update profile pages

Visman 2 lat temu
rodzic
commit
64393ef7e8

+ 4 - 3
app/Models/Pages/Profile/Config.php

@@ -121,14 +121,15 @@ class Config extends Profile
             $this->fIswev = $v->getErrors();
         }
 
-        $this->crumbs     = $this->crumbs(
+        $this->crumbs          = $this->crumbs(
             [
                 $this->c->Router->link('EditUserBoardConfig', $args),
                 'Board configuration',
             ]
         );
-        $this->form       = $this->form($args);
-        $this->actionBtns = $this->btns('config');
+        $this->form            = $this->form($args);
+        $this->actionBtns      = $this->btns('config');
+        $this->profileIdSuffix = '-config';
 
         return $this;
     }

+ 4 - 3
app/Models/Pages/Profile/Edit.php

@@ -154,14 +154,15 @@ class Edit extends Profile
             }
         }
 
-        $this->crumbs     = $this->crumbs(
+        $this->crumbs          = $this->crumbs(
             [
                 $this->c->Router->link('EditUserProfile', $args),
                 'Editing profile',
             ]
         );
-        $this->form       = $this->form($args);
-        $this->actionBtns = $this->btns('edit');
+        $this->form            = $this->form($args);
+        $this->actionBtns      = $this->btns('edit');
+        $this->profileIdSuffix = '-edit';
 
         return $this;
     }

+ 4 - 5
app/Models/Pages/Profile/Email.php

@@ -32,8 +32,6 @@ class Email extends Profile
             return $this->c->Message->message('Bad request', false);
         }
 
-        $this->c->Lang->load('profile');
-
         $this->user->email           = $args['email'];
         $this->user->email_confirmed = 1;
         $this->user->activate_string = '';
@@ -196,7 +194,7 @@ class Email extends Profile
             $this->fIswev           = $v->getErrors();
         }
 
-        $this->crumbs     = $this->crumbs(
+        $this->crumbs          = $this->crumbs(
             [
                 $this->c->Router->link('EditUserEmail', $args),
                 'Change email',
@@ -206,8 +204,9 @@ class Email extends Profile
                 'Editing profile',
             ]
         );
-        $this->form       = $this->form($args);
-        $this->actionBtns = $this->btns('edit');
+        $this->form            = $this->form($args);
+        $this->actionBtns      = $this->btns('edit');
+        $this->profileIdSuffix = '-email';
 
         return $this;
     }

+ 4 - 3
app/Models/Pages/Profile/Mod.php

@@ -68,7 +68,7 @@ class Mod extends Profile
             $this->fIswev = $v->getErrors();
         }
 
-        $this->crumbs     = $this->crumbs(
+        $this->crumbs          = $this->crumbs(
             [
                 $this->c->Router->link('EditUserModeration', $args),
                 'Moderator rights',
@@ -78,8 +78,9 @@ class Mod extends Profile
                 'Editing profile',
             ]
         );
-        $this->form       = $this->form($args);
-        $this->actionBtns = $this->btns('edit');
+        $this->form            = $this->form($args);
+        $this->actionBtns      = $this->btns('edit');
+        $this->profileIdSuffix = '-mod';
 
         return $this;
     }

+ 4 - 3
app/Models/Pages/Profile/Pass.php

@@ -72,7 +72,7 @@ class Pass extends Profile
             $this->fIswev = $v->getErrors();
         }
 
-        $this->crumbs     = $this->crumbs(
+        $this->crumbs          = $this->crumbs(
             [
                 $this->c->Router->link('EditUserPass', $args),
                 'Change pass',
@@ -82,8 +82,9 @@ class Pass extends Profile
                 'Editing profile',
             ]
         );
-        $this->form       = $this->form($args);
-        $this->actionBtns = $this->btns('edit');
+        $this->form            = $this->form($args);
+        $this->actionBtns      = $this->btns('edit');
+        $this->profileIdSuffix = '-pass';
 
         return $this;
     }

+ 1 - 1
app/templates/profile.forkbb.php

@@ -20,7 +20,7 @@
 @endif
     </div>
 @if ($form = $p->form)
-    <section id="fork-profile" class="f-main">
+    <section id="fork-profile{{ $p->profileIdSuffix or '' }}" class="f-main f-main-profile">
       <h2>@if ($p->profileHeader === $p->curUser->username){{ $p->profileHeader }} @else{!! __($p->profileHeader) !!} @endif</h2>
       <div class="f-fdiv">
     @include ('layouts/form')