diff --git a/Controller/Component/NetCommonsComponent.php b/Controller/Component/NetCommonsComponent.php index 96b1b9c7..47865db0 100644 --- a/Controller/Component/NetCommonsComponent.php +++ b/Controller/Component/NetCommonsComponent.php @@ -127,4 +127,14 @@ public function setFlashNotification($message, $params = array(), $status = 200) $this->controller->Session->setFlash($message, $element, $params); } } + +/** + * bodyタグの直下に強制的に埋め込むHTMLタグ。特にリダイレクト時に使用する + * + * @param string $html HTML + * @return void + */ + public function setAppendHtml($html) { + $this->controller->Session->write('appendHtml', $html); + } } diff --git a/View/Elements/common_header.ctp b/View/Elements/common_header.ctp index 8e8d281a..e182e47c 100644 --- a/View/Elements/common_header.ctp +++ b/View/Elements/common_header.ctp @@ -109,3 +109,7 @@ if (! isset($isSettingMode)) { + +Session->read('appendHtml'); +CakeSession::delete('appendHtml'); \ No newline at end of file diff --git a/View/Helper/BackToHelper.php b/View/Helper/BackToHelper.php index 3e896fc0..544f5747 100644 --- a/View/Helper/BackToHelper.php +++ b/View/Helper/BackToHelper.php @@ -74,7 +74,7 @@ public function button($title, $url, $options = array()) { if ($url) { $inputOptions = Hash::merge(array( 'class' => 'btn btn-default btn-workflow' . $sizeAttr, - 'ng-disabled' => 'sending', + 'ng-class' => '{disabled: sending}', 'ng-click' => 'sending=true', ), $options); @@ -83,7 +83,7 @@ public function button($title, $url, $options = array()) { $inputOptions = Hash::merge(array( 'type' => 'button', 'class' => 'btn btn-default btn-workflow' . $sizeAttr, - 'ng-disabled' => 'sending', + 'ng-class' => '{disabled: sending}', ), $options); return $this->Form->button($iconElement . $title, $inputOptions); diff --git a/View/Helper/ButtonHelper.php b/View/Helper/ButtonHelper.php index 96a48728..72d8a04f 100644 --- a/View/Helper/ButtonHelper.php +++ b/View/Helper/ButtonHelper.php @@ -118,7 +118,7 @@ public function delete($title, $confirm, $options = array()) { 'name' => 'delete', 'class' => 'btn btn-danger' . $this->getButtonSize(), 'onclick' => 'return confirm(\'' . $confirm . '\')', - 'ng-disabled' => 'sending' + 'ng-class' => '{disabled: sending}', ); if (isset($options['addClass'])) { @@ -166,7 +166,7 @@ public function save($title, $options = array()) { $inputOptions = Hash::merge(array( 'class' => 'btn btn-primary' . $this->getButtonSize() . ' btn-workflow', - 'ng-disabled' => 'sending', + 'ng-class' => '{disabled: sending}', 'ng-click' => 'sending=true' ), $options); $inputOptions = Hash::remove($inputOptions, 'url'); @@ -176,7 +176,7 @@ public function save($title, $options = array()) { $inputOptions = Hash::merge(array( 'name' => 'save', 'class' => 'btn btn-primary' . $this->getButtonSize() . ' btn-workflow', - 'ng-disabled' => 'sending' + 'ng-class' => '{disabled: sending}', ), $options); return $this->Form->button($title, $inputOptions);