Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,18 @@ class="bca-text-url" target="_blank" data-toggle="tooltip" data-placement="top"
]) ?>
</div>
<div class="bca-actions__sub">
<?php
$displayValue = $entity->{$entity->custom_table->display_field} ?? '';
if (is_array($displayValue) || (is_object($displayValue) && !($displayValue instanceof \Stringable))) {
$displayValue = (string) $entity->id;
} else {
$displayValue = (string) $displayValue;
}
Comment thread
kaburk marked this conversation as resolved.
?>
<?php echo $this->BcAdminForm->postLink(__d('baser_core', '削除'),
['action' => 'delete', $tableId, $entity->id], [
'block' => true,
'confirm' => __d('baser_core', '{0} を本当に削除してもいいですか?', $entity->{$entity->custom_table->display_field}),
'confirm' => __d('baser_core', '{0} を本当に削除してもいいですか?', $displayValue),
'class' => 'bca-btn bca-actions__item',
'data-bca-btn-type' => 'delete',
'data-bca-btn-size' => 'sm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*/
if (empty($customLink->children)) return;
// 空の場合の対策(既にデータを持っていて、ループに対応していないフィールドタイプに変更した場合など
echo $this->BcAdminForm->hidden($customLink->name, ['value' => ''])
echo $this->BcAdminForm->hidden($customLink->name, ['value' => '']);
$this->BcAdminForm->unlockField($customLink->name);
?>


Expand Down Expand Up @@ -112,7 +113,6 @@
]) ?>
</td>
</tr>
<?php $this->BcAdminForm->unlockField("{$customLink->name}") ?>
<?php $this->BcAdminForm->unlockField("{$customLink->name}.__loop-src__.{$child->name}") ?>
<?php endforeach ?>
</table>
Expand Down
Loading