Skip to content

Commit

Permalink
Replace checked="checked" with checked
Browse files Browse the repository at this point in the history
Signed-off-by: Liviu-Mihail Concioiu <[email protected]>
  • Loading branch information
liviuconcioiu committed Jan 12, 2025
1 parent 35cba06 commit 961b6a3
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion resources/js/src/makegrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine
var currHeader = $firstRowCols[i];
var listElmt = document.createElement('div');
$(listElmt).text($(currHeader).text())
.prepend('<input type="checkbox" ' + (g.colVisib[i] ? 'checked="checked" ' : '') + '>');
.prepend('<input type="checkbox" ' + (g.colVisib[i] ? 'checked ' : '') + '>');

$listDiv.append(listElmt);
// add event on click
Expand Down
2 changes: 1 addition & 1 deletion resources/js/src/modules/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ export function loadForeignKeyCheckbox () {
$.get('index.php?route=/sql/get-default-fk-check-value', params, function (data) {
var html = '<input type="hidden" name="fk_checks" value="0">' +
'<input type="checkbox" name="fk_checks" id="fk_checks"' +
(data.default_fk_check_value ? ' checked="checked"' : '') + '>' +
(data.default_fk_check_value ? ' checked' : '') + '>' +
'<label for="fk_checks">' + window.Messages.strForeignKeyCheck + '</label>';
$('.load-default-fk-check-value').replaceWith(html);
});
Expand Down
4 changes: 2 additions & 2 deletions resources/js/src/modules/indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function getCompositeIndexList (sourceArray, colIndex) {
$compositeIndexList.append(
'<li>' +
'<input type="radio" name="composite_with" ' +
(alreadyPresent ? 'checked="checked"' : '') +
(alreadyPresent ? 'checked' : '') +
' id="composite_index_' + i + '" value="' + i + '">' +
'<label for="composite_index_' + i + '">' + columnNames.join(', ') +
'</label>' +
Expand Down Expand Up @@ -444,7 +444,7 @@ var removeIndexOnChangeEvent = function () {
*/
function indexTypeSelectionDialog (sourceArray, indexChoice, colIndex): void {
var $singleColumnRadio = $('<div class="form-check">' +
'<input class="form-check-input" type="radio" id="single_column" name="index_choice" checked="checked">' +
'<input class="form-check-input" type="radio" id="single_column" name="index_choice" checked>' +
'<label class="form-check-label" for="single_column">' +
window.Messages.strCreateSingleColumnIndex + '</label></div>');
var $compositeIndexRadio = $('<div class="form-check">' +
Expand Down
2 changes: 1 addition & 1 deletion resources/js/src/table/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ function addNewContinueInsertionFields (event) {

// Insert/Clone the ignore checkboxes
if (currRows === 1) {
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked="checked">')
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked>')
.insertBefore($('table.insertRowTable').last())
.after('<label for="insert_ignore_1">' + window.Messages.strIgnore + '</label>');
} else {
Expand Down
26 changes: 13 additions & 13 deletions resources/templates/create_tracking_version.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,53 @@

{% if type == 'both' or type == 'table' %}
<input type="checkbox" name="alter_table" value="true"
{{- 'ALTER TABLE' in default_statements ? ' checked="checked"' }}>
{{- 'ALTER TABLE' in default_statements ? ' checked' }}>
ALTER TABLE<br>
<input type="checkbox" name="rename_table" value="true"
{{- 'RENAME TABLE' in default_statements ? ' checked="checked"' }}>
{{- 'RENAME TABLE' in default_statements ? ' checked' }}>
RENAME TABLE<br>
<input type="checkbox" name="create_table" value="true"
{{- 'CREATE TABLE' in default_statements ? ' checked="checked"' }}>
{{- 'CREATE TABLE' in default_statements ? ' checked' }}>
CREATE TABLE<br>
<input type="checkbox" name="drop_table" value="true"
{{- 'DROP TABLE' in default_statements ? ' checked="checked"' }}>
{{- 'DROP TABLE' in default_statements ? ' checked' }}>
DROP TABLE<br>
{% endif %}
{% if type == 'both' %}
<br>
{% endif %}
{% if type == 'both' or type == 'view' %}
<input type="checkbox" name="alter_view" value="true"
{{- 'ALTER VIEW' in default_statements ? ' checked="checked"' }}>
{{- 'ALTER VIEW' in default_statements ? ' checked' }}>
ALTER VIEW<br>
<input type="checkbox" name="create_view" value="true"
{{- 'CREATE VIEW' in default_statements ? ' checked="checked"' }}>
{{- 'CREATE VIEW' in default_statements ? ' checked' }}>
CREATE VIEW<br>
<input type="checkbox" name="drop_view" value="true"
{{- 'DROP VIEW' in default_statements ? ' checked="checked"' }}>
{{- 'DROP VIEW' in default_statements ? ' checked' }}>
DROP VIEW<br>
{% endif %}
<br>

<input type="checkbox" name="create_index" value="true"
{{- 'CREATE INDEX' in default_statements ? ' checked="checked"' }}>
{{- 'CREATE INDEX' in default_statements ? ' checked' }}>
CREATE INDEX<br>
<input type="checkbox" name="drop_index" value="true"
{{- 'DROP INDEX' in default_statements ? ' checked="checked"' }}>
{{- 'DROP INDEX' in default_statements ? ' checked' }}>
DROP INDEX<br>

<p>{{ t('Track these data manipulation statements:') }}</p>
<input type="checkbox" name="insert" value="true"
{{- 'INSERT' in default_statements ? ' checked="checked"' }}>
{{- 'INSERT' in default_statements ? ' checked' }}>
INSERT<br>
<input type="checkbox" name="update" value="true"
{{- 'UPDATE' in default_statements ? ' checked="checked"' }}>
{{- 'UPDATE' in default_statements ? ' checked' }}>
UPDATE<br>
<input type="checkbox" name="delete" value="true"
{{- 'DELETE' in default_statements ? ' checked="checked"' }}>
{{- 'DELETE' in default_statements ? ' checked' }}>
DELETE<br>
<input type="checkbox" name="truncate" value="true"
{{- 'TRUNCATE' in default_statements ? ' checked="checked"' }}>
{{- 'TRUNCATE' in default_statements ? ' checked' }}>
TRUNCATE<br>
</div>

Expand Down
4 changes: 2 additions & 2 deletions resources/templates/database/multi_table_query/form.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<option value="">{{ t('select column') }}</option>
</select>
<br>
<input type="checkbox" checked="checked" class="show_col">
<input type="checkbox" checked class="show_col">
<span>{{ t('Show') }}</span>
<br>
<input type="text" placeholder="{{ t('Table alias') }}" class="table_alias">
Expand Down Expand Up @@ -65,7 +65,7 @@
name="logical_op[{{ id }}]"
value="AND"
class="logical_op"
checked="checked">
checked>
AND
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/encoding/kanji_encoding_form.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul>
<li>
<input type="radio" name="knjenc" value="" checked="checked" id="kj-none">
<input type="radio" name="knjenc" value="" checked id="kj-none">
<label for="kj-none">
{{ t('None', context = 'None encoding conversion', notes = 'This is currently used only in Japanese locales') }}
</label>
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/gis_data_editor_form.twig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<div class="card-footer">
<div class="form-switch mt-1">
<input type="checkbox" id="useOsmAsBaseLayerSwitch" class="form-check-input" value="useBaseLayer"{{ srid != 0 ? ' checked="checked"' }}>
<input type="checkbox" id="useOsmAsBaseLayerSwitch" class="form-check-input" value="useBaseLayer"{{ srid != 0 ? ' checked' }}>
<label for="useOsmAsBaseLayerSwitch" id="useOsmAsBaseLayerSwitchLabel">{{ t('Use OpenStreetMaps as Base Layer') }}</label>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/templates/preferences/manage/main.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
enctype="multipart/form-data">
{{ get_hidden_inputs() }}
<input type="hidden" name="json" value="">
<input type="radio" id="import_text_file" name="import_type" value="text_file" checked="checked">
<input type="radio" id="import_text_file" name="import_type" value="text_file" checked>
<label for="import_text_file"> {{ t('Import from file') }} </label>
<div id="opts_import_text_file" class="prefsmanage_opts">
<label for="input_import_file"> {{ t('Browse your computer:') }} </label>
Expand Down Expand Up @@ -75,7 +75,7 @@
{{ get_hidden_inputs() }}
<div>
<input type="radio" id="export_text_file" name="export_type"
value="text_file" checked="checked">
value="text_file" checked>
<label for="export_text_file">
{{ t('Save as JSON file') }}
</label><br>
Expand Down
8 changes: 4 additions & 4 deletions resources/templates/server/status/monitor/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<select name="presetCharts"></select>
<br>

<input type="radio" name="chartType" value="variable" id="chartStatusVar" checked="checked">
<input type="radio" name="chartType" value="variable" id="chartStatusVar" checked>
<label for="chartStatusVar">
{{ t('Status variable(s)') }}
</label>
Expand Down Expand Up @@ -137,7 +137,7 @@
<input type="text" name="variableInput" id="variableInput">
<br>

<input type="checkbox" name="differentialValue" id="differentialValue" value="differential" checked="checked">
<input type="checkbox" name="differentialValue" id="differentialValue" value="differential" checked>
<label for="differentialValue">
{{ t('Display as differential value') }}
</label>
Expand Down Expand Up @@ -194,13 +194,13 @@
<input type="text" name="dateEnd" class="datetimefield" value="">
</p>

<input type="checkbox" id="limitTypes" value="1" checked="checked">
<input type="checkbox" id="limitTypes" value="1" checked>
<label for="limitTypes">
{{ t('Only retrieve SELECT,INSERT,UPDATE and DELETE Statements') }}
</label>
<br>

<input type="checkbox" id="removeVariables" value="1" checked="checked">
<input type="checkbox" id="removeVariables" value="1" checked>
<label for="removeVariables">
{{ t('Remove variable data in INSERT statements for better grouping') }}
</label>
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/view_create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<td class="text-nowrap"><label for="or_replace">OR REPLACE</label></td>
<td>
<input type="checkbox" name="view[or_replace]" id="or_replace"
{% if (view['or_replace']) %} checked="checked" {% endif %}
{% if (view['or_replace']) %} checked {% endif %}
value="1">
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigStorage/UserGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public static function getTabList(string $title, UserGroupLevel $level, array $s
$tabDetails = [];
foreach ($tabs as $tab => $tabName) {
$tabDetail = [];
$tabDetail['in_array'] = in_array($tab, $selected) ? ' checked="checked"' : '';
$tabDetail['in_array'] = in_array($tab, $selected) ? ' checked' : '';
$tabDetail['tab'] = $tab;
$tabDetail['tab_name'] = $tabName;
$tabDetails[] = $tabDetail;
Expand Down
2 changes: 1 addition & 1 deletion src/Export/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ public function getMetadataTypes(): array
public function getCheckedClause(string $key, array $array): string
{
if (in_array($key, $array)) {
return ' checked="checked"';
return ' checked';
}

return '';
Expand Down
2 changes: 1 addition & 1 deletion src/InsertEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ public function getCommentsMap(string $db, string $table): array
public function getHtmlForIgnoreOption(int $rowId, bool $checked = true): string
{
return '<input type="checkbox"'
. ($checked ? ' checked="checked"' : '')
. ($checked ? ' checked' : '')
. ' name="insert_ignore_' . $rowId . '"'
. ' id="insert_ignore_' . $rowId . '">'
. '<label for="insert_ignore_' . $rowId . '">'
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static function checkboxCheck(string $section, string $opt): string
&& ((ImportSettings::$timeoutPassed && isset($_REQUEST[$opt]))
|| ! empty(Config::getInstance()->settings[$section][$opt]))
) {
return ' checked="checked"';
return ' checked';
}

return '';
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ConfigStorage/UserGroupsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function testGetHtmlToEditUserGroup(): void
self::assertStringContainsString('<input type="hidden" name="editUserGroupSubmit" value="1"', $html);
self::assertStringContainsString(
'<input class="form-check-input checkall" type="checkbox"'
. ' checked="checked" name="server_sql" id="server_sql" value="Y">',
. ' checked name="server_sql" id="server_sql" value="Y">',
$html,
);
self::assertStringContainsString(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Controllers/Table/ImportControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testImportController(): void
'plugins_choice' => $choice,
'options' => $options,
'skip_queries_default' => '0',
'is_allow_interrupt_checked' => ' checked="checked"',
'is_allow_interrupt_checked' => ' checked',
'local_import_file' => null,
'is_upload' => true,
'upload_dir' => '',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/InsertEditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ public function testGetHtmlForIgnoreOption(): void
$expected = '<input type="checkbox" %sname="insert_ignore_1"'
. ' id="insert_ignore_1"><label for="insert_ignore_1">'
. 'Ignore</label><br>' . "\n";
$checked = 'checked="checked" ';
$checked = 'checked ';
self::assertSame(
sprintf($expected, $checked),
$this->insertEdit->getHtmlForIgnoreOption(1),
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Tracking/TrackingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function testGetHtmlForMain(): void
);
self::assertStringContainsString(
'<input type="checkbox" name="delete" value="true"'
. ' checked="checked">' . "\n" . ' DELETE<br>',
. ' checked>' . "\n" . ' DELETE<br>',
$html,
);
self::assertStringContainsString(__('Create version'), $html);
Expand Down

0 comments on commit 961b6a3

Please sign in to comment.