Accept whole days only for the studio cancellation cutoff
CI / Tests (PHP 8.2) (pull_request) Successful in 38s
CI / Tests (PHP 8.1) (pull_request) Successful in 49s
CI / No Debug Code (pull_request) Successful in 2s
CI / PHPStan (pull_request) Successful in 2m54s
CI / Coding Standards (pull_request) Successful in 3m2s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m40s
CI / Build Plugin Zip (pull_request) Skipped
CI / Tests (PHP 8.2) (pull_request) Successful in 38s
CI / Tests (PHP 8.1) (pull_request) Successful in 49s
CI / No Debug Code (pull_request) Successful in 2s
CI / PHPStan (pull_request) Successful in 2m54s
CI / Coding Standards (pull_request) Successful in 3m2s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m40s
CI / Build Plugin Zip (pull_request) Skipped
The Studio Settings cutoff field now takes an integer number of days (step 1, coerced with Val::int) instead of allowing half-day fractions, and displays the stored hours rounded to whole days. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
@@ -16,7 +16,7 @@ if (! defined('ABSPATH')) {
|
||||
* @var float $hstRate
|
||||
* @var bool $stripeConfigured
|
||||
* @var bool $openRegistration
|
||||
* @var float $cancellationCutoffDays
|
||||
* @var int $cancellationCutoffDays
|
||||
*/
|
||||
?>
|
||||
<div class="wrap">
|
||||
@@ -96,7 +96,7 @@ if (! defined('ABSPATH')) {
|
||||
<tr>
|
||||
<th><label for="cancellation_cutoff_days"><?php esc_html_e('Cancellation cutoff (days)', 'unsupervised-schedular'); ?></label></th>
|
||||
<td>
|
||||
<input type="number" name="cancellation_cutoff_days" id="cancellation_cutoff_days" class="small-text" min="0" step="0.5" value="<?php echo esc_attr(rtrim(rtrim(number_format($cancellationCutoffDays, 2, '.', ''), '0'), '.')); ?>">
|
||||
<input type="number" name="cancellation_cutoff_days" id="cancellation_cutoff_days" class="small-text" min="0" step="1" value="<?php echo esc_attr((string) $cancellationCutoffDays); ?>">
|
||||
<p class="description"><?php esc_html_e('How far ahead of a lesson a student may still cancel it. Within this window only an instructor can cancel. 0 lets students cancel any time. An offering can override this with its own value.', 'unsupervised-schedular'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user