update.phtml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <div class="post">
  2. <h1><?= $this->feed->name() ?></h1>
  3. <div>
  4. <a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"><?= _i('link') ?> <?= _t('gen.action.filter') ?></a>
  5. <?= _t('gen.short.or') ?>
  6. <a href="<?= _url('stats', 'repartition', 'id', $this->feed->id()) ?>"><?= _i('stats') ?> <?= _t('sub.feed.stats') ?></a>
  7. </div>
  8. <p><?= sanitizeHTML($this->feed->description()) ?></p>
  9. <?php $nbEntries = $this->feed->nbEntries(); ?>
  10. <?php if ($this->feed->inError()) { ?>
  11. <p class="alert alert-error"><span class="alert-head"><?= _t('gen.short.damn') ?></span> <?= _t('sub.feed.error') ?></p>
  12. <?php } elseif ($nbEntries === 0) { ?>
  13. <p class="alert alert-warn"><?= _t('sub.feed.empty') ?></p>
  14. <?php } ?>
  15. <form method="post" action="<?= _url('subscription', 'feed', 'id', $this->feed->id()) ?>" autocomplete="off">
  16. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  17. <legend><?= _t('sub.feed.information') ?></legend>
  18. <div class="form-group">
  19. <label class="group-name" for="name"><?= _t('sub.feed.title') ?></label>
  20. <div class="group-controls">
  21. <input type="text" name="name" id="name" class="extend" value="<?= $this->feed->name() ?>" />
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="group-name" for="description"><?= _t('sub.feed.description') ?></label>
  26. <div class="group-controls">
  27. <textarea name="description" id="description"><?= htmlspecialchars($this->feed->description(), ENT_NOQUOTES, 'UTF-8') ?></textarea>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="group-name" for="website"><?= _t('sub.feed.website') ?></label>
  32. <div class="group-controls">
  33. <div class="stick">
  34. <input type="text" name="website" id="website" class="extend" value="<?= $this->feed->website() ?>" />
  35. <a class="btn" target="_blank" rel="noreferrer" href="<?= $this->feed->website() ?>"><?= _i('link') ?></a>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="group-name" for="url"><?= _t('sub.feed.url') ?></label>
  41. <div class="group-controls">
  42. <div class="stick">
  43. <input type="text" name="url" id="url" class="extend" value="<?= $this->feed->url() ?>" />
  44. <a class="btn" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>"><?= _i('link') ?></a>
  45. </div>
  46. <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?=
  47. rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label class="group-name" for="category"><?= _t('sub.category') ?></label>
  52. <div class="group-controls">
  53. <select name="category" id="category">
  54. <?php foreach ($this->categories as $cat) { ?>
  55. <option value="<?= $cat->id() ?>"<?= $cat->id() == $this->feed->category() ? ' selected="selected"' : '' ?>>
  56. <?= $cat->name() ?>
  57. </option>
  58. <?php } ?>
  59. </select>
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label class="group-name" for="priority"><?= _t('sub.feed.priority') ?></label>
  64. <div class="group-controls">
  65. <select name="priority" id="priority">
  66. <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php
  67. if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
  68. <option value='<?= FreshRSS_Feed::PRIORITY_NORMAL ?>' <?php
  69. if (FreshRSS_Feed::PRIORITY_NORMAL === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.normal') ?></option>
  70. <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php
  71. if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
  72. </select>
  73. </div>
  74. </div>
  75. <div class="form-group form-actions">
  76. <div class="group-controls">
  77. <button class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  78. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  79. <button class="btn btn-attention confirm"
  80. data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
  81. formaction="<?= _url('feed', 'delete', 'id', $this->feed->id()) ?>"
  82. formmethod="post"><?= _t('gen.action.remove') ?></button>
  83. </div>
  84. </div>
  85. <legend><?= _t('sub.feed.archiving') ?></legend>
  86. <div class="form-group">
  87. <div class="group-controls">
  88. <div class="stick">
  89. <input type="text" value="<?= _t('sub.feed.number_entries', $nbEntries) ?>" disabled="disabled" />
  90. <a class="btn" href="<?= _url('feed', 'actualize', 'id', $this->feed->id()) ?>">
  91. <?= _i('refresh') ?> <?= _t('gen.action.actualize') ?>
  92. </a>
  93. </div>
  94. </div>
  95. </div>
  96. <?php
  97. $archiving = $this->feed->attributes('archiving');
  98. if (empty($archiving)) {
  99. $archiving = [ 'default' => true ];
  100. } else {
  101. $archiving['default'] = false;
  102. }
  103. $volatile = [
  104. 'enable_keep_period' => false,
  105. 'keep_period_count' => '3',
  106. 'keep_period_unit' => 'P1M',
  107. ];
  108. if (!empty($archiving['keep_period'])) {
  109. if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
  110. $volatile['enable_keep_period'] = true;
  111. $volatile['keep_period_count'] = $matches['count'];
  112. $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
  113. }
  114. }
  115. //Defaults
  116. if (!isset($archiving['keep_max'])) {
  117. $archiving['keep_max'] = false;
  118. }
  119. if (!isset($archiving['keep_min'])) {
  120. $archiving['keep_min'] = 50;
  121. }
  122. if (!isset($archiving['keep_favourites'])) {
  123. $archiving['keep_favourites'] = true;
  124. }
  125. if (!isset($archiving['keep_labels'])) {
  126. $archiving['keep_labels'] = true;
  127. }
  128. if (!isset($archiving['keep_unreads'])) {
  129. $archiving['keep_unreads'] = false;
  130. }
  131. ?>
  132. <p class="alert alert-warn">
  133. <?= _t('conf.archiving.policy_warning') ?>
  134. </p>
  135. <div class="form-group">
  136. <label class="group-name"><?= _t('conf.archiving.policy') ?></label>
  137. <div class="group-controls">
  138. <label class="checkbox">
  139. <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
  140. data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
  141. <?= _t('gen.short.by_default') ?>
  142. </label>
  143. </div>
  144. </div>
  145. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  146. <div class="group-controls">
  147. <label class="checkbox" for="enable_keep_max">
  148. <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
  149. data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
  150. <?= _t('conf.archiving.keep_max') ?>
  151. <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
  152. data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
  153. </label>
  154. </div>
  155. </div>
  156. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  157. <div class="group-controls">
  158. <label class="checkbox" for="enable_keep_period">
  159. <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
  160. data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
  161. <?= _t('conf.archiving.keep_period') ?>
  162. <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
  163. data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
  164. <select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
  165. <option></option>
  166. <option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
  167. <option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
  168. <option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
  169. <option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
  170. <option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
  171. </select>
  172. </label>
  173. </div>
  174. </div>
  175. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  176. <label class="group-name"><?= _t('conf.archiving.exception') ?></label>
  177. <div class="group-controls">
  178. <label class="checkbox" for="keep_favourites">
  179. <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
  180. data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
  181. <?= _t('conf.archiving.keep_favourites') ?>
  182. </label>
  183. </div>
  184. </div>
  185. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  186. <div class="group-controls">
  187. <label class="checkbox" for="keep_labels">
  188. <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
  189. data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
  190. <?= _t('conf.archiving.keep_labels') ?>
  191. </label>
  192. </div>
  193. </div>
  194. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  195. <div class="group-controls">
  196. <label class="checkbox" for="keep_unreads">
  197. <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
  198. data-leave-validation="<?= $archiving['keep_unreads'] ?>"/>
  199. <?= _t('conf.archiving.keep_unreads') ?>
  200. </label>
  201. </div>
  202. </div>
  203. <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
  204. <div class="group-controls">
  205. <label for="keep_min"><?= _t('sub.feed.keep_min') ?>
  206. <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
  207. data-leave-validation="<?= $archiving['keep_min'] ?>">
  208. </label>
  209. </div>
  210. </div>
  211. <div class="form-group">
  212. <label class="group-name" for="ttl"><?= _t('sub.feed.ttl') ?></label>
  213. <div class="group-controls">
  214. <select class="number" name="ttl" id="ttl" required="required"><?php
  215. $found = false;
  216. foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
  217. 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
  218. 36000 => '10h', 43200 => '12h', 64800 => '18h',
  219. 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
  220. 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
  221. echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
  222. if ($this->feed->ttl() == $v) {
  223. $found = true;
  224. }
  225. }
  226. if (!$found) {
  227. echo '<option value="' . intval($this->feed->ttl()) . '" selected="selected">' . intval($this->feed->ttl()) . 's</option>';
  228. }
  229. ?></select>
  230. <label for="mute">
  231. <input type="checkbox" name="mute" id="mute" value="1"<?= $this->feed->mute() ? ' checked="checked"' : '' ?> />
  232. <?= _t('sub.feed.mute') ?>
  233. </label>
  234. </div>
  235. </div>
  236. <?php if ($this->feed->pubSubHubbubEnabled()) { ?>
  237. <div class="form-group">
  238. <div class="group-controls">
  239. <label class="checkbox" for="pubsubhubbub">
  240. <input type="checkbox" name="pubsubhubbub" id="pubsubhubbub" disabled="disabled" value="1" checked="checked" />
  241. <?= _t('sub.feed.websub') ?>
  242. </label>
  243. </div>
  244. </div>
  245. <?php } ?>
  246. <div class="form-group form-actions">
  247. <div class="group-controls">
  248. <button class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  249. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  250. <button class="btn btn-attention confirm" formmethod="post" formaction="<?= _url('feed', 'truncate', 'id', $this->feed->id()) ?>"><?= _t('gen.action.truncate') ?></button>
  251. </div>
  252. </div>
  253. <legend><?= _t('sub.feed.auth.configuration') ?></legend>
  254. <?php $auth = $this->feed->httpAuth(false); ?>
  255. <div class="form-group">
  256. <label class="group-name" for="http_user_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.username') ?></label>
  257. <div class="group-controls">
  258. <input type="text" name="http_user_feed<?= $this->feed->id() ?>" id="http_user_feed<?= $this->feed->id() ?>" class="extend" value="<?=
  259. empty($auth['username']) ? ' ' : $auth['username'] ?>" autocomplete="off" />
  260. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
  261. </div>
  262. <label class="group-name" for="http_pass_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.password') ?></label>
  263. <div class="group-controls">
  264. <input type="password" name="http_pass_feed<?= $this->feed->id() ?>" id="http_pass_feed<?= $this->feed->id() ?>" class="extend" value="<?=
  265. $auth['password'] ?>" autocomplete="new-password" />
  266. </div>
  267. </div>
  268. <div class="form-group form-actions">
  269. <div class="group-controls">
  270. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  271. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  272. </div>
  273. </div>
  274. <legend><?= _t('sub.feed.advanced') ?></legend>
  275. <div class="form-group">
  276. <label class="group-name" for="path_entries"><?= _t('sub.feed.css_path') ?></label>
  277. <div class="group-controls">
  278. <div class="stick">
  279. <input type="text" name="path_entries" id="path_entries" class="extend" value="<?= $this->feed->pathEntries() ?>"
  280. placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
  281. <a id="popup-preview-selector" class="btn" href="<?=
  282. _url('feed', 'contentSelectorPreview', 'id', $this->feed->id(), 'selector', 'selector-token') ?>"><?= _i('look') ?></a>
  283. </div>
  284. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_help') ?></p>
  285. </div>
  286. </div>
  287. <div class="form-group">
  288. <label class="group-name" for="path_entries"><?= _t('sub.feed.css_cookie') ?></label>
  289. <div class="group-controls">
  290. <div class="stick">
  291. <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="extend" value="<?=
  292. is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_COOKIE]) ?
  293. $this->feed->attributes('curl_params')[CURLOPT_COOKIE] : ''
  294. ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
  295. </div>
  296. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_cookie_help') ?></p>
  297. </div>
  298. </div>
  299. <div class="form-group">
  300. <label class="group-name" for="content_action"><?= _t('sub.feed.content_action') ?></label>
  301. <div class="group-controls">
  302. <select name="content_action" id="content_action">
  303. <option value="replace"<?= 'replace' === $this->feed->attributes('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.replace') ?></option>
  304. <option value="prepend"<?= 'prepend' === $this->feed->attributes('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.prepend') ?></option>
  305. <option value="append"<?= 'append' === $this->feed->attributes('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.append') ?></option>
  306. </select>
  307. </div>
  308. </div>
  309. <div class="form-group">
  310. <label class="group-name" for="mark_updated_article_unread"><?= _t('conf.reading.mark_updated_article_unread') ?></label>
  311. <div class="group-controls">
  312. <label class="checkbox" for="mark_updated_article_unread">
  313. <select name="mark_updated_article_unread" id="mark_updated_article_unread">
  314. <option value=""<?= $this->feed->attributes('mark_updated_article_unread') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
  315. <option value="0"<?= $this->feed->attributes('mark_updated_article_unread') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
  316. <option value="1"<?= $this->feed->attributes('mark_updated_article_unread') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
  317. </select>
  318. </label>
  319. </div>
  320. </div>
  321. <div class="form-group">
  322. <label class="group-name" for="read_upon_reception"><?= _t('conf.reading.read.when') ?></label>
  323. <div class="group-controls">
  324. <label class="checkbox" for="read_upon_reception">
  325. <select name="read_upon_reception" id="read_upon_reception">
  326. <option value=""<?= $this->feed->attributes('read_upon_reception') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
  327. <option value="0"<?= $this->feed->attributes('read_upon_reception') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
  328. <option value="1"<?= $this->feed->attributes('read_upon_reception') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
  329. </select>
  330. <?= _t('conf.reading.read.upon_reception') ?>
  331. </label>
  332. </div>
  333. </div>
  334. <div class="form-group">
  335. <div class="group-controls">
  336. <label class="checkbox" for="clear_cache">
  337. <input type="checkbox" name="clear_cache" id="clear_cache" value="1"<?= $this->feed->attributes('clear_cache') ? ' checked="checked"' : '' ?> />
  338. <?= _t('sub.feed.clear_cache') ?>
  339. </label>
  340. </div>
  341. </div>
  342. <div class="form-group">
  343. <label class="group-name" for="path_entries"><?= _t('sub.feed.useragent') ?></label>
  344. <div class="group-controls">
  345. <div class="stick">
  346. <input type="text" name="curl_params_useragent" id="curl_params_useragent" class="extend" value="<?=
  347. is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_USERAGENT]) ?
  348. $this->feed->attributes('curl_params')[CURLOPT_USERAGENT] : ''
  349. ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
  350. </div>
  351. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
  352. </div>
  353. </div>
  354. <div class="form-group">
  355. <label class="group-name" for="path_entries"><?= _t('sub.feed.proxy') ?></label>
  356. <div class="group-controls">
  357. <select class="number" name="proxy_type" id="proxy_type"><?php
  358. $type = '';
  359. if (is_array($this->feed->attributes('curl_params')) && isset($this->feed->attributes('curl_params')[CURLOPT_PROXYTYPE])) {
  360. $type = $this->feed->attributes('curl_params')[CURLOPT_PROXYTYPE];
  361. }
  362. foreach(['' => '', 3 => 'NONE', 0 => 'HTTP', 2 => 'HTTPS', 4 => 'SOCKS4', 6 => 'SOCKS4A', 5 => 'SOCKS5', 7 => 'SOCKS5H'] as $k => $v) {
  363. echo '<option value="' . $k . ($type === $k ? '" selected="selected' : '' ) . '">' . $v . '</option>';
  364. }
  365. ?>
  366. </select>
  367. <div class="stick">
  368. <input type="text" name="curl_params" id="curl_params" class="extend" value="<?=
  369. is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_PROXY]) ?
  370. $this->feed->attributes('curl_params')[CURLOPT_PROXY] : ''
  371. ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
  372. </div>
  373. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_help') ?></p>
  374. </div>
  375. </div>
  376. <div class="form-group">
  377. <label class="group-name" for="timeout"><?= _t('sub.feed.timeout') ?></label>
  378. <div class="group-controls">
  379. <input type="number" name="timeout" id="timeout" min="3" max="120" value="<?= $this->feed->attributes('timeout') ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
  380. </div>
  381. </div>
  382. <div class="form-group">
  383. <label class="group-name" for="ssl_verify"><?= _t('sub.feed.ssl_verify') ?></label>
  384. <div class="group-controls">
  385. <label class="checkbox" for="ssl_verify">
  386. <select name="ssl_verify" id="ssl_verify">
  387. <option value=""<?= $this->feed->attributes('ssl_verify') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
  388. <option value="0"<?= $this->feed->attributes('ssl_verify') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
  389. <option value="1"<?= $this->feed->attributes('ssl_verify') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
  390. </select>
  391. </label>
  392. </div>
  393. </div>
  394. <legend><?= _t('sub.feed.filteractions') ?></legend>
  395. <div class="form-group">
  396. <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
  397. <div class="group-controls">
  398. <textarea name="filteractions_read" id="filteractions_read"><?php
  399. foreach ($this->feed->filtersAction('read') as $filterRead) {
  400. echo $filterRead->getRawInput(), PHP_EOL;
  401. }
  402. ?></textarea>
  403. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
  404. </div>
  405. </div>
  406. <div class="form-group form-actions">
  407. <div class="group-controls">
  408. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  409. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  410. </div>
  411. </div>
  412. <legend><?= _t('sub.feed.maintenance.title') ?></legend>
  413. <div class="form-group">
  414. <div class="group-controls">
  415. <a class="btn btn-important" href="<?= _url('feed', 'clearCache', 'id', $this->feed->id()) ?>">
  416. <?= _t('sub.feed.maintenance.clear_cache') ?>
  417. </a>
  418. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.maintenance.clear_cache_help') ?></p>
  419. </div>
  420. <div class="group-controls">
  421. <a class="btn btn-important" href="<?= _url('feed', 'reload', 'id', $this->feed->id()) ?>">
  422. <?= _t('sub.feed.maintenance.reload_articles') ?>
  423. </a>
  424. <p class="help"><?= _i('help') ?> <?= _t('sub.feed.maintenance.reload_articles_help') ?></p>
  425. </div>
  426. </div>
  427. </form>
  428. </div>