Skip to content

Commit

Permalink
Restores the delete button for events
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed May 20, 2024
1 parent 440ba40 commit 9fb1681
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Languages/en_US/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
$txt['calendar_repeat_adjustment_label'] = 'Apply changes to';
$txt['calendar_repeat_adjustment_this_only'] = 'Only this occurrence';
$txt['calendar_repeat_adjustment_this_and_future'] = 'This and future occurrences';
$txt['calendar_repeat_adjustment_confirm'] = 'Are you sure you want to apply these changes to all future occurrences?-n--n-WARNING: if you select both &quot;Delete&quot; and &quot;This and future occurrences&quot;, you will delete this and all future occurrences.';
$txt['calendar_repeat_adjustment_confirm'] = 'Are you sure you want to apply these changes to all future occurrences?-n--n-WARNING: if you select &quot;This and future occurrences&quot; and the click the &quot;Delete&quot; button, you will delete this and all future occurrences.';
$txt['calendar_repeat_delete_label'] = 'Delete';
$txt['calendar_confirm_occurrence_delete'] = 'Are you sure you want to delete this occurrence of the event?-n--n-WARNING: if you select both &quot;Delete&quot; and &quot;This and future occurrences&quot;, you will delete this and all future occurrences.';
$txt['calendar_confirm_occurrence_delete'] = 'Are you sure you want to delete this occurrence of the event?-n--n-WARNING: if you selected &quot;This and future occurrences&quot; above, you will delete this and all future occurrences.';
$txt['calendar_repeat_adjustment_edit_first'] = 'Edit original event';

// Used to show a human-readable explanation of the recurrence rule for a repeating event.
Expand Down
14 changes: 13 additions & 1 deletion Themes/default/Calendar.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,19 @@ function template_event_post()

echo '
<div class="buttonlist">
<input type="submit" value="', empty(Utils::$context['event']->new) ? Lang::$txt['save'] : Lang::$txt['post'], '" class="button floatright">
<input type="submit" value="', empty(Utils::$context['event']->new) ? Lang::$txt['save'] : Lang::$txt['post'], '" class="button floatright">';

if (!Utils::$context['event']->new) {
echo '
<input type="submit" name="deleteevent" value="', Lang::$txt['calendar_repeat_delete_label'], '" class="button floatright you_sure" data-confirm="', Utils::$context['event']->selected_occurrence->is_first ? Lang::$txt['calendar_confirm_delete'] : Lang::$txt['calendar_confirm_occurrence_delete'], '">';

if (!Utils::$context['event']->selected_occurrence->is_first) {
echo '
<a href="', Utils::$context['event']->modify_href, '" class="button floatright">', Lang::$txt['calendar_repeat_adjustment_edit_first'], '</a>';
}
}

echo '
</div>
<input type="hidden" name="', Utils::$context['session_var'], '" value="', Utils::$context['session_id'], '">
</div><!-- .roundframe -->
Expand Down
15 changes: 0 additions & 15 deletions Themes/default/EventEditor.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,6 @@ function template_occurrence_options()
if (Utils::$context['event']->selected_occurrence->can_affect_future) {
echo '
<dl id="occurrence_options">
<dt class="clear">
<label for="deleteevent">', Lang::$txt['calendar_repeat_delete_label'], '</label>
</dt>
<dd>
<input type="checkbox" name="deleteevent" id="deleteevent" class="you_sure" data-confirm="' . Lang::$txt['calendar_confirm_occurrence_delete'] . '">
</dd>
<dt class="clear">
', Lang::$txt['calendar_repeat_adjustment_label'], '
</dt>
Expand All @@ -321,14 +314,6 @@ function template_occurrence_options()
</dd>
</dl>';
}

echo '
<dl>
<dt class="clear"></dt>
<dd>
<a href="', Utils::$context['event']->modify_href, '" class="smalltext bbc_link">', Lang::$txt['calendar_repeat_adjustment_edit_first'], '</a>
</dd>
</dl>';
}

/**
Expand Down

0 comments on commit 9fb1681

Please sign in to comment.