SproutCMS

This is the code documentation for the SproutCMS project

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

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Form;
  4.  
  5.  
  6. ?>
  7.  
  8.  
  9. <h2 class="icon-before icon-save">Save changes</h2>
  10.  
  11. <?php
  12. Form::nextFieldDetails('Publish options', true);
  13. echo Form::dropdown('status', ['-dropdown-top' => '', '-wrapper-class' => 'white', 'id' => "publish-options"], [
  14. 'live' => 'Publish changes now',
  15. 'wip' => 'Save as work in progress',
  16. 'need_approval' => 'Request approval for publishing',
  17. 'auto_launch' => 'Auto-publish at future date',
  18. ]);
  19. ?>
  20.  
  21. <div class="save-option" id="opts-autolaunch">
  22. <?php
  23. Form::nextFieldDetails('Publish date', false);
  24. echo Form::datepicker('date_launch', ['-wrapper-class' => 'small white']);
  25. ?>
  26. </div>
  27.  
  28. <div class="save-option" id="opts-need-check">
  29. <?php
  30. Form::nextFieldDetails('Request approval by', true);
  31. echo Form::dropdown('approval_operator_id', ['-dropdown-top' => 'Select a user', '-wrapper-class' => 'small white'], $approval_admins);
  32. ?>
  33. </div>
  34.  
  35. <?php
  36. Form::nextFieldDetails('Describe your changes', false);
  37. echo Form::multiline('changes_made', ['-wrapper-class' => 'small white', 'rows' => '3']);
  38. ?>
  39.  
  40. <?php
  41. Form::nextFieldDetails('Visibility', false);
  42. echo Form::checkboxBoolList(null, ['-wrapper-class' => 'white'], [
  43. 'active' => 'Active',
  44. 'show_in_nav' => 'Show in menu and search results',
  45. ]);
  46. ?>
  47.  
  48. <?php if ($allow_delete): ?>
  49. <p><a class="save-changes-delete icon-link-button icon-before icon-delete" href="admin/delete/page/<?= $id; ?>">Delete page</a></p>
  50. <?php endif; ?>
  51.  
  52. <?php if ($type != 'standard'): ?>
  53. <p><a href="admin/edit/page/<?= $id; ?>?type=standard" class="icon-link-button icon-before icon-settings">Change to standard page</a></p>
  54. <?php endif; ?>
  55. <?php if ($type != 'tool'): ?>
  56. <p><a href="admin/edit/page/<?= $id; ?>?type=tool" class="icon-link-button icon-before icon-settings">Change to tool page</a></p>
  57. <?php endif; ?>
  58. <?php if ($type != 'redirect'): ?>
  59. <p><a href="admin/edit/page/<?= $id; ?>?type=redirect" class="icon-link-button icon-before icon-settings">Change to a redirect</a></p>
  60. <?php endif; ?>
  61.  
  62. <div class="save-changes-box-bottom -clearfix">
  63. <a class="save-changes-preview-button button button-regular button-blue icon-after icon-remove_red_eye" href="<?php echo Enc::html($preview_url); ?>">Preview</a>
  64. <button class="save-changes-save-button button button-regular button-green icon-after icon-save" type="submit">Save changes</button>
  65. </div>