RecoReco: config modal + metadata storage, off Skeleton (v0.2)

This commit is contained in:
2026-07-07 21:48:46 -03:00
parent 1125bda81a
commit dea624a72d
9 changed files with 170 additions and 73 deletions

View File

@@ -1 +0,0 @@
<div class="skeleton-plugin-marker">Skeleton</div>

View File

@@ -0,0 +1,38 @@
<div class="page-header">
<h2><?= t('Recurring schedule') ?></h2>
</div>
<?php $can_recur = $has_due_date && ! $is_native ?>
<?php if (! $has_due_date): ?>
<p class="alert alert-info"><?= t('Please set a due date first. RecoReco uses the card due date as the recurrence anchor.') ?></p>
<?php elseif ($is_native): ?>
<p class="alert alert-info"><?= t('This card already uses Kanboard built-in recurrence. RecoReco and native recurrence cannot be used together.') ?></p>
<?php endif ?>
<form method="post" action="<?= $this->url->href('RecurrenceController', 'save', array('plugin' => 'RecoReco', 'task_id' => $task['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Make recurring'), 'recoreco_enabled') ?>
<div class="recoreco-radios">
<label>
<input type="radio" name="recoreco_enabled" value="0" <?= $values['recoreco_enabled'] == 1 ? '' : 'checked="checked"' ?>> <?= t('No') ?>
</label>
<label>
<input type="radio" name="recoreco_enabled" value="1" <?= $values['recoreco_enabled'] == 1 ? 'checked="checked"' : '' ?> <?= $can_recur ? '' : 'disabled="disabled"' ?>> <?= t('Yes') ?>
</label>
</div>
<?= $this->form->label(t('Target column (where the copy appears)'), 'recoreco_target_column') ?>
<?= $this->form->select('recoreco_target_column', $columns_list, $values) ?>
<?= $this->form->label(t('Frequency'), 'recoreco_frequency') ?>
<?= $this->form->select('recoreco_frequency', $frequency_list, $values) ?>
<?= $this->form->checkbox('recoreco_last_day', t('Last day of the month (honored only when the due date is the last day / last weekday of its month)'), 1, $values['recoreco_last_day'] == 1) ?>
<?= $this->form->label(t('Create the copy this many days before the due date'), 'recoreco_days_before') ?>
<?= $this->form->number('recoreco_days_before', $values) ?>
<?= $this->modal->submitButtons() ?>
</form>

View File

@@ -0,0 +1,3 @@
<li>
<?= $this->modal->medium('calendar', t('Recurring schedule'), 'RecurrenceController', 'edit', array('plugin' => 'RecoReco', 'task_id' => $task['id'])) ?>
</li>