-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Bootstrap popup with mootools compatibility #2 #10791
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
Conversation
|
@Fedik can you review this one as well? |
|
@DGT41 to be honest I am not very understand what is going on here 😄 but I try some test, maybe this evening |
| <td> | ||
| <a class="pointer button-select" href="#" data-user-value="<?php echo $item->id; ?>" data-user-name="<?php echo $this->escape($item->name); ?>" | ||
| data-user-field="<?php echo $this->escape($field);?>" onclick="if (window.parent) window.parent.jSelectUser(this);"> | ||
| data-user-field="<?php echo $this->escape($field);?>" <?php if ($isMoo) : ?>onclick="<?php echo $onClick; ?>"<?php endif; ?>> |
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.
@Fedik onclick event isn't required for bootstrapped version, using the trick to pass a parameter to signify that the modal is bootstrapped we bring B/C even if there are mootools and bootstraped versions of the field in the same page.
Fast forward when joomla will completely remove mootools this parameter even if it exists will be ignored, so also future proof 😉
|
I have tested this item ✅ successfully on 4953c0c This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
|
In compatibility mode (with override removed from Isis, and so in mootools modal) the Another issue (but was there before, so not due to your PR, but could be fixed in the same time) : in all testing cases, if you select no user, you will have the text "Select a user." as the field user name About your code, after tests all seems good! 👍 |
|
This PR has received new commits. CC: @Fedik This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
|
@JoomliC I've fixed the No-User button |
|
@DGT41 Confirm that no user button is fixed. 👍 |
|
This PR has received new commits. CC: @Fedik This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
|
I have tested this item ✅ successfully on a337e9b This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
|
I have tested this item ✅ successfully on a337e9b This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10791. |
This fixes a B/C for form field user
Summary of Changes
Introduce an option that will provide the needed backwards compatibility.
Testing Instructions
Apply patch
Test creating a new article and ensure that the field for selecting a user still works.
Edit administrator/components/com_content/views/article/tmpl/edit.php
and paste the code bellow after line 81 (just before
?>)Test again the previous scenario as well as the new button that will appear above the tabs (that's a mootools modal). The field should be filled with the user id selected in the pop up
Keep the changes in edit.php
Rename administrator/templates/isis/html/layouts/joomla/form/field/user.php to xxxuser.php
Repeat the previous testing steps