2015-01-21 08:47:38 +00:00
|
|
|
<?php if ($relationViewMode == 'single'): ?>
|
|
|
|
|
<button
|
2016-04-20 18:52:21 +00:00
|
|
|
class="btn btn-sm btn-secondary oc-icon-trash-o"
|
2015-01-21 08:47:38 +00:00
|
|
|
data-request="onRelationButtonDelete"
|
|
|
|
|
data-request-confirm="<?= e(trans('backend::lang.relation.delete_confirm')) ?>"
|
2018-12-03 16:08:00 +00:00
|
|
|
data-request-success="$.oc.relationBehavior.changed('<?= e($this->vars['relationField']) ?>', 'deleted')"
|
2015-01-21 08:47:38 +00:00
|
|
|
data-stripe-load-indicator>
|
2020-03-27 18:56:07 +00:00
|
|
|
<?= e(trans($text)) ?>
|
2015-01-21 08:47:38 +00:00
|
|
|
</button>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<button
|
2016-04-20 18:52:21 +00:00
|
|
|
class="btn btn-sm btn-secondary oc-icon-trash-o"
|
2015-01-21 08:47:38 +00:00
|
|
|
onclick="$(this).data('request-data', {
|
|
|
|
|
checked: $('#<?= $this->relationGetId('view') ?> .control-list').listWidget('getChecked')
|
|
|
|
|
})"
|
|
|
|
|
disabled="disabled"
|
|
|
|
|
data-request="onRelationButtonDelete"
|
|
|
|
|
data-request-confirm="<?= e(trans('backend::lang.relation.delete_confirm')) ?>"
|
2018-12-03 16:08:00 +00:00
|
|
|
data-request-success="$.oc.relationBehavior.changed('<?= e($this->vars['relationField']) ?>', 'deleted')"
|
2015-02-17 09:58:38 +00:00
|
|
|
data-trigger-action="enable"
|
2015-01-21 08:47:38 +00:00
|
|
|
data-trigger="#<?= $this->relationGetId('view') ?> .control-list input[type=checkbox]"
|
|
|
|
|
data-trigger-condition="checked"
|
|
|
|
|
data-stripe-load-indicator>
|
2020-03-27 18:56:07 +00:00
|
|
|
<?= e(trans($text)) ?>
|
2015-01-21 08:47:38 +00:00
|
|
|
</button>
|
2020-03-27 18:56:07 +00:00
|
|
|
<?php endif ?>
|