? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
4 Jul 2015

Fixes #7332

Issue

See the original issue. There are screenshots.
Basically the layout used by the date of birth field has a doubled closing div. Which then breaks the tabs.

avatar Bakual Bakual - open - 4 Jul 2015
avatar Bakual Bakual - change - 4 Jul 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jul 2015
Labels Added: ?
avatar infograf768
infograf768 - comment - 4 Jul 2015

We still have an issue not related to the closing div and present with any layout( Tabs, Sliders and Plain).
screen shot 2015-07-04 at 10 53 30

Not only the alignment is totally broken for all fields ("old" should be aligned with "About me" :smile: ), an older issue) AND the dob, but it also displays the TIP which should only be present when the profile is edited ("The date of birth entered should use the format Year-Month-Day, ie 0000-00-00").

avatar infograf768
infograf768 - comment - 4 Jul 2015

Concerning the upper fields alignment (not the dob), this comes from the css :

label {
    display: block;
    margin-bottom: 5px;
}

Taking off displays: block; re-aligns correctly.
I.e. adding

#users-profile-custom label {
    display: inline;
}
avatar brianteeman brianteeman - change - 4 Jul 2015
Category Front End Layout
avatar Bakual
Bakual - comment - 4 Jul 2015

That's an unrelated issue as I said :smile:

avatar infograf768
infograf768 - comment - 4 Jul 2015

Would be good to solve this at the same time though.
Specially for the TIP that should show only when editing the profile.

avatar infograf768
infograf768 - comment - 4 Jul 2015

I can solve the TIP by adding (changing ) your PR to:

diff --git a/layouts/plugins/user/profile/fields/dob.php b/layouts/plugins/user/profile/fields/dob.php
index d850e50..0a988f8 100644
--- a/layouts/plugins/user/profile/fields/dob.php
+++ b/layouts/plugins/user/profile/fields/dob.php
@@ -16,5 +16,5 @@

 // Closing the opening .control-group and .control-label div so we can add our info text on own line ?>
-</div><div class="controls"><?php echo $text; ?></div></div>
+</div><div class="controls"><?php echo $text; ?></div>
 <?php // Creating new .control-group and .control-label for the actual field ?>
 <div class="control-group"><div class="control-label">
diff --git a/plugins/user/profile/fields/dob.php b/plugins/user/profile/fields/dob.php
index 73d92bb..215842b 100644
--- a/plugins/user/profile/fields/dob.php
+++ b/plugins/user/profile/fields/dob.php
@@ -46,6 +46,16 @@
        if ($text)
        {
+           $app    = JFactory::getApplication();
            $layout = new JLayoutFile('plugins.user.profile.fields.dob');
-           $info   = $layout->render(array('text' => $text));
+           $view   = $app->input->getString('view', '');
+
+           if ($app->isSite() && $view != 'profile')
+           {
+               $info = '';
+           }
+           else
+           {
+               $info = $layout->render(array('text' => $text));
+           }
            $label  = $info . $label;
        }

This here would only show the TIP when editing a profile.
What do you think?

avatar Bakual
Bakual - comment - 4 Jul 2015

Please do an own PR.
This one is reallly a simple one and I'd like to keep it that way.

You could do it even simpler

        if ($text)
        {
            $app  = JFactory::getApplication();
            $view = $app->input->getString('view', '');

            if (!$app->isSite() || $view == 'profile')
                $layout = new JLayoutFile('plugins.user.profile.fields.dob');
                $info   = $layout->render(array('text' => $text));
                $label  = $info . $label;
            }
            }
avatar infograf768
infograf768 - comment - 5 Jul 2015

OK, will do. Let's RTC this one and merge.

avatar infograf768
infograf768 - comment - 5 Jul 2015

Thanks for testing that one. #7345

avatar zero-24
zero-24 - comment - 5 Jul 2015

Tested successful together with @infograf768 's patch ;)

avatar zero-24 zero-24 - test_item - 5 Jul 2015 - Tested successfully
avatar infograf768
infograf768 - comment - 6 Jul 2015

Please RTC that one.

avatar Bakual Bakual - change - 6 Jul 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 6 Jul 2015
Status Pending Ready to Commit
avatar Kubik-Rubik
Kubik-Rubik - comment - 6 Jul 2015

Thank you @Bakual! Merged.

avatar Bakual Bakual - change - 6 Jul 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-07-06 09:49:06
Closed_By Bakual
avatar Bakual Bakual - close - 6 Jul 2015
avatar zero-24 zero-24 - close - 6 Jul 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment