chg: [BootstrapHelper:modal] Added support of scrolling in modal body
- For the pleasure of @iglocskadevelop-unstable
parent
7cda322223
commit
fb418ca0b4
|
@ -17,6 +17,7 @@ use App\View\Helper\BootstrapGeneric;
|
||||||
* - body: The body of the modal
|
* - body: The body of the modal
|
||||||
* - bodyHtml: The HTML body of the modal
|
* - bodyHtml: The HTML body of the modal
|
||||||
* - footerHtml: The HTML footer of the modal. Override the $type option
|
* - footerHtml: The HTML footer of the modal. Override the $type option
|
||||||
|
* - dialogScrollable: Allows to scroll the modal body
|
||||||
* - modalClass, headerClass, footerClass: Classes to be applied to these modal sections
|
* - modalClass, headerClass, footerClass: Classes to be applied to these modal sections
|
||||||
* - type: Control the type of actions available.
|
* - type: Control the type of actions available.
|
||||||
* Valid values: 'ok-only', 'confirm', 'custom'
|
* Valid values: 'ok-only', 'confirm', 'custom'
|
||||||
|
@ -139,6 +140,7 @@ class BootstrapModal extends BootstrapGeneric
|
||||||
'body' => '',
|
'body' => '',
|
||||||
'bodyHtml' => null,
|
'bodyHtml' => null,
|
||||||
'footerHtml' => null,
|
'footerHtml' => null,
|
||||||
|
'dialogScrollable' => true,
|
||||||
'modalClass' => [''],
|
'modalClass' => [''],
|
||||||
'headerClass' => [''],
|
'headerClass' => [''],
|
||||||
'bodyClass' => [''],
|
'bodyClass' => [''],
|
||||||
|
@ -176,6 +178,10 @@ class BootstrapModal extends BootstrapGeneric
|
||||||
$this->options['bodyClass'] = $this->convertToArrayIfNeeded($this->options['bodyClass']);
|
$this->options['bodyClass'] = $this->convertToArrayIfNeeded($this->options['bodyClass']);
|
||||||
$this->options['footerClass'] = $this->convertToArrayIfNeeded($this->options['footerClass']);
|
$this->options['footerClass'] = $this->convertToArrayIfNeeded($this->options['footerClass']);
|
||||||
|
|
||||||
|
if (!empty($this->options['dialogScrollable'])) {
|
||||||
|
$this->options['modalClass'][] = 'modal-dialog-scrollable';
|
||||||
|
}
|
||||||
|
|
||||||
$possiblVariants = ['header-variant', 'body-variant', 'footer-variant'];
|
$possiblVariants = ['header-variant', 'body-variant', 'footer-variant'];
|
||||||
foreach ($possiblVariants as $possiblVariant) {
|
foreach ($possiblVariants as $possiblVariant) {
|
||||||
if (!empty($this->options[$possiblVariant])) {
|
if (!empty($this->options[$possiblVariant])) {
|
||||||
|
|
Loading…
Reference in New Issue