-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 #10520 (issue with "Save & Close" in modal) + function to update input title when changed #10522
Fix #10520 (issue with "Save & Close" in modal) + function to update input title when changed #10522
Conversation
I have tested this item ✅ successfully on 2e2af7c This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
Works OK for all categories. |
@infograf768 did you test on latest staging ? |
Sure, on latest staging The error here comes from these changes:
and
After changing back to $this->id the modals load OK with an href of the type |
hum, i had the exact same problem @infograf768 (and used the latest staging). @JoomliC also, i notice a small detail not related to this PR. |
@JoomliC the "Edit" modals work on menu items, but not in associations. |
Ok i see! |
This PR has received new commits. CC: @BurtNL This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
@andrepereiradasilva @BurtNL @infograf768 PR updated and should work now with associations as well as in menus ;-)
@andrepereiradasilva Added too a new function for edit modal, to update the input title when changed ;-) |
I have tested this item ✅ successfully on 2214bdc
All worked without issues! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
I have tested this item ✅ successfully on 2214bdc This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
RTc. Thanks! Let's go on for the other modals. 😃 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
{ | ||
$value = (int) $this->value; | ||
} | ||
|
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.
Why so complicated?
$value = (int) $this->value;
if (0 == $value)
{
$value = '';
}
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.
Doesn't this also work?
$value = (int) $this->value === 0 ? '' : $this->value;
But for me this is a detail.
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.
@rdeutz i don't have change all existed code, but i agree that as i've simplify some, i can this one too!
Do you agree if i change for this one:
$value = (int) $this->value === 0 ? '' : (int) $this->value;
?
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.
In fact, just updated, with a simplified of active id variable ;-)
So after this PR gets merged, reggarding modals, that i see there is, the main remaining modals (for 3.6.0?):
And the other less relevant modals (for 3.6.x or 3.7.0?):
And some ideas:
Is this right? Or do i miss something? |
@andrepereiradasilva You're right + a few minor improvement for com_template modals ;-) About Help, yes, good idea (for when i will have done others ;-) ) ! |
This PR has received new commits. CC: @andrepereiradasilva, @BurtNL, @infograf768 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
@andrepereiradasilva @rdeutz @infograf768 @BurtNL I have updated the PR, by simplifying the active id $value control (as well commented by @rdeutz 👍 ) :
Could review/test again ? |
I have tested this item ✅ successfully on 29a6bf9 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
Even if this PR to fix newsfeeds, categories and contacts Select & Edit modals is not merged, i have created the PR for Article Select and Edit Modals with same fixes and updates applied here ;-) |
I have tested this item ✅ successfully on 29a6bf9 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
I have tested this item 🔴 unsuccessfully on 29a6bf9 When I go to Newsfeed (or Articles) and edit an item go to the Images tab, click on the Select for the first image. This brings up the image modal. Clicking the X in the corner works fine but the Cancel button doesn't do anything. I would expect the modal to close here. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
Removing RTC for now as there is an unsuccessful test. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10522. |
@roland-d |
@roland-d I will check it in another PR, as not related to this PR. But well found! 👍 But you can set RTC again here ;-) |
@JoomliC Thank you for checking, will move this forward. |
Thanks everybody |
Pull Request for Issue #10520.
Summary of Changes
Testing Instructions
newsfeed
,contact
andcategories
Save
andSave & Close
with a correct edition (no error), and then with an empty title, or any other possible error (not filled required field).Save & Close
won't close the modal, andSave
will never close the modal (close only when requested, and on successful edition)