This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

autumn
autumn

I want to load the reorder view inside a popup:

<a
    data-control="popup"
    data-handler="onShowReload"
    href="nojavascript...;"
    class="btn btn-primary btn-lg">
    Launch Reorder Form
</a>

Then I have onShowReload:

public function onLoadReorder() {
    return $this->reorderRender();
}

This gives me an error

Undefined variable: reorderToolbarWidget

I'm not sure if it's the right approach though. Any help on this?

Last updated

autumn
autumn

This has been resolved by "alxy" on the IRC chat. The AJAX handler looks like this:

public function onLoadReorder() {
    $this->reorder();
    return $this->makePartial('reorder_form');
}

Then the _reorder_form.htm partial:

<?= Form::open(['id' => 'disableForm']) ?>
<div class="modal-header">
    <button type="button" class="close" data-dismiss="popup">&times;</button>
    <h4 class="modal-title">Reorder</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">
</div>
<?= Form::close() ?>

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.