You are here

function fastly_vcl_upload_form in Fastly 7.2

New VCL upload form

1 string reference to 'fastly_vcl_upload_form'
fastly_menu in ./fastly.module
Implements hook_menu().

File

./fastly.admin.inc, line 519
Administrative forms for Fastly module.

Code

function fastly_vcl_upload_form($form, &$form_state) {
  $form['vcl'] = array(
    '#type' => 'fieldset',
    '#title' => t('VCL Upload'),
    '#description' => t('Upload Fastly VCL snippets that improve cacheability of the site. Not required but highly recommended.'),
  );
  $form['vcl']['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Upload VCL'),
    '#attributes' => array(
      'onclick' => 'if(!confirm("Are you sure you want to upload VCL snippets?")){return false;}',
    ),
  );
  $form['vcl']['actions']['activate'] = array(
    '#type' => 'checkbox',
    '#default_value' => 1,
    '#title' => t('Activate version'),
  );
  return $form;
}