-
-
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
[ActionsLog] Improve UX for loggable extensions checkboxes with a select all/none SEE #22699 #22674
Conversation
To allow empty selection of events to be logged.
administrator/components/com_actionlogs/models/fields/logtype.php
Outdated
Show resolved
Hide resolved
*/ | ||
public function getInput() | ||
{ | ||
$html = ''; |
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.
Remove and start/change line 62 $html =
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.
Thanks @Quy !
I did the changes.
I thought when use concatenation operators, the first one should be empty (to help to keep code diffs minimal)...
Was it changed as a rule or i was wrong ?
Note: some other core files still use first empty (PR needed for code standards ?).
eg https://github.com/joomla/joomla-cms/blob/staging/libraries/vendor/joomla/uri/src/AbstractUri.php#L150
$uri = '';
$uri .= $parts & static::SCHEME ? (!empty($this->scheme) ? $this->scheme . '://' : '') : '';
$uri .= $parts & static::USER ? $this->user : '';
$uri .= $parts & static::PASS ? (!empty($this->pass) ? ':' : '') . $this->pass . (!empty($this->user) ? '@' : '') : '';
$uri .= $parts & static::HOST ? $this->host : '';
$uri .= $parts & static::PORT ? (!empty($this->port) ? ':' : '') . $this->port : '';
$uri .= $parts & static::PATH ? $this->path : '';
$uri .= $parts & static::QUERY ? (!empty($query) ? '?' . $query : '') : '';
$uri .= $parts & static::FRAGMENT ? (!empty($this->fragment) ? '#' . $this->fragment : '') : '';
// Add the script to the document head | ||
JFactory::getDocument()->addScriptDeclaration($script); | ||
|
||
$html.= '<div class="well well-small">'; |
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.
Add space before .=
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.
Looks fine on review, requires tests
administrator/components/com_actionlogs/models/fields/logtype.php
Outdated
Show resolved
Hide resolved
…ect all/none Remove not needed ' ' before $checked (already in $format)
It is still an issue when editing a profile. Edit a Super User profile All checkboxes are checked. |
@Quy Oh! I didn't even see there was this field in super user edit... To be honnest, i don't see yet how the core extensions are set by default, as no default attribute in plugin system actionlogs form... |
Yes tested with latest staging including #21983. |
The plugin will need to be adjusted. But the field also needs to remove Test case: |
Thanks @SharkyKZ
With this PR, it works for me with The issue is with this PR not really the same as it was before. Maybe in menu/plugin, the issue is the save function does not allow empty submitted data, and then replace by previously saved data. @SharkyKZ your help could be appreciated to know if a change in form data processed to be done in the plugin, or if another issue elsewhere... |
@SharkyKZ I've found why this PR does not have effect on super user edit! In plugin, it is forced to save only if isset. But if empty, it won't update Fix
Would fix issue. Note: i can add this change to this PR if you think it's ok with this ? |
#21983 was written to maintain the existing behavior of form fields. See #21983 (comment). Your fix seems OK. But maybe we should store empty JSON array ( Also the field itself needs updating to remove
|
If a column or data source is expecting a JSON string, then it should always be stored as something that doesn't cause |
Will redo this PR with changes needed (i did something wrong with udpating this one, and better to get things clear) ;-) |
PR redo here: #22699 |
EDIT
new PR here: #22699
Pull Request for Issue #22627.
Summary of Changes
loggable_extensions
(Fix [com_actionlogs] After deselecting all events to disable logging, checkboxes remain ticked #22627 UX issue)Testing Instructions