SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/page_import_upload.php

  1. <?php
  2. /*
  3.  * Copyright (C) 2017 Karmabunny Pty Ltd.
  4.  *
  5.  * This file is a part of SproutCMS.
  6.  *
  7.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  8.  * of the GNU General Public License as published by the Free Software Foundation, either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * For more information, visit <http://getsproutcms.com>.
  12.  */
  13. use Sprout\Helpers\Csrf;
  14. use Sprout\Helpers\Form;
  15. use Sprout\Helpers\Itemlist;
  16. ?>
  17.  
  18. <form action="admin/call/page/importUploadAction" method="post" enctype="multipart/form-data" class="-clearfix">
  19. <?php echo Csrf::token(); ?>
  20.  
  21. <div class="mainbar-with-right-sidebar">
  22.  
  23. <div class="field-element white-box">
  24. <div class="field-label">
  25. <label for="fb1">Select file <span class="field-label__required">required</span></label>
  26. </div>
  27. <div class="field-input">
  28. <input type="file" class="upload" name="import" id="fb1">
  29. </div>
  30. </div>
  31.  
  32. <h3>Supported file types</h3>
  33.  
  34. <?php
  35. if (empty($list)):
  36. echo '<div class="info highlight-warning">No document importers installed</div>';
  37. else:
  38. echo $list;
  39. endif;
  40. ?>
  41.  
  42. </div>
  43.  
  44. <div class="right-sidebar">
  45. <div class="right-sidebar-anchor"></div>
  46. <div class="right-sidebar-inner">
  47. <div class="save-changes-box">
  48. <h2 class="icon-before icon-file_upload">Import</h2>
  49. <div class="save-changes-box-bottom -clearfix">
  50. <?php if (!empty($list)): ?>
  51. <button type="submit" class="save-changes-save-button button button-regular button-green icon-after icon-send">Upload file</button>
  52. <?php endif; ?>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57.  
  58. </form>
  59.