update.phtml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. declare(strict_types=1);
  3. /** @var FreshRSS_View $this */
  4. if (!Minz_Request::paramBoolean('ajax')) {
  5. $this->partial('aside_subscription');
  6. }
  7. if ($this->tag === null) {
  8. throw new FreshRSS_Context_Exception('Tag not initialised!');
  9. }
  10. ?>
  11. <div class="post">
  12. <h2>
  13. <?= $this->tag->name() ?>
  14. </h2>
  15. <div>
  16. <a href="<?= _url('index', 'index', 'get', 't_' . $this->tag->id()) ?>"><?= _i('link') ?> <?= _t('gen.action.filter') ?></a>
  17. </div>
  18. <form method="post" action="<?= _url('tag', 'update', 'id', $this->tag->id(), '#', 'slider') ?>" autocomplete="off">
  19. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  20. <legend><?= _t('sub.category.information') ?></legend>
  21. <div class="form-group">
  22. <label class="group-name" for="name"><?= _t('sub.tag.name') ?></label>
  23. <div class="group-controls">
  24. <input type="text" name="name" id="name" value="<?= $this->tag->name() ?>" />
  25. </div>
  26. </div>
  27. <div class="form-group form-actions">
  28. <div class="group-controls">
  29. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  30. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  31. </div>
  32. </div>
  33. <legend><?= _t('sub.feed.filteractions') ?></legend>
  34. <div class="form-group">
  35. <label class="group-name" for="filteractions_label"><?= _t('sub.tag.auto_label') ?></label>
  36. <div class="group-controls">
  37. <textarea name="filteractions_label" id="filteractions_label" class="w100"><?php
  38. foreach ($this->tag->filtersAction('label') as $filterRead) {
  39. echo $filterRead->getRawInput(), PHP_EOL;
  40. }
  41. ?></textarea>
  42. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
  43. </div>
  44. </div>
  45. <div class="form-group form-actions">
  46. <div class="group-controls">
  47. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  48. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  49. </div>
  50. </div>
  51. </form>
  52. <h2><?= _t('sub.title.delete_label') ?></h2>
  53. <form id="delete_tag" method="post" action="<?= _url('tag', 'delete', 'id_tag', $this->tag->id()) ?>">
  54. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  55. <div class="form-group form-actions">
  56. <div class="group-controls">
  57. <button type="submit" class="btn btn-attention confirm"><?= _t('gen.action.remove') ?></button>
  58. </div>
  59. </div>
  60. </form>
  61. </div>