SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/page_approval_form.php

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2015 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 3 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16. use Sprout\Helpers\Csrf;
  17. use Sprout\Helpers\Enc;
  18. use Sprout\Helpers\Form;
  19.  
  20.  
  21. // This form is displayed at the top of a page which is being reviewed as part of the
  22. // page approval process.
  23. ?>
  24.  
  25.  
  26. <style type="text/css">
  27. #page-rev-approval-form {
  28. padding: 40px;
  29. margin: 20px 0 30px;
  30. border: 1px solid #CED2DC;
  31. border-radius: 5px;
  32. background-color: #EEF0F3;
  33. }
  34. </style>
  35.  
  36.  
  37. <div id="page-rev-approval-form">
  38. <h1 class="page-rev-approval-form-title">Please approve or reject this revision</h1>
  39.  
  40. <form method="post" action="page/review/<?= (int)$rev_id; ?>">
  41. <?php echo Csrf::token(); ?>
  42.  
  43. <input type="hidden" name="code" value="<?= Enc::html($code); ?>">
  44.  
  45. <div class="field-elements-inline">
  46. <?php
  47. Form::nextFieldDetails('Message', false);
  48. echo Form::text('message', ['-wrapper-class' => 'white new-category large', 'placeholder' => 'Enter a message', 'id' => 'approval-form-message']);
  49. ?>
  50.  
  51. <div class="field-element field-element--button">
  52. <button name="do" value="approve" type="submit" class="button button-large button-green">Approve</button>
  53. </div>
  54.  
  55. <div class="field-element field-element--button">
  56. <button name="do" value="reject" type="submit" class="button button-large button-red">Reject</button>
  57. </div>
  58. </div>
  59. </form>
  60. </div>
  61.