Skip to content
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

[5.3] Add the js-grid-item-is-checked class and remove onClick HtmlHelper Grid #44501

Draft
wants to merge 2 commits into
base: 5.3-dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/src/HTML/Helpers/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ public static function id($rowNum, $recId, $checkedOut = false, $name = 'cid', $
if ($formId !== null) {
return $checkedOut ? '' : '<label for="' . $stub . $rowNum . '"><span class="visually-hidden">' . Text::_('JSELECT')
. ' ' . htmlspecialchars($title, ENT_COMPAT, 'UTF-8') . '</span></label>'
. '<input class="form-check-input" type="checkbox" id="' . $stub . $rowNum . '" name="' . $name . '[]" value="' . $recId
. '" onclick="Joomla.isChecked(this.checked, \'' . $formId . '\');">';
. '<input class="form-check-input js-grid-item-is-checked" type="checkbox" id="' . $stub . $rowNum
. '" name="' . $name . '[]" value="' . $recId . '" >';
}

return $checkedOut ? '' : '<label for="' . $stub . $rowNum . '"><span class="visually-hidden">' . Text::_('JSELECT')
. ' ' . htmlspecialchars($title, ENT_COMPAT, 'UTF-8') . '</span></label>'
. '<input class="form-check-input" autocomplete="off" type="checkbox" id="' . $stub . $rowNum . '" name="' . $name . '[]" value="' . $recId
. '" onclick="Joomla.isChecked(this.checked);">';
. '<input class="form-check-input js-grid-item-is-checked" autocomplete="off" type="checkbox" id="' . $stub . $rowNum
. '" name="' . $name . '[]" value="' . $recId . '" >';
}

/**
Expand Down