|
|
@ -182,14 +182,14 @@ class Modal extends Widget |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected function renderToggleButton() |
|
|
|
protected function renderToggleButton() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($this->toggleButton !== false) { |
|
|
|
if (($toggleButton = $this->toggleButton) !== false) { |
|
|
|
$tag = ArrayHelper::remove($this->toggleButton, 'tag', 'button'); |
|
|
|
$tag = ArrayHelper::remove($toggleButton, 'tag', 'button'); |
|
|
|
$label = ArrayHelper::remove($this->toggleButton, 'label', 'Show'); |
|
|
|
$label = ArrayHelper::remove($toggleButton, 'label', 'Show'); |
|
|
|
if ($tag === 'button' && !isset($this->toggleButton['type'])) { |
|
|
|
if ($tag === 'button' && !isset($toggleButton['type'])) { |
|
|
|
$this->toggleButton['type'] = 'button'; |
|
|
|
$toggleButton['type'] = 'button'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Html::tag($tag, $label, $this->toggleButton); |
|
|
|
return Html::tag($tag, $label, $toggleButton); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -201,14 +201,14 @@ class Modal extends Widget |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected function renderCloseButton() |
|
|
|
protected function renderCloseButton() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($this->closeButton !== false) { |
|
|
|
if (($closeButton = $this->closeButton) !== false) { |
|
|
|
$tag = ArrayHelper::remove($this->closeButton, 'tag', 'button'); |
|
|
|
$tag = ArrayHelper::remove($closeButton, 'tag', 'button'); |
|
|
|
$label = ArrayHelper::remove($this->closeButton, 'label', '×'); |
|
|
|
$label = ArrayHelper::remove($closeButton, 'label', '×'); |
|
|
|
if ($tag === 'button' && !isset($this->closeButton['type'])) { |
|
|
|
if ($tag === 'button' && !isset($closeButton['type'])) { |
|
|
|
$this->closeButton['type'] = 'button'; |
|
|
|
$closeButton['type'] = 'button'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Html::tag($tag, $label, $this->closeButton); |
|
|
|
return Html::tag($tag, $label, $closeButton); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|