SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/categories_multi_categorise.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.  
  17. use Sprout\Helpers\Csrf;
  18. use Sprout\Helpers\Admin;
  19. use Sprout\Helpers\Form;
  20.  
  21.  
  22.  
  23. if (empty($data['mode'])) {
  24. $data['mode'] = 'add';
  25. }
  26. Form::setData($data);
  27. ?>
  28.  
  29.  
  30. <form action="SITE/admin/call/<?php echo $controller_name; ?>/postMultiCategorise" method="post" id="main-form">
  31. <?= Csrf::token(); ?>
  32. <?php foreach ($ids as $id): ?>
  33. <input type="hidden" name="ids[]" value="<?php echo (int)$id; ?>">
  34. <?php endforeach; ?>
  35.  
  36.  
  37. <h3>Records to categorise</h3>
  38. <?php echo $itemlist; ?>
  39.  
  40.  
  41. <h3>Options</h3>
  42. <?php
  43. Admin::categorySelection('categories[]', $cats, []);
  44. ?>
  45.  
  46.  
  47. <?php
  48. Form::nextFieldDetails('Recategorisation mode', true);
  49. echo Form::multiradio('mode', [], [
  50. 'add' => 'Add the specified categories',
  51. 'mod' => 'Replace the existing categories with the specified categories',
  52. ]);
  53. ?>
  54.  
  55.  
  56. <div class="action-bar">
  57. <button type="submit" class="button button-regular button-green icon-after icon-save">Save changes</button>
  58. </div>
  59. </form>
  60.  
  61.  
  62.