SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/link_checker.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. Form::setData(['send_to' => 'admins', 'email' => $email]);
  22. ?>
  23.  
  24.  
  25. <script>
  26. $(document).ready(function() {
  27. $('#main-form input[name=send_to]').change(function() {
  28. $('#main-form .group').hide();
  29. $('#main-form .group-' + $(this).val()).show();
  30. });
  31. });
  32. </script>
  33.  
  34.  
  35. <form action="SITE/admin/call/page/linkCheckerAction" method="post" id="main-form">
  36. <?= Csrf::token(); ?>
  37.  
  38. <?php
  39. Form::nextFieldDetails('Send to', true);
  40. echo Form::multiradio('send_to', [], [
  41. 'admins' => 'All administrators',
  42. 'specific' => 'A specific email address'
  43. ]);
  44. ?>
  45.  
  46. <div class="group group-admins">
  47. <?php
  48. if (empty($ops)) {
  49. echo '<div class="info">There are no users specified to receive email reports. ';
  50. echo 'Configure users in the <a href="admin/intro/operator">operators</a> section of the admin.</div>';
  51.  
  52. } else {
  53. echo '<ul>';
  54. foreach ($ops as $row) {
  55. if (!$row['email']) continue;
  56. echo '<li>', Enc::html($row['name']), ' (', Enc::html($row['email']), ')</li>';
  57. }
  58. echo '</ul>';
  59. }
  60. ?>
  61. </div>
  62.  
  63. <div class="group group-specific" style="display: none;">
  64. <?php Form::nextFieldDetails('Email address', true); ?>
  65. <?= Form::text('email'); ?>
  66. </div>
  67.  
  68.  
  69. <div class="action-bar">
  70. <button type="submit" name="submit" class="button icon-after icon-send">Start link checker</button>
  71. </div>
  72. </form>
  73.