Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
web/core/modules/automated_cron
|
@ -34,14 +34,8 @@ function automated_cron_help($route_name, RouteMatchInterface $route_match) {
|
|||
function automated_cron_form_system_cron_settings_alter(&$form, &$form_state) {
|
||||
$automated_cron_settings = \Drupal::config('automated_cron.settings');
|
||||
|
||||
// Add automated cron settings.
|
||||
$form['automated_cron'] = [
|
||||
'#title' => t('Cron settings'),
|
||||
'#type' => 'details',
|
||||
'#open' => TRUE,
|
||||
];
|
||||
$options = [3600, 10800, 21600, 43200, 86400, 604800];
|
||||
$form['automated_cron']['interval'] = [
|
||||
$form['cron']['interval'] = [
|
||||
'#type' => 'select',
|
||||
'#title' => t('Run cron every'),
|
||||
'#description' => t('More information about setting up scheduled tasks can be found by <a href="@url">reading the cron tutorial on drupal.org</a>.', ['@url' => 'https://www.drupal.org/cron']),
|
||||
|
@ -49,13 +43,6 @@ function automated_cron_form_system_cron_settings_alter(&$form, &$form_state) {
|
|||
'#options' => [0 => t('Never')] + array_map([\Drupal::service('date.formatter'), 'formatInterval'], array_combine($options, $options)),
|
||||
];
|
||||
|
||||
$form['actions']['#type'] = 'actions';
|
||||
$form['actions']['submit'] = [
|
||||
'#type' => 'submit',
|
||||
'#value' => t('Save configuration'),
|
||||
'#button_type' => 'primary',
|
||||
];
|
||||
|
||||
// Add submit callback.
|
||||
$form['#submit'][] = 'automated_cron_settings_submit';
|
||||
|
||||
|
@ -70,5 +57,4 @@ function automated_cron_settings_submit(array $form, FormStateInterface $form_st
|
|||
\Drupal::configFactory()->getEditable('automated_cron.settings')
|
||||
->set('interval', $form_state->getValue('interval'))
|
||||
->save();
|
||||
drupal_set_message(t('The configuration options have been saved.'));
|
||||
}
|
||||
|
|
Reference in a new issue