Skip to content

Commit 57610a5

Browse files
committed
Merge #19508 - Use shorthand attributes
Pull-request: #19508 Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents d1a8128 + 961b6a3 commit 57610a5

45 files changed

Lines changed: 91 additions & 91 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

resources/js/src/makegrid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ const makeGrid = function (t, enableResize = undefined, enableReorder = undefine
18671867
var currHeader = $firstRowCols[i];
18681868
var listElmt = document.createElement('div');
18691869
$(listElmt).text($(currHeader).text())
1870-
.prepend('<input type="checkbox" ' + (g.colVisib[i] ? 'checked="checked" ' : '') + '>');
1870+
.prepend('<input type="checkbox" ' + (g.colVisib[i] ? 'checked ' : '') + '>');
18711871

18721872
$listDiv.append(listElmt);
18731873
// add event on click

resources/js/src/modules/functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ export function loadForeignKeyCheckbox () {
10491049
$.get('index.php?route=/sql/get-default-fk-check-value', params, function (data) {
10501050
var html = '<input type="hidden" name="fk_checks" value="0">' +
10511051
'<input type="checkbox" name="fk_checks" id="fk_checks"' +
1052-
(data.default_fk_check_value ? ' checked="checked"' : '') + '>' +
1052+
(data.default_fk_check_value ? ' checked' : '') + '>' +
10531053
'<label for="fk_checks">' + window.Messages.strForeignKeyCheck + '</label>';
10541054
$('.load-default-fk-check-value').replaceWith(html);
10551055
});

resources/js/src/modules/indexes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function getCompositeIndexList (sourceArray, colIndex) {
258258
$compositeIndexList.append(
259259
'<li>' +
260260
'<input type="radio" name="composite_with" ' +
261-
(alreadyPresent ? 'checked="checked"' : '') +
261+
(alreadyPresent ? 'checked' : '') +
262262
' id="composite_index_' + i + '" value="' + i + '">' +
263263
'<label for="composite_index_' + i + '">' + columnNames.join(', ') +
264264
'</label>' +
@@ -444,7 +444,7 @@ var removeIndexOnChangeEvent = function () {
444444
*/
445445
function indexTypeSelectionDialog (sourceArray, indexChoice, colIndex): void {
446446
var $singleColumnRadio = $('<div class="form-check">' +
447-
'<input class="form-check-input" type="radio" id="single_column" name="index_choice" checked="checked">' +
447+
'<input class="form-check-input" type="radio" id="single_column" name="index_choice" checked>' +
448448
'<label class="form-check-label" for="single_column">' +
449449
window.Messages.strCreateSingleColumnIndex + '</label></div>');
450450
var $compositeIndexRadio = $('<div class="form-check">' +

resources/js/src/table/change.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ function addNewContinueInsertionFields (event) {
868868

869869
// Insert/Clone the ignore checkboxes
870870
if (currRows === 1) {
871-
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked="checked">')
871+
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked>')
872872
.insertBefore($('table.insertRowTable').last())
873873
.after('<label for="insert_ignore_1">' + window.Messages.strIgnore + '</label>');
874874
} else {

resources/templates/columns_definitions/column_attribute.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% set cnt_attribute_types = attribute_types|length - 1 %}
1616
{% for i in 0..cnt_attribute_types %}
1717
<option value="{{ attribute_types[i] }}"
18-
{{- attribute == attribute_types[i]|upper ? ' selected="selected"' }}>
18+
{{- attribute == attribute_types[i]|upper ? ' selected' }}>
1919
{{ attribute_types[i] }}
2020
</option>
2121
{% endfor %}

resources/templates/columns_definitions/column_attributes.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180

181181
<td class="text-center">
182182
<select id="field_{{ column_number }}_{{ ci - ci_offset }}" name="field_move_to[{{ column_number }}]" size="1" width="5em">
183-
<option value="" selected="selected">&nbsp;</option>
184-
<option value="-first"{{ current_index == 0 ? ' disabled="disabled"' }}>
183+
<option value="" selected>&nbsp;</option>
184+
<option value="-first"{{ current_index == 0 ? ' disabled' }}>
185185
{{ t('first') }}
186186
</option>
187187
{% for move_column in move_columns %}

resources/templates/columns_definitions/column_definitions_form.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
value="{{ connection is defined ? connection }}"
127127
placeholder="scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name"
128128
class="textfield"
129-
required="required">
129+
required>
130130
</td>
131131
</tr>
132132
{% if have_partitioning %}

resources/templates/columns_definitions/column_name.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"
2020
{% if column_meta['column_status'] is defined
2121
and not column_meta['column_status']['isEditable'] %}
22-
disabled="disabled"
22+
disabled
2323
{% endif %}
2424
type="text"
2525
name="field_name[{{ column_number }}]"

resources/templates/columns_definitions/partitions.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{% for option in partition_options %}
2121
<option value="{{ option }}"
2222
{%- if partition_details['partition_by'] == option %}
23-
selected="selected"
23+
selected
2424
{%- endif %}>
2525
{{ option }}
2626
</option>
@@ -48,7 +48,7 @@
4848
{% for option in sub_partition_options %}
4949
<option value="{{ option }}"
5050
{%- if partition_details['subpartition_by'] == option %}
51-
selected="selected"
51+
selected
5252
{%- endif %}>
5353
{{ option }}
5454
</option>
@@ -105,7 +105,7 @@
105105
{% for option in value_type_options %}
106106
<option value="{{ option }}"
107107
{%- if partition['value_type'] == option %}
108-
selected="selected"
108+
selected
109109
{%- endif %}>
110110
{{ option }}
111111
</option>

resources/templates/create_tracking_version.twig

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,53 @@
2222

2323
{% if type == 'both' or type == 'table' %}
2424
<input type="checkbox" name="alter_table" value="true"
25-
{{- 'ALTER TABLE' in default_statements ? ' checked="checked"' }}>
25+
{{- 'ALTER TABLE' in default_statements ? ' checked' }}>
2626
ALTER TABLE<br>
2727
<input type="checkbox" name="rename_table" value="true"
28-
{{- 'RENAME TABLE' in default_statements ? ' checked="checked"' }}>
28+
{{- 'RENAME TABLE' in default_statements ? ' checked' }}>
2929
RENAME TABLE<br>
3030
<input type="checkbox" name="create_table" value="true"
31-
{{- 'CREATE TABLE' in default_statements ? ' checked="checked"' }}>
31+
{{- 'CREATE TABLE' in default_statements ? ' checked' }}>
3232
CREATE TABLE<br>
3333
<input type="checkbox" name="drop_table" value="true"
34-
{{- 'DROP TABLE' in default_statements ? ' checked="checked"' }}>
34+
{{- 'DROP TABLE' in default_statements ? ' checked' }}>
3535
DROP TABLE<br>
3636
{% endif %}
3737
{% if type == 'both' %}
3838
<br>
3939
{% endif %}
4040
{% if type == 'both' or type == 'view' %}
4141
<input type="checkbox" name="alter_view" value="true"
42-
{{- 'ALTER VIEW' in default_statements ? ' checked="checked"' }}>
42+
{{- 'ALTER VIEW' in default_statements ? ' checked' }}>
4343
ALTER VIEW<br>
4444
<input type="checkbox" name="create_view" value="true"
45-
{{- 'CREATE VIEW' in default_statements ? ' checked="checked"' }}>
45+
{{- 'CREATE VIEW' in default_statements ? ' checked' }}>
4646
CREATE VIEW<br>
4747
<input type="checkbox" name="drop_view" value="true"
48-
{{- 'DROP VIEW' in default_statements ? ' checked="checked"' }}>
48+
{{- 'DROP VIEW' in default_statements ? ' checked' }}>
4949
DROP VIEW<br>
5050
{% endif %}
5151
<br>
5252

5353
<input type="checkbox" name="create_index" value="true"
54-
{{- 'CREATE INDEX' in default_statements ? ' checked="checked"' }}>
54+
{{- 'CREATE INDEX' in default_statements ? ' checked' }}>
5555
CREATE INDEX<br>
5656
<input type="checkbox" name="drop_index" value="true"
57-
{{- 'DROP INDEX' in default_statements ? ' checked="checked"' }}>
57+
{{- 'DROP INDEX' in default_statements ? ' checked' }}>
5858
DROP INDEX<br>
5959

6060
<p>{{ t('Track these data manipulation statements:') }}</p>
6161
<input type="checkbox" name="insert" value="true"
62-
{{- 'INSERT' in default_statements ? ' checked="checked"' }}>
62+
{{- 'INSERT' in default_statements ? ' checked' }}>
6363
INSERT<br>
6464
<input type="checkbox" name="update" value="true"
65-
{{- 'UPDATE' in default_statements ? ' checked="checked"' }}>
65+
{{- 'UPDATE' in default_statements ? ' checked' }}>
6666
UPDATE<br>
6767
<input type="checkbox" name="delete" value="true"
68-
{{- 'DELETE' in default_statements ? ' checked="checked"' }}>
68+
{{- 'DELETE' in default_statements ? ' checked' }}>
6969
DELETE<br>
7070
<input type="checkbox" name="truncate" value="true"
71-
{{- 'TRUNCATE' in default_statements ? ' checked="checked"' }}>
71+
{{- 'TRUNCATE' in default_statements ? ' checked' }}>
7272
TRUNCATE<br>
7373
</div>
7474

0 commit comments

Comments
 (0)