aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/calendar/date.php2
-rw-r--r--app/views/calendar/date/index.php8
2 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/calendar/date.php b/app/controllers/calendar/date.php
index 8b8435e..32cf99c 100644
--- a/app/controllers/calendar/date.php
+++ b/app/controllers/calendar/date.php
@@ -130,6 +130,7 @@ class Calendar_DateController extends AuthenticatedController
['calendar_date_id' => $this->date->id]
);
$this->participation_message = null;
+ $this->user_participation_status = '';
$this->all_assignments_writable = false;
$this->is_group_date = count($this->calendar_assignments) > 1;
@@ -140,6 +141,7 @@ class Calendar_DateController extends AuthenticatedController
//according to the participation status.
foreach ($this->calendar_assignments as $index => $assignment) {
if ($assignment->range_id === $GLOBALS['user']->id && $this->is_group_date) {
+ $this->user_participation_status = $assignment->participation;
if ($assignment->participation === 'ACCEPTED') {
$this->participation_message = MessageBox::info(_('Sie nehmen am Termin teil.'));
} elseif ($assignment->participation === 'DECLINED') {
diff --git a/app/views/calendar/date/index.php b/app/views/calendar/date/index.php
index 198fe4c..faec7c7 100644
--- a/app/views/calendar/date/index.php
+++ b/app/views/calendar/date/index.php
@@ -7,28 +7,28 @@
action="<?= $controller->link_for('calendar/date/participation/' . $date->id) ?>">
<?= CSRFProtection::tokenTag() ?>
<fieldset>
- <? if ($calendar_assignment->participation) : ?>
+ <? if ($user_participation_status) : ?>
<label>
<input type="radio" name="participation" value=""
data-activates="button[name='update_participation']">
<?= _('Abwartend') ?>
</label>
<? endif ?>
- <? if ($calendar_assignment->participation !== 'ACCEPTED') : ?>
+ <? if ($user_participation_status !== 'ACCEPTED') : ?>
<label>
<input type="radio" name="participation" value="ACCEPTED"
data-activates="button[name='update_participation']">
<?= _('Angenommen') ?>
</label>
<? endif ?>
- <? if ($calendar_assignment->participation !== 'DECLINED') : ?>
+ <? if ($user_participation_status !== 'DECLINED') : ?>
<label>
<input type="radio" name="participation" value="DECLINED"
data-activates="button[name='update_participation']">
<?= _('Abgelehnt') ?>
</label>
<? endif ?>
- <? if ($calendar_assignment->participation !== 'ACKNOWLEDGED') : ?>
+ <? if ($user_participation_status !== 'ACKNOWLEDGED') : ?>
<label>
<input type="radio" name="participation" value="ACKNOWLEDGED"
data-activates="button[name='update_participation']">