Merge pull request #13818 from nextcloud/design/backgroundjobs-accessibility

Contain background jobs options in fieldset to improve accessibility
This commit is contained in:
Morris Jobke 2019-01-28 12:20:29 +01:00 committed by GitHub
commit fdd81e6c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,41 +55,46 @@
href="<?php p(link_to_docs('admin-background-jobs')); ?>"></a> href="<?php p(link_to_docs('admin-background-jobs')); ?>"></a>
<p class="settings-hint"><?php p($l->t('For optimal performance it\'s important to configure background jobs correctly. For bigger instances \'Cron\' is the recommended setting. Please see the documentation for more information.'));?></p> <p class="settings-hint"><?php p($l->t('For optimal performance it\'s important to configure background jobs correctly. For bigger instances \'Cron\' is the recommended setting. Please see the documentation for more information.'));?></p>
<p> <form action="#">
<input type="radio" name="mode" value="ajax" class="radio" <fieldset>
id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { <legend class="hidden-visually"><?php p($l->t('Pick background job setting'));?></legend>
print_unescaped('checked="checked"'); <p>
} ?>> <input type="radio" name="mode" value="ajax" class="radio"
<label for="backgroundjobs_ajax">AJAX</label><br/> id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") {
<em><?php p($l->t("Execute one task with each page loaded")); ?></em> print_unescaped('checked="checked"');
</p> } ?>>
<p> <label for="backgroundjobs_ajax">AJAX</label><br/>
<input type="radio" name="mode" value="webcron" class="radio" <em><?php p($l->t("Execute one task with each page loaded")); ?></em>
id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") { </p>
print_unescaped('checked="checked"'); <p>
} ?>> <input type="radio" name="mode" value="webcron" class="radio"
<label for="backgroundjobs_webcron">Webcron</label><br/> id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") {
<em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 15 minutes over HTTP.")); ?></em> print_unescaped('checked="checked"');
</p> } ?>>
<p> <label for="backgroundjobs_webcron">Webcron</label><br/>
<input type="radio" name="mode" value="cron" class="radio" <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 15 minutes over HTTP.")); ?></em>
id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") { </p>
print_unescaped('checked="checked"'); <p>
} <input type="radio" name="mode" value="cron" class="radio"
if (!$_['cli_based_cron_possible']) { id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") {
print_unescaped('disabled'); print_unescaped('checked="checked"');
}?>> }
<label for="backgroundjobs_cron">Cron</label><br/> if (!$_['cli_based_cron_possible']) {
<em><?php p($l->t("Use system cron service to call the cron.php file every 15 minutes.")); ?> print_unescaped('disabled');
<?php if($_['cli_based_cron_possible']) { }?>>
p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); <label for="backgroundjobs_cron">Cron</label><br/>
} else { <em><?php p($l->t("Use system cron service to call the cron.php file every 15 minutes.")); ?>
print_unescaped(str_replace( <?php if($_['cli_based_cron_possible']) {
['{linkstart}', '{linkend}'], p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']]));
['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'], } else {
$l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') print_unescaped(str_replace(
)); ['{linkstart}', '{linkend}'],
} ?></em> ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'],
$l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.')
));
} ?></em>
</p> </p>
</div> </fieldset>
</form>
</div>