User tests: Successful: Unsuccessful:
Fixes #7332
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.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
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;
}
Category | ⇒ | Front End Layout |
That's an unrelated issue as I said
Would be good to solve this at the same time though.
Specially for the TIP that should show only when editing the profile.
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?
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;
}
}
OK, will do. Let's RTC this one and merge.
Tested successful together with @infograf768 's patch ;)
Please RTC that one.
Labels |
Added:
?
|
Status | Pending | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-07-06 09:49:06 |
Closed_By | ⇒ | Bakual |
Labels |
Removed:
?
|
We still have an issue not related to the closing div and present with any layout( Tabs, Sliders and Plain).
Not only the alignment is totally broken for all fields ("old" should be aligned with "About me" ), 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").