aboutsummaryrefslogtreecommitdiff
path: root/app/views/tag/update.phtml
blob: e0cb042f59614fa2662ef8ad5249109c645d84b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
	declare(strict_types=1);
	/** @var FreshRSS_View $this */

	if (!Minz_Request::paramBoolean('ajax')) {
		$this->partial('aside_subscription');
	}
	if ($this->tag === null) {
		throw new FreshRSS_Context_Exception('Tag not initialised!');
	}
?>
<div class="post">
	<h2>
		<?= $this->tag->name() ?>
	</h2>

	<div>
		<a href="<?= _url('index', 'index', 'get', 't_' . $this->tag->id()) ?>"><?= _i('link') ?> <?= _t('gen.action.filter') ?></a>
	</div>

	<form method="post" action="<?= _url('tag', 'update', 'id', $this->tag->id(), '#', 'slider') ?>" autocomplete="off" data-auto-leave-validation="1">
		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />

		<fieldset>
			<legend><?= _t('sub.category.information') ?></legend>
			<div class="form-group">
				<label class="group-name" for="name"><?= _t('sub.tag.name') ?></label>
				<div class="group-controls">
					<input type="text" name="name" id="name" value="<?= $this->tag->name() ?>" />
				</div>
			</div>

			<div class="form-group form-actions">
				<div class="group-controls">
					<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
					<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
				</div>
			</div>
		</fieldset>

		<fieldset>
			<legend><?= _t('sub.feed.filteractions') ?></legend>
			<div class="form-group">
				<label class="group-name" for="filteractions_label"><?= _t('sub.tag.auto_label') ?></label>
				<div class="group-controls">
					<textarea name="filteractions_label" id="filteractions_label" class="w100"><?php
						foreach ($this->tag->filtersAction('label') as $filterRead) {
							echo htmlspecialchars($filterRead->toString(expandUserQueries: false), ENT_NOQUOTES, 'UTF-8') . PHP_EOL;
						}
					?></textarea>
					<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
				</div>
			</div>
		</fieldset>

		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
				<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
			</div>
		</div>
	</form>

	<h3><?= _t('sub.title.delete_label') ?></h3>
	<form id="delete_tag" method="post" action="<?= _url('tag', 'delete', 'id_tag', $this->tag->id()) ?>">
		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-attention confirm"><?= _t('gen.action.remove') ?></button>
			</div>
		</div>
	</form>
</div>