mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
disable self by multi create
This commit is contained in:
parent
6aced08f09
commit
a3a09182e9
@ -243,6 +243,7 @@ class TransactionCreationsController extends AppController
|
||||
$timeUsed = microtime(true) - $startTime;
|
||||
$this->set(compact('timeUsed', 'stateUsers', 'creationForm', 'possibleReceiver'));
|
||||
|
||||
$this->set('activeUser', $user);
|
||||
$this->set('creationForm', $creationForm);
|
||||
$this->set('timeUsed', microtime(true) - $startTime);
|
||||
|
||||
|
||||
@ -42,9 +42,17 @@ $this->assign('title', __('Schöpfungstransaktion'));
|
||||
<fieldset>
|
||||
<?= $this->Form->control('memo'); ?>
|
||||
<?= $this->Form->control('amount'); ?>
|
||||
<?php foreach($possibleReceiver as $possibleReceiver) : ?>
|
||||
<?php foreach($possibleReceiver as $possibleReceiver) :
|
||||
$disable = '';
|
||||
if($activeUser['id'] == $possibleReceiver['id']) {
|
||||
$disable = 'disabled';
|
||||
}
|
||||
?>
|
||||
<div class="grd_big_checkbox">
|
||||
<?= $this->Form->checkbox('user[' .$possibleReceiver['id'] . ']', ['value' => $possibleReceiver['id'], 'hiddenField' => false]); ?>
|
||||
<?= $this->Form->checkbox('user[' .$possibleReceiver['id'] . ']', ['value' => $possibleReceiver['id'], 'hiddenField' => false, $disable]); ?>
|
||||
<?php if($disable != '') : ?>
|
||||
<span style="color:grey" title="Du kannst leider nicht für dich selbst schöpfen.">
|
||||
<?php endif; ?>
|
||||
<?= $possibleReceiver['name'] ?>
|
||||
<?php if($possibleReceiver['email'] != '') : ?>
|
||||
<<?= $possibleReceiver['email'] ?>>
|
||||
@ -52,6 +60,9 @@ $this->assign('title', __('Schöpfungstransaktion'));
|
||||
<?php if($possibleReceiver['amount'] != 0) : ?>
|
||||
<span class="grd_smaller">
|
||||
In diesem Monat bereits geschöpft: <?= $this->element('printGradido', ['number' => $possibleReceiver['amount']]);?></span>
|
||||
<?php endif; ?>
|
||||
<?php if($disable != '') : ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user