update.phtml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. <fieldset>
  21. <legend><?= _t('sub.category.information') ?></legend>
  22. <div class="form-group">
  23. <label class="group-name" for="name"><?= _t('sub.tag.name') ?></label>
  24. <div class="group-controls">
  25. <input type="text" name="name" id="name" value="<?= $this->tag->name() ?>" />
  26. </div>
  27. </div>
  28. <div class="form-group form-actions">
  29. <div class="group-controls">
  30. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  31. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  32. </div>
  33. </div>
  34. </fieldset>
  35. <fieldset>
  36. <legend><?= _t('sub.feed.filteractions') ?></legend>
  37. <div class="form-group">
  38. <label class="group-name" for="filteractions_label"><?= _t('sub.tag.auto_label') ?></label>
  39. <div class="group-controls">
  40. <textarea name="filteractions_label" id="filteractions_label" class="w100"><?php
  41. foreach ($this->tag->filtersAction('label') as $filterRead) {
  42. echo $filterRead->getRawInput(), PHP_EOL;
  43. }
  44. ?></textarea>
  45. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
  46. </div>
  47. </div>
  48. </fieldset>
  49. <div class="form-group form-actions">
  50. <div class="group-controls">
  51. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  52. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  53. </div>
  54. </div>
  55. </form>
  56. <h2><?= _t('sub.title.delete_label') ?></h2>
  57. <form id="delete_tag" method="post" action="<?= _url('tag', 'delete', 'id_tag', $this->tag->id()) ?>">
  58. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  59. <div class="form-group form-actions">
  60. <div class="group-controls">
  61. <button type="submit" class="btn btn-attention confirm"><?= _t('gen.action.remove') ?></button>
  62. </div>
  63. </div>
  64. </form>
  65. </div>