Commit c33a3185 authored by Gabriel Martinez's avatar Gabriel Martinez Committed by Damien McKenna
Browse files

Issue #3238802 by gdmartinezsandino, DamienMcKenna, Vacilando: Gatsby Preview...

Issue #3238802 by gdmartinezsandino, DamienMcKenna, Vacilando: Gatsby Preview URL(s) should not be required on settings form.
parent be185966
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ class GatsbyAdminForm extends ConfigFormBase {
      '#title' => $this->t('Gatsby Server URL'),
      '#description' => $this->t('The URL to the Gatsby server (with port number if needed). Separate multiple values with a comma.<br />For Gatsby Cloud accounts this will be a URL in the format https://example12345.gatsbyjs.io.'),
      '#default_value' => $config->get('server_url'),
      '#required' => TRUE,
      '#maxlength' => 250,
      '#weight' => 0,
    ];
@@ -110,11 +109,9 @@ class GatsbyAdminForm extends ConfigFormBase {
      '#title' => $this->t('Preview Webhook URL(s)'),
      '#description' => $this->t('The URL to the Gatsby preview build webhook (if running locally it is likely "localhost:8000/__refresh"). Separate multiple values with a comma. The full node data packet will not be transmitted.'),
      '#default_value' => $config->get('preview_callback_url'),
      '#required' => TRUE,
      '#maxlength' => 250,
      '#weight' => 0,
    ];

    $form['site_settings']['incrementalbuild_url'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Build Webhook URL(s)'),
@@ -123,6 +120,7 @@ class GatsbyAdminForm extends ConfigFormBase {
      '#maxlength' => 250,
      '#weight' => 1,
    ];

    // @todo Add validation to remove a trailing slash if one is found.
    $form['site_settings']['contentsync_url'] = [
      '#type' => 'textfield',
@@ -203,7 +201,7 @@ class GatsbyAdminForm extends ConfigFormBase {
      '#default_value' => $config->get('log_published') !== NULL ? $config->get('log_published') : FALSE,
      '#weight' => 0,
    ];
    $form['fastbuilds_preview'] = [
    $form['fastbuilds']['fastbuilds_preview'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('Integrate Cloud Preview with Fastbuilds?'),
      '#description' => $this->t('By checking this box you will trigger Fastbuilds in Gatsby Cloud preview.'),