Reorder must use the model `getKey()` method (configurable key name) instead of harcoded `id` property.

This commit is contained in:
Jérémy Gaulin 2016-08-16 19:36:55 +04:00
parent f1bd0d33b8
commit 198230e281
1 changed files with 2 additions and 2 deletions

View File

@ -1,10 +1,10 @@
<?php foreach ($records as $record): ?>
<li data-record-id="<?= $record->id ?>" data-record-sort-order="<?= $record->sort_order ?>">
<li data-record-id="<?= $record->getKey() ?>" data-record-sort-order="<?= $record->sort_order ?>">
<div class="record">
<a href="javascript:;" class="move"></a>
<span><?= $this->reorderGetRecordName($record) ?></span>
<input name="record_ids[]" type="hidden" value="<?= $record->id ?>" />
<input name="record_ids[]" type="hidden" value="<?= $record->getKey() ?>" />
</div>
<?php if ($reorderShowTree): ?>