You are here

public function UltimateCronGeneralSettings::settingsForm in Ultimate Cron 7.2

Settings form.

Overrides UltimateCronPlugin::settingsForm

File

plugins/ultimate_cron/settings/general.class.php, line 59
General settings for Ultimate Cron.

Class

UltimateCronGeneralSettings
General settings plugin class.

Code

public function settingsForm(&$form, &$form_state, $job = NULL) {
  $elements =& $form['settings'][$this->type][$this->name];
  $values =& $form_state['values']['settings'][$this->type][$this->name];
  if (!$job) {
    $elements['nodejs'] = array(
      '#type' => 'checkbox',
      '#title' => t('nodejs'),
      '#default_value' => $values['nodejs'],
      '#description' => t('Enable nodejs integration (Live reload on jobs page. Requires the nodejs module to be installed and configured).'),
      '#fallback' => TRUE,
    );
  }
  else {
    $elements['no_settings'] = array(
      '#markup' => '<p>' . t('This plugin has no settings.') . '</p>',
    );
  }
}