Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Controller/Component/NetCommonsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
4 changes: 4 additions & 0 deletions View/Elements/common_header.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ if (! isset($isSettingMode)) {
</div>
</nav>
</header>

<?php
echo $this->Session->read('appendHtml');
CakeSession::delete('appendHtml');
4 changes: 2 additions & 2 deletions View/Helper/BackToHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions View/Helper/ButtonHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down Expand Up @@ -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');
Expand All @@ -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);
Expand Down