inline "x of y" recurrence limit fields; Follow-FinanceBuddy governs the stop (v1.6.2)
This commit is contained in:
@@ -63,26 +63,29 @@
|
||||
<p class="form-help"><?= t('Links each copy back to the template (a count and quick navigation). Off by default.') ?></p>
|
||||
|
||||
<?php $following = $fb_enabled && $values['recoreco_follow_finance'] == 1 ?>
|
||||
<?php $limit_display = (int) $values['recoreco_limit'] > 0 ? (int) $values['recoreco_limit'] : '' ?>
|
||||
<div class="recoreco-limit-group"
|
||||
data-fb-current="<?= $this->text->e($fb_current === '' ? '1' : $fb_current) ?>"
|
||||
data-fb-total="<?= $this->text->e($fb_total === '' ? '0' : $fb_total) ?>"
|
||||
data-fb-current="<?= $this->text->e($fb_current) ?>"
|
||||
data-fb-total="<?= $this->text->e($fb_total) ?>"
|
||||
data-rr-count="<?= (int) $values['recoreco_count'] ?>"
|
||||
data-rr-limit="<?= (int) $values['recoreco_limit'] ?>">
|
||||
data-rr-limit="<?= $this->text->e($limit_display) ?>">
|
||||
|
||||
<?php if ($fb_enabled): ?>
|
||||
<?= $this->form->checkbox('recoreco_follow_finance', t('Follow FinanceBuddy installments'), 1, $following) ?>
|
||||
<p class="form-help"><?= t('Stop recurring when the installment plan ends, following the card total and current installment.') ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->form->label(t('Current recurrence'), 'recoreco_count') ?>
|
||||
<input type="number" name="recoreco_count" min="1"
|
||||
value="<?= $this->text->e($following ? ($fb_current === '' ? '1' : $fb_current) : $values['recoreco_count']) ?>"
|
||||
<?= $following ? 'disabled="disabled"' : '' ?>>
|
||||
|
||||
<?= $this->form->label(t('Stop after this many recurrences (0 = never)'), 'recoreco_limit') ?>
|
||||
<input type="number" name="recoreco_limit" min="0"
|
||||
value="<?= $this->text->e($following ? ($fb_total === '' ? '0' : $fb_total) : $values['recoreco_limit']) ?>"
|
||||
<?= $following ? 'disabled="disabled"' : '' ?>>
|
||||
<?= $this->form->label(t('Recurrence'), 'recoreco_count') ?>
|
||||
<div class="recoreco-limit-inline" style="display:flex; align-items:center; gap:6px;">
|
||||
<input type="number" name="recoreco_count" min="1" style="width:5em;"
|
||||
value="<?= $this->text->e($following ? $fb_current : $values['recoreco_count']) ?>"
|
||||
<?= $following ? 'disabled="disabled"' : '' ?>>
|
||||
<span><?= t('of') ?></span>
|
||||
<input type="number" name="recoreco_limit" min="1" style="width:5em;"
|
||||
value="<?= $this->text->e($following ? $fb_total : $limit_display) ?>"
|
||||
<?= $following ? 'disabled="disabled"' : '' ?>>
|
||||
</div>
|
||||
<p class="form-help"><?= t('Current recurrence and how many to run. Leave the second box empty to recur forever.') ?></p>
|
||||
</div>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
|
||||
Reference in New Issue
Block a user