Skip to content

Instantly share code, notes, and snippets.

@alxy
Created December 7, 2016 10:30
Show Gist options
  • Save alxy/248b5005f3281f37f43ef74ffb395c1a to your computer and use it in GitHub Desktop.
Save alxy/248b5005f3281f37f43ef74ffb395c1a to your computer and use it in GitHub Desktop.
<a
class="btn btn-default oc-icon-sitemap"
data-control="popup"
data-handler="onShowReorderPopup"
href="javascript:;"
>
Reorder Categories
</a>
<?= Form::open(['id' => 'disableForm']) ?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Reorder Categories</h4>
</div>
<div class="modal-body">
<?php if ($this->fatalError): ?>
<p class="flash-message static error"><?= $fatalError ?></p>
<?php endif ?>
<div class="form">
<?= $this->reorderRender() ?>
</div>
</div>
<div class="modal-footer">
<button
type="submit"
class="btn btn-primary"
data-request="onRefreshList"
data-dismiss="popup"
data-stripe-load-indicator
>
Save
</button>
<button
type="button"
class="btn btn-default"
data-dismiss="popup">
Close
</button>
</div>
<?= Form::close() ?>
/**
* Renders the reorder popup
*
* @param null $recordId
* @return mixed
* @throws \SystemException
*/
public function index_onShowReorderPopup($recordId = null) {
$this->reorder();
return $this->makePartial('reorder_form');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment