Skip to content

Commit

Permalink
Merge branch 'MDL-79057-402' of https://github.com/junpataleta/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_402_STABLE
  • Loading branch information
HuongNV13 authored and ilyatregubov committed Sep 15, 2023
2 parents 80dd8d0 + 92d78a7 commit 51c0bf6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion grade/report/singleview/classes/local/screen/tablelike.php
Expand Up @@ -243,7 +243,7 @@ public function bulk_insert() {
return html_writer::tag(
'div',
(new bulk_insert($this->item))->html(),
['class' => 'singleview_bulk', 'hidden' => true]
['class' => 'singleview_bulk', 'hidden' => 'hidden']
);
}

Expand Down
Expand Up @@ -105,7 +105,6 @@ public function html(): string {
'name' => $this->name,
'value' => $this->selected,
'text' => $options[$selected],
'tabindex' => 1,
'disabled' => !empty($this->isdisabled),
'readonly' => $this->isreadonly,
'options' => array_map(function($option) use ($options, $selected) {
Expand Down
2 changes: 0 additions & 2 deletions grade/report/singleview/classes/local/ui/text_attribute.php
Expand Up @@ -85,10 +85,8 @@ public function html(): string {
$context->label = '';
if (preg_match("/^feedback/", $this->name)) {
$context->label = get_string('feedbackfor', 'gradereport_singleview', $this->label);
$context->tabindex = '2';
} else if (preg_match("/^finalgrade/", $this->name)) {
$context->label = get_string('gradefor', 'gradereport_singleview', $this->label);
$context->tabindex = '1';
}

return $OUTPUT->render_from_template('gradereport_singleview/text_attribute', $context);
Expand Down
Expand Up @@ -33,7 +33,7 @@
{{/readonly}}
{{^readonly}}
<label for="{{name}}" class="accesshide">{{label}}</label>
<select id="{{name}}" name="{{name}}" class="custom-select" tabindex="1" {{#disabled}}disabled{{/disabled}}>
<select id="{{name}}" name="{{name}}" class="custom-select" {{#disabled}}disabled{{/disabled}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
Expand Down
3 changes: 1 addition & 2 deletions grade/report/singleview/templates/text_attribute.mustache
Expand Up @@ -24,7 +24,6 @@
"name": "Awesome-report",
"label": "Text label",
"value": "Text information",
"tabindex": "1",
"disabled": "true"
}
}}
Expand All @@ -33,6 +32,6 @@
{{/readonly}}
{{^readonly}}
{{#label}}<label for="{{name}}" class="accesshide">{{label}}</label>{{/label}}
<input id="{{name}}" name="{{name}}" type="text" value="{{value}}" class="form-control" {{#tabindex}}tabindex="{{.}}"{{/tabindex}} {{#disabled}}disabled{{/disabled}}>
<input id="{{name}}" name="{{name}}" type="text" value="{{value}}" class="form-control" {{#disabled}}disabled{{/disabled}}>
<input type="hidden" name="old{{name}}" value="{{value}}">
{{/readonly}}

0 comments on commit 51c0bf6

Please sign in to comment.