SproutCMS

This is the code documentation for the SproutCMS project

source of /modules/HarborAndSprout/views/admin/drive_api_form.php

  1. <?php
  2. use Sprout\Helpers\Form;
  3.  
  4. Form::setData($_POST);
  5. ?>
  6.  
  7. <form action="" method="post" class="clear-group">
  8.  
  9. <div class="col col--one-half">
  10. <?php
  11. Form::nextFieldDetails('Method', true);
  12. echo Form::dropdown('method', [], ['GET' => 'GET', 'POST' => 'POST']);
  13. ?>
  14. </div>
  15.  
  16. <div class="col col--one-half">
  17. <?php
  18. Form::nextFieldDetails('Endpoint', true);
  19. echo Form::text('endpoint');
  20. ?>
  21. </div>
  22.  
  23. <div class="col col--one-half">
  24. <?php
  25. Form::nextFieldDetails('Params', false, 'JSON');
  26. echo Form::multiline('extra', ['placeholder' => '{"pageSize": 10, "fields": "nextPageToken, files(id, name)"}'])
  27. ?>
  28. </div>
  29.  
  30. <div class="col col--one-half" style="margin-top: 3em;">
  31. <button type="submit" class="button icon-after icon-send">Submit</button>
  32. <?php if (empty($connected)): ?>
  33. <a href="google-drive/auth-connect" class="button button-blue icon-after icon-vpn_key">Connect to Google Drive</a>
  34. <?php endif; ?>
  35. </div>
  36.  
  37. </form>
  38.  
  39. <pre><?= $output; ?></pre>
  40.