Skip to content

Commit

Permalink
MDL-67970 output: replace new-sections attribute with data-new-sections
Browse files Browse the repository at this point in the history
new-sections is not a valid attribute name for the a element.
Replaced that with data-new-sections
  • Loading branch information
rezaies committed Mar 17, 2020
1 parent b48b4d2 commit 4d0e97c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion course/amd/build/actions.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion course/amd/build/actions.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion course/amd/src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
str.get_string('numberweeks').done(function(strNumberSections) {
var trigger = $(SELECTOR.ADDSECTIONS),
modalTitle = trigger.attr('data-add-sections'),
newSections = trigger.attr('new-sections');
newSections = trigger.attr('data-new-sections');
var modalBody = $('<div><label for="add_section_numsections"></label> ' +
'<input id="add_section_numsections" type="number" min="1" max="' + newSections + '" value="1"></div>');
modalBody.find('label').html(strNumberSections);
Expand Down
2 changes: 1 addition & 1 deletion course/format/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ protected function change_number_sections($course, $sectionreturn = null) {
$icon = $this->output->pix_icon('t/add', '');
$newsections = $maxsections - $lastsection;
echo html_writer::link($url, $icon . $straddsections,
array('class' => 'add-sections', 'data-add-sections' => $straddsections, 'new-sections' => $newsections));
array('class' => 'add-sections', 'data-add-sections' => $straddsections, 'data-new-sections' => $newsections));
echo html_writer::end_tag('div');
}
}
Expand Down

0 comments on commit 4d0e97c

Please sign in to comment.