Merge branch 'MDL-86015-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
issueNumber: MDL-86015
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
The `\core\output\local\dropdown\dialog` class constructor now accepts a
|
||||
`$definition['autoclose']` parameter to define autoclose behaviour of
|
||||
the element
|
||||
type: changed
|
||||
@@ -74,6 +74,10 @@ class dialog implements named_templatable, renderable {
|
||||
*/
|
||||
protected $dropdownwidth = self::WIDTH['default'];
|
||||
|
||||
/**
|
||||
* @var string dropdown autoclose behaviour.
|
||||
*/
|
||||
protected $autoclose = 'true';
|
||||
|
||||
/**
|
||||
* @var array extra HTML attributes (attribute => value).
|
||||
@@ -93,6 +97,7 @@ class dialog implements named_templatable, renderable {
|
||||
* - buttonclasses: the button CSS classes.
|
||||
* - dialogwidth: the dropdown width.
|
||||
* - dropdownposition: the dropdown position.
|
||||
* - autoclose: dropdown autoclose behaviour ('true' (default), 'false', 'inside', 'outside')
|
||||
* - extras: extra HTML attributes (attribute => value).
|
||||
*
|
||||
* @param string $buttoncontent the button content
|
||||
@@ -117,6 +122,9 @@ class dialog implements named_templatable, renderable {
|
||||
if (isset($definition['dropdownposition'])) {
|
||||
$this->dropdownposition = $definition['dropdownposition'];
|
||||
}
|
||||
if (isset($definition['autoclose'])) {
|
||||
$this->autoclose = $definition['autoclose'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,6 +239,7 @@ class dialog implements named_templatable, renderable {
|
||||
'classes' => $this->classes,
|
||||
'buttonclasses' => $this->buttonclasses,
|
||||
'dialogclasses' => $this->dropdownwidth,
|
||||
'autoclose' => $this->autoclose,
|
||||
'extras' => $extras,
|
||||
];
|
||||
if ($this->disabled) {
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
role="button"
|
||||
id="{{#buttonid}}{{buttonid}}{{/buttonid}}{{^buttonid}}dropdownDialog{{uniqid}}{{/buttonid}}"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-auto-close="{{#autoclose}}{{autoclose}}{{/autoclose}}{{^autoclose}}true{{/autoclose}}"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
data-for="dropdowndialog_button"
|
||||
|
||||
@@ -390,6 +390,7 @@ class grading_actionmenu implements templatable, renderable {
|
||||
[
|
||||
'classes' => 'extrafilters d-flex',
|
||||
'buttonclasses' => 'btn d-flex border-none align-items-center dropdown-toggle p-0',
|
||||
'autoclose' => 'outside',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<input type="hidden" name="action" value="{{action}}">
|
||||
{{#filters}}
|
||||
{{#markingworkflow}}
|
||||
<div class="d-flex flex-wrap m-0 pb-3">
|
||||
<div class="d-flex flex-wrap gap-2 m-0 pb-3">
|
||||
<label class="w-100" for="filter-workflow-{{uniqid}}">
|
||||
{{#str}}markingstate, mod_assign{{/str}}
|
||||
</label>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
{{/markingworkflow}}
|
||||
{{#markingallocation}}
|
||||
<div class="d-flex flex-wrap m-0 pb-3">
|
||||
<div class="d-flex flex-wrap gap-2 m-0 pb-3">
|
||||
<label class="w-100" for="filter-marking-allocation-{{uniqid}}">
|
||||
{{#str}}marker, mod_assign{{/str}}
|
||||
</label>
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
{{/markingallocation}}
|
||||
{{#suspendedparticipants}}
|
||||
<div class="d-flex flex-wrap m-0 pb-3 pt-2 mx-1 align-items-center">
|
||||
<div class="d-flex flex-wrap gap-2 m-0 pb-3 pt-2 mx-1 align-items-center">
|
||||
<input type="hidden" name="suspendedparticipantsfilter" value="0" {{#active}}disabled{{/active}}>
|
||||
<input type="checkbox" id="filter-suspended-participants-{{uniqid}}" name="suspendedparticipantsfilter" value="1" {{#active}}checked{{/active}}>
|
||||
<label for="filter-suspended-participants-{{uniqid}}" class='m-0' >{{#str}} includesuspendedparticipants, mod_assign {{/str}}</label>
|
||||
|
||||
Reference in New Issue
Block a user