Skip to content

Commit

Permalink
MDL-52167 admin: switch hide_if() to use hide() + update upgrade.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
davosmith authored and sarjona committed Feb 26, 2019
1 parent 8ed3671 commit d940855
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/showhidesettings.min.js

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

6 changes: 2 additions & 4 deletions lib/amd/src/showhidesettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,9 @@ define(['jquery'], function($) {
var $parent = $(el).closest('.form-item');
if ($parent.length) {
if (hide) {
$parent.attr('hidden', 'hidden');
$parent.css('display', 'none');
$parent.hide();
} else {
$parent.removeAttr('hidden');
$parent.css('display', '');
$parent.show();
}
}
});
Expand Down
1 change: 1 addition & 0 deletions lib/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ attribute on forms to avoid collisions in forms loaded in AJAX requests.
* A new method to allow queueing or rescheduling of an existing scheduled task was added. This allows an existing task
to be updated or queued as required. This new functionality can be found in \core\task\manager::reschedule_or_queue_adhoc_task.
* Icons are displayed for screen readers unless they have empty alt text (aria-hidden). Do not provide an icon with alt text immediately beside an element with exactly the same text.
* admin_settingpage has a new function hide_if(), modeled after the same functionality in the forms library. This allows admin settings to be dynamically hidden based on the values of other settings.

=== 3.6 ===

Expand Down

0 comments on commit d940855

Please sign in to comment.