-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix form-horizontal for non-latin or long language strings #15689
Conversation
Joomla pain :) |
As a Russian language user I am definitely for it. Looking much better now. |
Agree |
if 2 People test this PR successfully it could go in staging if Maintainers agree. |
I have tested this item ✅ successfully on cc318d8 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
Please do not edit the css file directly. That is not correct. The correct way is to make the changes in the less file and then run generatecss.php from the build directory to create the css |
Unhappily, we have multiple Therefore the less files to modify has to be chosen carefully |
@ciar4n |
The Bootstrap default is for the control-label to wrap at 160px so if the intent is to allow the label to wrap then simply removing https://github.com/joomla/joomla-cms/blob/staging/administrator/templates/isis/less/blocks/_forms.less#L10 should give the same result. If you wish to increase the label width you will also need to increase the left margin on Test RTL however it should be ok. Media queries should also be fine as is.. smaller screen sizes have the label and control in columns. As mentioned by @brianteeman you will need to edit the LESS files and then compile rather than editing the CSS directly (https://docs.joomla.org/Joomla_LESS). |
Limit a control-label width in form-horizontal
I have tested this item ✅ successfully on 6250e2f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
@Quy that might happen in other places too especially with extensions |
it because a Spacer field displaying the text as a label, this is some very old legacy. |
upd: In theory, for a Spacer field we can force class in "JFormFieldSpacer::renderField", something like |
Sounds good to me in theory. but I am no css guru. :) |
@Fedik it's nice idea! |
@joomla-ua you will update the PR? |
@Fedik |
@infograf768 public function renderField($options = array())
{
$options['class'] = empty($options['class']) ? 'field-spacer' : $options['class'] . ' field-spacer';
return parent::renderField($options);
} other solution can be, to add a layout ( |
I like the layout approach more |
@DGT41 yeah, but how it should looks like? for not break current markup of the forms 😉 |
I can't get it to work here
and the code above does not. |
@infograf768 I have sent pull with updates to @joomla-ua @DGT41 I think here we can use the class, because the layout it is a "new feature" and cannot be accepted until j3.8, I guess. And people will have ugly backend another half of year 😉 |
Eager to test. We have multiple types of spacers and this should take into account all of them. Correction: just understood you meant the layout would be a new feature. |
Fix control-label width for a spacer field
It works. I just noticed under
|
@Quy that another field type |
Will test tomorrow. 😺 |
<?php $dataShowOn = ''; ?> | ||
<?php | ||
$dataShowOn = ''; | ||
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we need an uppercase for 'Spacer' ? We do not in the xmls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, because it is the field "type" https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/fields/spacer.php#L26 😉
I have tested this item ✅ successfully on 21929d6 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
@Fedik For example, I have added in
(I used an existing lang string). Should be easy |
diff would be:
|
Fix control-label width for a spacer field 2
I have tested this item ✅ successfully on d0e5e57 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
@ot2sen |
I have tested this item ✅ successfully on d0e5e57 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
I have tested this item ✅ successfully on d0e5e57 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15689. |
RTC after two successful tests. |
@rdeutz |
I will keep 3.7.1 as light as possible, so if it is not without any doubt a bugfix it has to wait for 3.7.2 |
OK, no p |
Pull Request for Issue # .
Summary of Changes
Fix form-horizontal for non-latin or long language strings.
Please look for this languages specifies fix: @infograf768
Before fix:
After fix:
Optional width 200px:
Testing latest version Firefox, Chrome and etc Chromius based brawsers.