aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers
diff options
context:
space:
mode:
authorGravatar maTh <1645099+math-GH@users.noreply.github.com> 2024-03-17 22:49:12 +0100
committerGravatar GitHub <noreply@github.com> 2024-03-17 22:49:12 +0100
commit6bd6494ad48c4894befed44e9c3f753c123aca5d (patch)
treec275e183b49904f0e85386380f4f1f685e710ee8 /app/views/helpers
parentd7bc70e3fb9785ee74e3d446d7a11858a083fe6a (diff)
fixed HTML: <fieldset> + <legend> (#6202)
* legend tags cleaned * formgroup -> fieldset tag * add bookmarklet class * Update logs.phtml * Update logs.phtml * fixed log table text alignment
Diffstat (limited to 'app/views/helpers')
-rw-r--r--app/views/helpers/category/update.phtml395
-rw-r--r--app/views/helpers/configure/query.phtml214
-rw-r--r--app/views/helpers/feed/update.phtml936
3 files changed, 784 insertions, 761 deletions
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index b3f92b449..7c0105b5f 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -17,224 +17,231 @@
<form method="post" action="<?= _url('category', 'update', 'id', $this->category->id(), '#', 'slider') ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
-
- <legend><?= _t('sub.category.information') ?></legend>
- <div class="form-group">
- <label class="group-name" for="name"><?= _t('sub.category.title') ?></label>
- <div class="group-controls">
- <input type="text" name="name" id="name" value="<?= $this->category->name() ?>" <?=
- //Disallow changing the name of the default category
- $this->category->id() === FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'readonly="readonly"' : ''
- ?> />
+ <fieldset>
+ <legend><?= _t('sub.category.information') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="name"><?= _t('sub.category.title') ?></label>
+ <div class="group-controls">
+ <input type="text" name="name" id="name" value="<?= $this->category->name() ?>" <?=
+ //Disallow changing the name of the default category
+ $this->category->id() === FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'readonly="readonly"' : ''
+ ?> />
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="position"><?= _t('sub.category.position') ?></label>
- <div class="group-controls">
- <input type="number" name="position" id="position" min="1" value="<?= $this->category->attributeInt('position') ?>" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.category.position_help') ?></p>
+ <div class="form-group">
+ <label class="group-name" for="position"><?= _t('sub.category.position') ?></label>
+ <div class="group-controls">
+ <input type="number" name="position" id="position" min="1" value="<?= $this->category->attributeInt('position') ?>" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.category.position_help') ?></p>
+ </div>
</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 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>
- </div>
+ </fieldset>
<?php if (!$this->category->isDefault()): ?>
- <legend><?= _t('sub.category.dynamic_opml') ?> <?= _i('opml-dyn') ?></legend>
- <div class="form-group">
- <label class="group-name" for="opml_url"><?= _t('sub.category.opml_url') ?></label>
- <div class="group-controls">
- <div class="stick">
- <input id="opml_url" name="opml_url" type="url" autocomplete="off" class="long" data-disable-update="refreshOpml" value="<?= $this->category->attributeString('opml_url') ?>" />
- <button type="submit" class="btn" id="refreshOpml" formmethod="post" formaction="<?= _url('category', 'refreshOpml', 'id', $this->category->id()) ?>">
- <?= _i('refresh') ?> <?= _t('gen.action.refresh_opml') ?>
- </button>
- <a class="btn open-url" target="_blank" rel="noreferrer" href="" data-input="opml_url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
- </div>
- <p class="help"><?= _i('help') ?> <?= _t('gen.short.blank_to_disable') ?></p>
- <p class="help"><?= _i('help') ?> <?= _t('sub.category.dynamic_opml.help') ?></p>
- </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>
- <button type="submit" class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= _url('category', 'empty', 'id', $this->category->id(), 'muted', 1) ?>"
- formmethod="post"><?= _t('gen.action.delete_muted_feeds') ?></button>
- </div>
- </div>
+ <fieldset>
+ <legend><?= _t('sub.category.dynamic_opml') ?> <?= _i('opml-dyn') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="opml_url"><?= _t('sub.category.opml_url') ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input id="opml_url" name="opml_url" type="url" autocomplete="off" class="long" data-disable-update="refreshOpml" value="<?= $this->category->attributeString('opml_url') ?>" />
+ <button type="submit" class="btn" id="refreshOpml" formmethod="post" formaction="<?= _url('category', 'refreshOpml', 'id', $this->category->id()) ?>">
+ <?= _i('refresh') ?> <?= _t('gen.action.refresh_opml') ?>
+ </button>
+ <a class="btn open-url" target="_blank" rel="noreferrer" href="" data-input="opml_url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
+ </div>
+ <p class="help"><?= _i('help') ?> <?= _t('gen.short.blank_to_disable') ?></p>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.category.dynamic_opml.help') ?></p>
+ </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>
+ <button type="submit" class="btn btn-attention confirm"
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= _url('category', 'empty', 'id', $this->category->id(), 'muted', 1) ?>"
+ formmethod="post"><?= _t('gen.action.delete_muted_feeds') ?></button>
+ </div>
+ </div>
+ </fieldset>
<?php endif; ?>
- <legend><?= _t('sub.feed.filteractions') ?></legend>
- <div class="form-group">
- <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
- <div class="group-controls">
- <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
- foreach ($this->category->filtersAction('read') as $filterRead) {
- echo $filterRead->getRawInput(), PHP_EOL;
- }
- ?></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <fieldset>
+ <legend><?= _t('sub.feed.filteractions') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
+ foreach ($this->category->filtersAction('read') as $filterRead) {
+ echo $filterRead->getRawInput(), PHP_EOL;
+ }
+ ?></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ </div>
</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 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>
- </div>
+ </fieldset>
- <legend><?= _t('sub.category.archiving') ?></legend>
- <?php
- $archiving = $this->category->attributeArray('archiving');
- /** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
- if (empty($archiving)) {
- $archiving = [ 'default' => true ];
- } else {
- $archiving['default'] = false;
- }
- $volatile = [
- 'enable_keep_period' => false,
- 'keep_period_count' => '3',
- 'keep_period_unit' => 'P1M',
- ];
- if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
- if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
- $volatile['enable_keep_period'] = true;
- $volatile['keep_period_count'] = $matches['count'];
- $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
+ <fieldset>
+ <legend><?= _t('sub.category.archiving') ?></legend>
+ <?php
+ $archiving = $this->category->attributeArray('archiving');
+ /** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
+ if (empty($archiving)) {
+ $archiving = [ 'default' => true ];
+ } else {
+ $archiving['default'] = false;
+ }
+ $volatile = [
+ 'enable_keep_period' => false,
+ 'keep_period_count' => '3',
+ 'keep_period_unit' => 'P1M',
+ ];
+ if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
+ if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
+ $volatile['enable_keep_period'] = true;
+ $volatile['keep_period_count'] = $matches['count'];
+ $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
+ }
+ }
+ //Defaults
+ if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
+ $archiving['keep_max'] = 0;
}
- }
- //Defaults
- if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
- $archiving['keep_max'] = 0;
- }
- if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
- $archiving['keep_min'] = 50;
- }
- if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
- $archiving['keep_favourites'] = true;
- }
- if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
- $archiving['keep_labels'] = true;
- }
- if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
- $archiving['keep_unreads'] = false;
- }
- ?>
+ if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
+ $archiving['keep_min'] = 50;
+ }
+ if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
+ $archiving['keep_favourites'] = true;
+ }
+ if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
+ $archiving['keep_labels'] = true;
+ }
+ if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
+ $archiving['keep_unreads'] = false;
+ }
+ ?>
- <p class="alert alert-warn">
- <?= _t('conf.archiving.policy_warning') ?>
- </p>
+ <p class="alert alert-warn">
+ <?= _t('conf.archiving.policy_warning') ?>
+ </p>
- <div class="form-group">
- <label class="group-name" for="use_default_purge_options"><?= _t('conf.archiving.policy') ?></label>
- <div class="group-controls">
- <label class="checkbox">
- <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
- <?= _t('gen.short.by_default') ?>
- </label>
+ <div class="form-group">
+ <label class="group-name" for="use_default_purge_options"><?= _t('conf.archiving.policy') ?></label>
+ <div class="group-controls">
+ <label class="checkbox">
+ <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
+ <?= _t('gen.short.by_default') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="enable_keep_max">
- <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
- data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
- <?= _t('conf.archiving.keep_max') ?>
- <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
- data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="enable_keep_max">
+ <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
+ <?= _t('conf.archiving.keep_max') ?>
+ <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="enable_keep_period">
- <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_period') ?>
- <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
- data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
- <select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
- <option></option>
- <option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
- <option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
- <option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
- <option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
- <option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
- </select>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="enable_keep_period">
+ <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_period') ?>
+ <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
+ data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
+ <select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
+ <option></option>
+ <option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
+ <option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
+ <option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
+ <option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
+ <option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
+ </select>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-name"><?= _t('conf.archiving.exception') ?></div>
- <div class="group-controls">
- <label class="checkbox" for="keep_favourites">
- <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_favourites') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-name"><?= _t('conf.archiving.exception') ?></div>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_favourites">
+ <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_favourites') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="keep_labels">
- <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_labels') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_labels">
+ <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_labels') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="keep_unreads">
- <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_unreads') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_unreads">
+ <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_unreads') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label for="keep_min"><?= _t('sub.feed.keep_min') ?>
- <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
- data-leave-validation="<?= $archiving['keep_min'] ?>">
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label for="keep_min"><?= _t('sub.feed.keep_min') ?>
+ <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
+ data-leave-validation="<?= $archiving['keep_min'] ?>">
+ </label>
+ </div>
</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 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>
- </div>
- <?php if (!$this->category->isDefault()): ?>
- <p class="alert alert-warn">
- <?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
- </p>
- <?php endif;?>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= _url('category', 'empty', 'id', $this->category->id()) ?>"
- formmethod="post"><?= _t('gen.action.empty') ?></button>
- <?php if (!$this->category->isDefault()): ?>
- <button type="submit" class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= _url('category', 'delete', 'id', $this->category->id()) ?>"
- formmethod="post"><?= _t('gen.action.remove') ?></button>
- <?php endif;?>
+ <?php if (!$this->category->isDefault()): ?>
+ <p class="alert alert-warn">
+ <?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
+ </p>
+ <?php endif;?>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-attention confirm"
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= _url('category', 'empty', 'id', $this->category->id()) ?>"
+ formmethod="post"><?= _t('gen.action.empty') ?></button>
+ <?php if (!$this->category->isDefault()): ?>
+ <button type="submit" class="btn btn-attention confirm"
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= _url('category', 'delete', 'id', $this->category->id()) ?>"
+ formmethod="post"><?= _t('gen.action.remove') ?></button>
+ <?php endif;?>
+ </div>
</div>
- </div>
+ </fieldset>
</form>
</div>
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml
index 49ffbad87..cce398542 100644
--- a/app/views/helpers/configure/query.phtml
+++ b/app/views/helpers/configure/query.phtml
@@ -22,120 +22,124 @@
</div>
</div>
- <legend><?= _t('conf.query.share') ?></legend>
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="shareRss">
- <input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> />
- <?= _t('conf.query.filter.shareRss') ?>
- </label>
- <?php if ($this->query->sharedUrlRss() !== ''): ?>
- <ul>
- <li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
- <li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
- </ul>
- <?php endif; ?>
- </div>
- <div class="group-controls">
- <label class="checkbox" for="shareOpml">
- <input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?>
- <?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> />
- <?= _t('conf.query.filter.shareOpml') ?>
- </label>
- <?php if ($this->query->sharedUrlOpml() !== ''): ?>
- <ul>
- <li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li>
- </ul>
- <?php endif; ?>
+ <fieldset>
+ <legend><?= _t('conf.query.share') ?></legend>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="shareRss">
+ <input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> />
+ <?= _t('conf.query.filter.shareRss') ?>
+ </label>
+ <?php if ($this->query->sharedUrlRss() !== ''): ?>
+ <ul>
+ <li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
+ <li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
+ </ul>
+ <?php endif; ?>
+ </div>
+ <div class="group-controls">
+ <label class="checkbox" for="shareOpml">
+ <input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?>
+ <?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> />
+ <?= _t('conf.query.filter.shareOpml') ?>
+ </label>
+ <?php if ($this->query->sharedUrlOpml() !== ''): ?>
+ <ul>
+ <li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li>
+ </ul>
+ <?php endif; ?>
+ </div>
+ <p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p>
+ <p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p>
</div>
- <p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p>
- <p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p>
- </div>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ </div>
</div>
- </div>
+ </fieldset>
- <legend><?= _t('conf.query.filter') ?></legend>
- <div class="form-group">
- <label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label>
- <div class="group-controls">
- <input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch()->getRawInput(), ENT_COMPAT, 'UTF-8') ?>"/>
- <p class="help"><?= _i('help') ?> <?= _t('gen.menu.search_help') ?></a></p>
+ <fieldset>
+ <legend><?= _t('conf.query.filter') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for=""><?= _t('conf.query.filter.search') ?></label>
+ <div class="group-controls">
+ <input type="text" id="query_search" name="query[search]" value="<?= htmlspecialchars($this->query->getSearch()->getRawInput(), ENT_COMPAT, 'UTF-8') ?>"/>
+ <p class="help"><?= _i('help') ?> <?= _t('gen.menu.search_help') ?></a></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for=""><?= _t('conf.query.filter.state') ?></label>
- <div class="group-controls">
- <label class="checkbox" for="show_read">
- <input type="checkbox" name="query[state][]" id="show_read"
- value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
- <?= _t('index.menu.read') ?>
- </label>
- <label class="checkbox" for="show_not_read">
- <input type="checkbox" name="query[state][]" id="show_not_read"
- value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
- <?= _t('index.menu.unread') ?>
- </label>
- <label class="checkbox" for="show_favorite">
- <input type="checkbox" name="query[state][]" id="show_favorite"
- value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
- <?= _t('index.menu.starred') ?>
- </label>
- <label class="checkbox" for="show_not_favorite">
- <input type="checkbox" name="query[state][]" id="show_not_favorite"
- value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
- <?= _t('index.menu.non-starred') ?>
- </label>
+ <div class="form-group">
+ <label class="group-name" for=""><?= _t('conf.query.filter.state') ?></label>
+ <div class="group-controls">
+ <label class="checkbox" for="show_read">
+ <input type="checkbox" name="query[state][]" id="show_read"
+ value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <?= _t('index.menu.read') ?>
+ </label>
+ <label class="checkbox" for="show_not_read">
+ <input type="checkbox" name="query[state][]" id="show_not_read"
+ value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <?= _t('index.menu.unread') ?>
+ </label>
+ <label class="checkbox" for="show_favorite">
+ <input type="checkbox" name="query[state][]" id="show_favorite"
+ value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <?= _t('index.menu.starred') ?>
+ </label>
+ <label class="checkbox" for="show_not_favorite">
+ <input type="checkbox" name="query[state][]" id="show_not_favorite"
+ value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <?= _t('index.menu.non-starred') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="query_get"><?= _t('conf.query.filter.type') ?></label>
- <div class="group-controls">
- <select name="query[get]" id="query_get" size="10">
- <option value="a" <?= in_array($this->query->getGet(), ['', 'a'], true) ? 'selected="selected"' : '' ?>><?= _t('index.feed.title') ?></option>
- <option value="i" <?= 'i' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.important') ?></option>
- <option value="s" <?= 's' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.feed.title_fav') ?></option>
- <option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.tags') ?></option>
- <optgroup label="<?= _t('conf.query.filter.tags') ?>">
- <?php foreach ($this->tags as $tag): ?>
- <option value="t_<?= $tag->id() ?>" <?= "t_{$tag->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $tag->name() ?></option>
- <?php endforeach?>
- </optgroup>
- <optgroup label="<?= _t('conf.query.filter.categories') ?>">
- <?php foreach ($this->categories as $category): ?>
- <option value="c_<?= $category->id() ?>" <?= "c_{$category->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $category->name() ?></option>
- <?php endforeach?>
- </optgroup>
- <optgroup label="<?= _t('conf.query.filter.feeds') ?>">
- <?php foreach ($this->feeds as $feed): ?>
- <option value="f_<?= $feed->id() ?>" <?= "f_{$feed->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $feed->name() ?></option>
- <?php endforeach?>
- </optgroup>
- </select>
+ <div class="form-group">
+ <label class="group-name" for="query_get"><?= _t('conf.query.filter.type') ?></label>
+ <div class="group-controls">
+ <select name="query[get]" id="query_get" size="10">
+ <option value="a" <?= in_array($this->query->getGet(), ['', 'a'], true) ? 'selected="selected"' : '' ?>><?= _t('index.feed.title') ?></option>
+ <option value="i" <?= 'i' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.important') ?></option>
+ <option value="s" <?= 's' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.feed.title_fav') ?></option>
+ <option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.tags') ?></option>
+ <optgroup label="<?= _t('conf.query.filter.tags') ?>">
+ <?php foreach ($this->tags as $tag): ?>
+ <option value="t_<?= $tag->id() ?>" <?= "t_{$tag->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $tag->name() ?></option>
+ <?php endforeach?>
+ </optgroup>
+ <optgroup label="<?= _t('conf.query.filter.categories') ?>">
+ <?php foreach ($this->categories as $category): ?>
+ <option value="c_<?= $category->id() ?>" <?= "c_{$category->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $category->name() ?></option>
+ <?php endforeach?>
+ </optgroup>
+ <optgroup label="<?= _t('conf.query.filter.feeds') ?>">
+ <?php foreach ($this->feeds as $feed): ?>
+ <option value="f_<?= $feed->id() ?>" <?= "f_{$feed->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $feed->name() ?></option>
+ <?php endforeach?>
+ </optgroup>
+ </select>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for=""><?= _t('conf.query.filter.order') ?></label>
- <div class="group-controls">
- <select name="query[order]" id="query_order">
- <option value=""></option>
- <option value="DESC" <?= 'DESC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_desc') ?></option>
- <option value="ASC" <?= 'ASC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_asc') ?></option>
- </select>
+ <div class="form-group">
+ <label class="group-name" for=""><?= _t('conf.query.filter.order') ?></label>
+ <div class="group-controls">
+ <select name="query[order]" id="query_order">
+ <option value=""></option>
+ <option value="DESC" <?= 'DESC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_desc') ?></option>
+ <option value="ASC" <?= 'ASC' === $this->query->getOrder() ? 'selected="selected"' : '' ?>><?= _t('conf.query.order_asc') ?></option>
+ </select>
+ </div>
</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="submit" class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= _url('configure', 'deleteQuery', 'id', $this->queryId) ?>"
- formmethod="post"><?= _t('gen.action.remove') ?></button>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ <button type="submit" class="btn btn-attention confirm"
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= _url('configure', 'deleteQuery', 'id', $this->queryId) ?>"
+ formmethod="post"><?= _t('gen.action.remove') ?></button>
+ </div>
</div>
- </div>
+ </fieldset>
</form>
</div>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 9d3aa59fa..ba91030bd 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -34,381 +34,390 @@
?>
<form method="post" action="<?= $url ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
- <legend><?= _t('sub.feed.information') ?></legend>
- <div class="form-group">
- <label class="group-name" for="name"><?= _t('sub.feed.title') ?></label>
- <div class="group-controls">
- <input type="text" name="name" id="name" class="w100" value="<?= $this->feed->name(true) ?>" required="required" />
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="description"><?= _t('sub.feed.description') ?></label>
- <div class="group-controls">
- <textarea name="description" id="description" class="w100"><?= htmlspecialchars($this->feed->description(), ENT_NOQUOTES, 'UTF-8') ?></textarea>
+ <fieldset>
+ <legend><?= _t('sub.feed.information') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="name"><?= _t('sub.feed.title') ?></label>
+ <div class="group-controls">
+ <input type="text" name="name" id="name" class="w100" value="<?= $this->feed->name(true) ?>" required="required" />
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="website"><?= _t('sub.feed.website') ?></label>
- <div class="group-controls">
- <div class="stick w100">
- <input type="url" name="website" id="website" value="<?= $this->feed->website() ?>" />
- <a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->website() ?>" data-input="website" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
+ <div class="form-group">
+ <label class="group-name" for="description"><?= _t('sub.feed.description') ?></label>
+ <div class="group-controls">
+ <textarea name="description" id="description" class="w100"><?= htmlspecialchars($this->feed->description(), ENT_NOQUOTES, 'UTF-8') ?></textarea>
</div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="url"><?= _t('sub.feed.url') ?></label>
- <div class="group-controls">
- <div class="stick w100">
- <input type="url" name="url" id="url" value="<?= $this->feed->url() ?>" required="required" />
- <a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
+ <div class="form-group">
+ <label class="group-name" for="website"><?= _t('sub.feed.website') ?></label>
+ <div class="group-controls">
+ <div class="stick w100">
+ <input type="url" name="website" id="website" value="<?= $this->feed->website() ?>" />
+ <a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->website() ?>" data-input="website" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
+ </div>
</div>
- <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?=
- rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="category"><?= _t('sub.category') ?></label>
- <div class="group-controls">
- <select name="category" id="category" class="w100">
- <?php foreach ($this->categories as $cat) { ?>
- <option value="<?= $cat->id() ?>"<?= $cat->id() == $this->feed->categoryId() ? ' selected="selected"' : '' ?>>
- <?= $cat->name() ?>
- </option>
- <?php } ?>
- </select>
+ <div class="form-group">
+ <label class="group-name" for="url"><?= _t('sub.feed.url') ?></label>
+ <div class="group-controls">
+ <div class="stick w100">
+ <input type="url" name="url" id="url" value="<?= $this->feed->url() ?>" required="required" />
+ <a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>" data-input="url" title="<?= _t('gen.action.open_url') ?>"><?= _i('link') ?></a>
+ </div>
+ <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?=
+ rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="priority"><?= _t('sub.feed.priority') ?></label>
- <div class="group-controls">
- <select name="priority" id="priority" class="w50">
- <option value='<?= FreshRSS_Feed::PRIORITY_IMPORTANT ?>' <?php
- if (FreshRSS_Feed::PRIORITY_IMPORTANT === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.important') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php
- if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_CATEGORY ?>' <?php
- if (FreshRSS_Feed::PRIORITY_CATEGORY === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.category') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php
- if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
- </select>
- <?= _i('important') ?>
+ <div class="form-group">
+ <label class="group-name" for="category"><?= _t('sub.category') ?></label>
+ <div class="group-controls">
+ <select name="category" id="category" class="w100">
+ <?php foreach ($this->categories as $cat) { ?>
+ <option value="<?= $cat->id() ?>"<?= $cat->id() == $this->feed->categoryId() ? ' selected="selected"' : '' ?>>
+ <?= $cat->name() ?>
+ </option>
+ <?php } ?>
+ </select>
+ </div>
</div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="ttl"><?= _t('sub.feed.ttl') ?></label>
- <div class="group-controls">
- <select class="w50" name="ttl" id="ttl" required="required"><?php
- $found = false;
- foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
- 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
- 36000 => '10h', 43200 => '12h', 64800 => '18h',
- 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
- 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
- echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
- if ($this->feed->ttl() == $v) {
- $found = true;
- }
- }
- if (!$found) {
- echo '<option value="' . intval($this->feed->ttl()) . '" selected="selected">' . intval($this->feed->ttl()) . 's</option>';
- }
- ?></select>
- <label for="mute">
- <input type="checkbox" name="mute" id="mute" value="1"<?= $this->feed->mute() ? ' checked="checked"' : '' ?> />
- <?= _t('sub.feed.mute') ?>
- </label>
+ <div class="form-group">
+ <label class="group-name" for="priority"><?= _t('sub.feed.priority') ?></label>
+ <div class="group-controls">
+ <select name="priority" id="priority" class="w50">
+ <option value='<?= FreshRSS_Feed::PRIORITY_IMPORTANT ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_IMPORTANT === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.important') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_CATEGORY ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_CATEGORY === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.category') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
+ </select>
+ <?= _i('important') ?>
+ </div>
</div>
- </div>
- <?php if ($this->feed->pubSubHubbubEnabled()) { ?>
<div class="form-group">
+ <label class="group-name" for="ttl"><?= _t('sub.feed.ttl') ?></label>
<div class="group-controls">
- <label class="checkbox" for="pubsubhubbub">
- <input type="checkbox" name="pubsubhubbub" id="pubsubhubbub" disabled="disabled" value="1" checked="checked" />
- <?= _t('sub.feed.websub') ?>
+ <select class="w50" name="ttl" id="ttl" required="required"><?php
+ $found = false;
+ foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
+ 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
+ 36000 => '10h', 43200 => '12h', 64800 => '18h',
+ 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
+ 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
+ echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
+ if ($this->feed->ttl() == $v) {
+ $found = true;
+ }
+ }
+ if (!$found) {
+ echo '<option value="' . intval($this->feed->ttl()) . '" selected="selected">' . intval($this->feed->ttl()) . 's</option>';
+ }
+ ?></select>
+ <label for="mute">
+ <input type="checkbox" name="mute" id="mute" value="1"<?= $this->feed->mute() ? ' checked="checked"' : '' ?> />
+ <?= _t('sub.feed.mute') ?>
</label>
</div>
</div>
- <?php } ?>
- <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>
- <?php
- if ($from === '') {
- $url = _url('feed', 'delete', 'id', $this->feed->id());
- } else {
- $url = _url('feed', 'delete', 'id', $this->feed->id(), 'from', $from);
- }
- ?>
- <button type="submit" class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= $url ?>"
- formmethod="post"><?= _t('gen.action.remove') ?></button>
+ <?php if ($this->feed->pubSubHubbubEnabled()) { ?>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="pubsubhubbub">
+ <input type="checkbox" name="pubsubhubbub" id="pubsubhubbub" disabled="disabled" value="1" checked="checked" />
+ <?= _t('sub.feed.websub') ?>
+ </label>
+ </div>
+ </div>
+ <?php } ?>
+
+ <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>
+ <?php
+ if ($from === '') {
+ $url = _url('feed', 'delete', 'id', $this->feed->id());
+ } else {
+ $url = _url('feed', 'delete', 'id', $this->feed->id(), 'from', $from);
+ }
+ ?>
+ <button type="submit" class="btn btn-attention confirm"
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= $url ?>"
+ formmethod="post"><?= _t('gen.action.remove') ?></button>
+ </div>
</div>
- </div>
+ </fieldset>
- <legend><?= _t('sub.feed.auth.configuration') ?></legend>
- <?php $auth = $this->feed->httpAuth(false); ?>
- <div class="form-group">
- <label class="group-name" for="http_user_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.username') ?></label>
- <div class="group-controls">
- <input type="text" name="http_user_feed<?= $this->feed->id() ?>" id="http_user_feed<?= $this->feed->id() ?>" class="w50" value="<?=
- empty($auth['username']) ? '' : $auth['username'] ?>" autocomplete="off" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
+ <fieldset>
+ <legend><?= _t('sub.feed.auth.configuration') ?></legend>
+ <?php $auth = $this->feed->httpAuth(false); ?>
+ <div class="form-group">
+ <label class="group-name" for="http_user_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.username') ?></label>
+ <div class="group-controls">
+ <input type="text" name="http_user_feed<?= $this->feed->id() ?>" id="http_user_feed<?= $this->feed->id() ?>" class="w50" value="<?=
+ empty($auth['username']) ? '' : $auth['username'] ?>" autocomplete="off" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="http_pass_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.password') ?></label>
- <div class="group-controls">
- <div class="stick w50">
- <input type="password" name="http_pass_feed<?= $this->feed->id() ?>" id="http_pass_feed<?= $this->feed->id() ?>" value="<?=
- $auth['password'] ?>" autocomplete="new-password" />
- <button type="button" class="btn toggle-password" data-toggle="http_pass_feed<?= $this->feed->id() ?>"><?= _i('key') ?></button>
+ <div class="form-group">
+ <label class="group-name" for="http_pass_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.password') ?></label>
+ <div class="group-controls">
+ <div class="stick w50">
+ <input type="password" name="http_pass_feed<?= $this->feed->id() ?>" id="http_pass_feed<?= $this->feed->id() ?>" value="<?=
+ $auth['password'] ?>" autocomplete="new-password" />
+ <button type="button" class="btn toggle-password" data-toggle="http_pass_feed<?= $this->feed->id() ?>"><?= _i('key') ?></button>
+ </div>
</div>
</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 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>
- </div>
+ </fieldset>
- <legend><?= _t('sub.feed.filteractions') ?></legend>
- <div class="form-group">
- <label class="group-name" for="mark_updated_article_unread"><?= _t('conf.reading.mark_updated_article_unread') ?></label>
- <div class="group-controls">
- <select name="mark_updated_article_unread" id="mark_updated_article_unread" class="w50">
- <option value=""<?= $this->feed->attributeBoolean('mark_updated_article_unread') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
- <option value="0"<?= $this->feed->attributeBoolean('mark_updated_article_unread') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
- <option value="1"<?= $this->feed->attributeBoolean('mark_updated_article_unread') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
- </select>
+ <fieldset>
+ <legend><?= _t('sub.feed.filteractions') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="mark_updated_article_unread"><?= _t('conf.reading.mark_updated_article_unread') ?></label>
+ <div class="group-controls">
+ <select name="mark_updated_article_unread" id="mark_updated_article_unread" class="w50">
+ <option value=""<?= $this->feed->attributeBoolean('mark_updated_article_unread') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
+ <option value="0"<?= $this->feed->attributeBoolean('mark_updated_article_unread') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
+ <option value="1"<?= $this->feed->attributeBoolean('mark_updated_article_unread') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
+ </select>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="read_when_same_title_in_feed"><?= _t('conf.reading.read.when') ?></label>
- <div class="group-controls">
- <select name="read_when_same_title_in_feed" id="read_when_same_title_in_feed" class="w50">
- <option value=""<?= $this->feed->attributeBoolean('read_when_same_title_in_feed') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
- <option value="0"<?= $this->feed->attributeBoolean('read_when_same_title_in_feed') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
- <option value="10"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 10 ? ' selected="selected"' : '' ?>>10</option>
- <option value="25"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 25 ? ' selected="selected"' : '' ?>>25</option>
- <option value="100"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 100 ? ' selected="selected"' : '' ?>>100</option>
- <option value="1000"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 1000 ? ' selected="selected"' : '' ?>>1 000</option>
- </select>
- <?= _t('conf.reading.read.when_same_title') ?>
+ <div class="form-group">
+ <label class="group-name" for="read_when_same_title_in_feed"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <select name="read_when_same_title_in_feed" id="read_when_same_title_in_feed" class="w50">
+ <option value=""<?= $this->feed->attributeBoolean('read_when_same_title_in_feed') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
+ <option value="0"<?= $this->feed->attributeBoolean('read_when_same_title_in_feed') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
+ <option value="10"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 10 ? ' selected="selected"' : '' ?>>10</option>
+ <option value="25"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 25 ? ' selected="selected"' : '' ?>>25</option>
+ <option value="100"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 100 ? ' selected="selected"' : '' ?>>100</option>
+ <option value="1000"<?= $this->feed->attributeInt('read_when_same_title_in_feed') == 1000 ? ' selected="selected"' : '' ?>>1 000</option>
+ </select>
+ <?= _t('conf.reading.read.when_same_title') ?>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="read_upon_reception"><?= _t('conf.reading.read.when') ?></label>
- <div class="group-controls">
- <select name="read_upon_reception" id="read_upon_reception" class="w50">
- <option value=""<?= $this->feed->attributeBoolean('read_upon_reception') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
- <option value="0"<?= $this->feed->attributeBoolean('read_upon_reception') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
- <option value="1"<?= $this->feed->attributeBoolean('read_upon_reception') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
- </select>
- <?= _t('conf.reading.read.upon_reception') ?>
+ <div class="form-group">
+ <label class="group-name" for="read_upon_reception"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <select name="read_upon_reception" id="read_upon_reception" class="w50">
+ <option value=""<?= $this->feed->attributeBoolean('read_upon_reception') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
+ <option value="0"<?= $this->feed->attributeBoolean('read_upon_reception') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
+ <option value="1"<?= $this->feed->attributeBoolean('read_upon_reception') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
+ </select>
+ <?= _t('conf.reading.read.upon_reception') ?>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="read_upon_gone"><?= _t('conf.reading.read.when') ?></label>
- <div class="group-controls">
- <select name="read_upon_gone" id="read_upon_gone" class="w50">
- <option value=""<?= $this->feed->attributeBoolean('read_upon_gone') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
- <option value="0"<?= $this->feed->attributeBoolean('read_upon_gone') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
- <option value="1"<?= $this->feed->attributeBoolean('read_upon_gone') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
- </select>
- <?= _t('conf.reading.read.upon_gone') ?>
+ <div class="form-group">
+ <label class="group-name" for="read_upon_gone"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <select name="read_upon_gone" id="read_upon_gone" class="w50">
+ <option value=""<?= $this->feed->attributeBoolean('read_upon_gone') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
+ <option value="0"<?= $this->feed->attributeBoolean('read_upon_gone') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
+ <option value="1"<?= $this->feed->attributeBoolean('read_upon_gone') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
+ </select>
+ <?= _t('conf.reading.read.upon_gone') ?>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
- <div class="group-controls">
- <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
- foreach ($this->feed->filtersAction('read') as $filterRead) {
- echo $filterRead->getRawInput(), PHP_EOL;
- }
- ?></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <div class="form-group">
+ <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
+ foreach ($this->feed->filtersAction('read') as $filterRead) {
+ echo $filterRead->getRawInput(), PHP_EOL;
+ }
+ ?></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="keep_max_n_unread"><?= _t('conf.reading.read.keep_max_n_unread') ?></label>
- <div class="group-controls">
- <input type="number" name="keep_max_n_unread" id="keep_max_n_unread" class="w50" min="1" max="10000000"
- data-leave-validation="<?= $this->feed->attributeInt('keep_max_n_unread') ?>"
- value="<?= $this->feed->attributeInt('keep_max_n_unread') ?>"
- placeholder="<?= _t('gen.short.by_default') ?>" />
+ <div class="form-group">
+ <label class="group-name" for="keep_max_n_unread"><?= _t('conf.reading.read.keep_max_n_unread') ?></label>
+ <div class="group-controls">
+ <input type="number" name="keep_max_n_unread" id="keep_max_n_unread" class="w50" min="1" max="10000000"
+ data-leave-validation="<?= $this->feed->attributeInt('keep_max_n_unread') ?>"
+ value="<?= $this->feed->attributeInt('keep_max_n_unread') ?>"
+ placeholder="<?= _t('gen.short.by_default') ?>" />
+ </div>
</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 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>
- </div>
-
- <legend><?= _t('sub.feed.archiving') ?></legend>
+ </fieldset>
- <div class="form-group">
- <div class="group-controls">
- <?= _t('sub.feed.number_entries', $nbEntries) ?>
- <a class="btn" href="<?= _url('feed', 'actualize', 'id', $this->feed->id(), '#', 'slider') ?>">
- <?= _i('refresh') ?> <?= _t('gen.action.actualize') ?>
- </a>
+ <fieldset>
+ <legend><?= _t('sub.feed.archiving') ?></legend>
+ <div class="form-group">
+ <div class="group-controls">
+ <?= _t('sub.feed.number_entries', $nbEntries) ?>
+ <a class="btn" href="<?= _url('feed', 'actualize', 'id', $this->feed->id(), '#', 'slider') ?>">
+ <?= _i('refresh') ?> <?= _t('gen.action.actualize') ?>
+ </a>
+ </div>
</div>
- </div>
- <?php
- $archiving = $this->feed->attributeArray('archiving');
- /** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
- if (empty($archiving)) {
- $archiving = [ 'default' => true ];
- } else {
- $archiving['default'] = false;
- }
- $volatile = [
- 'enable_keep_period' => false,
- 'keep_period_count' => '3',
- 'keep_period_unit' => 'P1M',
- ];
- if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
- if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
- $volatile['enable_keep_period'] = true;
- $volatile['keep_period_count'] = $matches['count'];
- $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
+ <?php
+ $archiving = $this->feed->attributeArray('archiving');
+ /** @var array<'default'?:bool,'keep_period'?:string,'keep_max'?:int,'keep_min'?:int,'keep_favourites'?:bool,'keep_labels'?:bool,'keep_unreads'?:bool>|null $archiving */
+ if (empty($archiving)) {
+ $archiving = [ 'default' => true ];
+ } else {
+ $archiving['default'] = false;
+ }
+ $volatile = [
+ 'enable_keep_period' => false,
+ 'keep_period_count' => '3',
+ 'keep_period_unit' => 'P1M',
+ ];
+ if (!empty($archiving['keep_period']) && is_string($archiving['keep_period'])) {
+ if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) {
+ $volatile['enable_keep_period'] = true;
+ $volatile['keep_period_count'] = $matches['count'];
+ $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']);
+ }
+ }
+ //Defaults
+ if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
+ $archiving['keep_max'] = 0;
+ }
+ if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
+ $archiving['keep_min'] = 50;
+ }
+ if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
+ $archiving['keep_favourites'] = true;
+ }
+ if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
+ $archiving['keep_labels'] = true;
}
- }
- //Defaults
- if (!isset($archiving['keep_max']) || !is_int($archiving['keep_max'])) {
- $archiving['keep_max'] = 0;
- }
- if (!isset($archiving['keep_min']) || !is_int($archiving['keep_min'])) {
- $archiving['keep_min'] = 50;
- }
- if (!isset($archiving['keep_favourites']) || !is_bool($archiving['keep_favourites'])) {
- $archiving['keep_favourites'] = true;
- }
- if (!isset($archiving['keep_labels']) || !is_bool($archiving['keep_labels'])) {
- $archiving['keep_labels'] = true;
- }
- if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
- $archiving['keep_unreads'] = false;
- }
- ?>
-
- <p class="alert alert-warn">
- <?= _t('conf.archiving.policy_warning') ?>
- </p>
-
- <div class="form-group">
- <div class="group-name"><?= _t('conf.archiving.policy') ?></div>
- <div class="group-controls">
- <label class="checkbox">
- <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
- <?= _t('gen.short.by_default') ?>
- </label>
+ if (!isset($archiving['keep_unreads']) || !is_bool($archiving['keep_unreads'])) {
+ $archiving['keep_unreads'] = false;
+ }
+ ?>
+
+ <p class="alert alert-warn">
+ <?= _t('conf.archiving.policy_warning') ?>
+ </p>
+
+ <div class="form-group">
+ <div class="group-name"><?= _t('conf.archiving.policy') ?></div>
+ <div class="group-controls">
+ <label class="checkbox">
+ <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
+ <?= _t('gen.short.by_default') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="enable_keep_max">
- <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
- data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
- <?= _t('conf.archiving.keep_max') ?>
- <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
- data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="enable_keep_max">
+ <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
+ <?= _t('conf.archiving.keep_max') ?>
+ <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="enable_keep_period">
- <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_period') ?>
- <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
- data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
- <select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
- <option></option>
- <option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
- <option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
- <option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
- <option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
- <option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
- </select>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="enable_keep_period">
+ <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_period') ?>
+ <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
+ data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
+ <select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
+ <option></option>
+ <option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
+ <option value="P1M" <?= 'P1M' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.months') ?></option>
+ <option value="P1W" <?= 'P1W' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.weeks') ?></option>
+ <option value="P1D" <?= 'P1D' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.days') ?></option>
+ <option value="PT1H" <?= 'PT1H' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.hours') ?></option>
+ </select>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-name"><?= _t('conf.archiving.exception') ?></div>
- <div class="group-controls">
- <label class="checkbox" for="keep_favourites">
- <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_favourites') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-name"><?= _t('conf.archiving.exception') ?></div>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_favourites">
+ <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_favourites') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="keep_labels">
- <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
- <?= _t('conf.archiving.keep_labels') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_labels">
+ <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
+ <?= _t('conf.archiving.keep_labels') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label class="checkbox" for="keep_unreads">
- <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
- data-leave-validation="<?= $archiving['keep_unreads'] ?>"/>
- <?= _t('conf.archiving.keep_unreads') ?>
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label class="checkbox" for="keep_unreads">
+ <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_unreads'] ?>"/>
+ <?= _t('conf.archiving.keep_unreads') ?>
+ </label>
+ </div>
</div>
- </div>
- <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
- <div class="group-controls">
- <label for="keep_min"><?= _t('sub.feed.keep_min') ?>
- <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
- data-leave-validation="<?= $archiving['keep_min'] ?>">
- </label>
+ <div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
+ <div class="group-controls">
+ <label for="keep_min"><?= _t('sub.feed.keep_min') ?>
+ <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
+ data-leave-validation="<?= $archiving['keep_min'] ?>">
+ </label>
+ </div>
</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>
- <button type="submit" class="btn btn-attention confirm" formmethod="post" formaction="<?= _url('feed', 'truncate', 'id', $this->feed->id(), '#', 'slider') ?>"><?= _t('gen.action.truncate') ?></button>
+ <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>
+ <button type="submit" class="btn btn-attention confirm" formmethod="post" formaction="<?= _url('feed', 'truncate', 'id', $this->feed->id(), '#', 'slider') ?>"><?= _t('gen.action.truncate') ?></button>
+ </div>
</div>
- </div>
+ </fieldset>
- <legend><?= _t('sub.feed.kind') ?></legend>
- <div class="form-group">
- <label class="group-name" for="feed_kind"><?= _t('sub.feed.kind') ?></label>
- <div class="group-controls">
- <select name="feed_kind" id="feed_kind" class="select-show w100">
- <option value="<?= FreshRSS_Feed::KIND_RSS ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_RSS ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.rss') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_XML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_JSONFEED ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSONFEED ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.jsonfeed') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSON_DOTPATH ? 'selected="selected"' : '' ?> data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotpath') ?></option>
- </select>
+ <fieldset>
+ <legend><?= _t('sub.feed.kind') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="feed_kind"><?= _t('sub.feed.kind') ?></label>
+ <div class="group-controls">
+ <select name="feed_kind" id="feed_kind" class="select-show w100">
+ <option value="<?= FreshRSS_Feed::KIND_RSS ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_RSS ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.rss') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_HTML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_XML_XPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_XML_XPATH ? 'selected="selected"' : '' ?> data-show="html_xpath"><?= _t('sub.feed.kind.xml_xpath') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_JSONFEED ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSONFEED ? 'selected="selected"' : '' ?>><?= _t('sub.feed.kind.jsonfeed') ?></option>
+ <option value="<?= FreshRSS_Feed::KIND_JSON_DOTPATH ?>" <?= $this->feed->kind() === FreshRSS_Feed::KIND_JSON_DOTPATH ? 'selected="selected"' : '' ?> data-show="json_dotpath"><?= _t('sub.feed.kind.json_dotpath') ?></option>
+ </select>
+ </div>
</div>
- </div>
+ </fieldset>
<fieldset id="html_xpath">
<?php
@@ -586,175 +595,178 @@
<textarea class="valid-json w100" name="jsonItemUid" id="jsonItemUid" rows="2" cols="64" spellcheck="false" data-leave-validation="<?= $jsonSettings['itemUid'] ?? '' ?>"><?= $jsonSettings['itemUid'] ?? '' ?></textarea>
</div>
</div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
+ </div>
+ </div>
</fieldset>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button class="btn btn-important"><?= _t('gen.action.submit') ?></button>
- <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
+ <fieldset>
+ <legend><?= _t('sub.feed.advanced') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="path_entries"><?= _t('sub.feed.css_path') ?></label>
+ <div class="group-controls">
+ <div class="stick w100">
+ <input type="text" name="path_entries" id="path_entries" class="w100" value="<?= $this->feed->pathEntries() ?>"
+ data-leave-validation="<?= $this->feed->pathEntries() ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <a id="popup-preview-selector" class="btn" href="<?=
+ _url('feed', 'contentSelectorPreview', 'id', $this->feed->id(), 'selector', 'selector-token', 'selector_filter', 'selector-filter-token', '#', 'slider') ?>"><?= _i('look') ?></a>
+ </div>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_help') ?></p>
+ </div>
</div>
- </div>
- <legend><?= _t('sub.feed.advanced') ?></legend>
- <div class="form-group">
- <label class="group-name" for="path_entries"><?= _t('sub.feed.css_path') ?></label>
- <div class="group-controls">
- <div class="stick w100">
- <input type="text" name="path_entries" id="path_entries" class="w100" value="<?= $this->feed->pathEntries() ?>"
- data-leave-validation="<?= $this->feed->pathEntries() ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <a id="popup-preview-selector" class="btn" href="<?=
- _url('feed', 'contentSelectorPreview', 'id', $this->feed->id(), 'selector', 'selector-token', 'selector_filter', 'selector-filter-token', '#', 'slider') ?>"><?= _i('look') ?></a>
+ <div class="form-group">
+ <?php
+ $path_entries_filter = Minz_Helper::htmlspecialchars_utf8($this->feed->attributeString('path_entries_filter') ?? '');
+ ?>
+ <label class="group-name" for="path_entries_filter"><?= _t('sub.feed.css_path_filter') ?></label>
+ <div class="group-controls">
+ <div class="w100">
+ <input type="text" name="path_entries_filter" id="path_entries_filter" class="w100" value="<?= $path_entries_filter ?>"
+ data-leave-validation="<?= $path_entries_filter ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ </div>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_path_filter.help') ?></p>
</div>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_help') ?></p>
</div>
- </div>
- <div class="form-group">
- <?php
- $path_entries_filter = Minz_Helper::htmlspecialchars_utf8($this->feed->attributeString('path_entries_filter') ?? '');
- ?>
- <label class="group-name" for="path_entries_filter"><?= _t('sub.feed.css_path_filter') ?></label>
- <div class="group-controls">
- <div class="w100">
- <input type="text" name="path_entries_filter" id="path_entries_filter" class="w100" value="<?= $path_entries_filter ?>"
- data-leave-validation="<?= $path_entries_filter ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <div class="form-group">
+ <label class="group-name" for="curl_params_cookie"><?= _t('sub.feed.css_cookie') ?></label>
+ <div class="group-controls">
+ <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="w100" value="<?=
+ $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_COOKIE]) ?
+ $this->feed->attributeArray('curl_params')[CURLOPT_COOKIE] : ''
+ ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_cookie_help') ?></p>
+ <label for="curl_params_cookiefile">
+ <input type="checkbox" name="curl_params_cookiefile" id="curl_params_cookiefile" value="1"<?=
+ $this->feed->attributeArray('curl_params') !== null && isset($this->feed->attributeArray('curl_params')[CURLOPT_COOKIEFILE]) ?
+ ' checked="checked"' : ''
+ ?> />
+ <?= _t('sub.feed.accept_cookies') ?>
+ </label>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.accept_cookies_help') ?></p>
</div>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_path_filter.help') ?></p>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="curl_params_cookie"><?= _t('sub.feed.css_cookie') ?></label>
- <div class="group-controls">
- <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="w100" value="<?=
- $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_COOKIE]) ?
- $this->feed->attributeArray('curl_params')[CURLOPT_COOKIE] : ''
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_cookie_help') ?></p>
- <label for="curl_params_cookiefile">
- <input type="checkbox" name="curl_params_cookiefile" id="curl_params_cookiefile" value="1"<?=
- $this->feed->attributeArray('curl_params') !== null && isset($this->feed->attributeArray('curl_params')[CURLOPT_COOKIEFILE]) ?
- ' checked="checked"' : ''
- ?> />
- <?= _t('sub.feed.accept_cookies') ?>
- </label>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.accept_cookies_help') ?></p>
+ <div class="form-group">
+ <label class="group-name" for="curl_params_redirects"><?= _t('sub.feed.max_http_redir') ?></label>
+ <div class="group-controls">
+ <input type="number" name="curl_params_redirects" id="curl_params_redirects" class="w50" min="-1" value="<?=
+ $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_MAXREDIRS]) ?
+ $this->feed->attributeArray('curl_params')[CURLOPT_MAXREDIRS] : ''
+ ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.max_http_redir_help') ?></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="curl_params_redirects"><?= _t('sub.feed.max_http_redir') ?></label>
- <div class="group-controls">
- <input type="number" name="curl_params_redirects" id="curl_params_redirects" class="w50" min="-1" value="<?=
- $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_MAXREDIRS]) ?
- $this->feed->attributeArray('curl_params')[CURLOPT_MAXREDIRS] : ''
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.max_http_redir_help') ?></p>
+ <div class="form-group">
+ <label class="group-name" for="content_action"><?= _t('sub.feed.content_action') ?></label>
+ <div class="group-controls">
+ <select name="content_action" id="content_action" class="w50">
+ <option value="replace"<?= 'replace' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.replace') ?></option>
+ <option value="prepend"<?= 'prepend' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.prepend') ?></option>
+ <option value="append"<?= 'append' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.append') ?></option>
+ </select>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="content_action"><?= _t('sub.feed.content_action') ?></label>
- <div class="group-controls">
- <select name="content_action" id="content_action" class="w50">
- <option value="replace"<?= 'replace' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.replace') ?></option>
- <option value="prepend"<?= 'prepend' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.prepend') ?></option>
- <option value="append"<?= 'append' === $this->feed->attributeString('content_action') ? ' selected="selected"' : '' ?>><?= _t('sub.feed.content_action.append') ?></option>
- </select>
+ <div class="form-group">
+ <label class="group-name" for="curl_params_useragent"><?= _t('sub.feed.useragent') ?></label>
+ <div class="group-controls">
+ <input type="text" name="curl_params_useragent" id="curl_params_useragent" class="w100" value="<?=
+ $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_USERAGENT]) ?
+ $this->feed->attributeArray('curl_params')[CURLOPT_USERAGENT] : ''
+ ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="curl_params_useragent"><?= _t('sub.feed.useragent') ?></label>
- <div class="group-controls">
- <input type="text" name="curl_params_useragent" id="curl_params_useragent" class="w100" value="<?=
- $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_USERAGENT]) ?
- $this->feed->attributeArray('curl_params')[CURLOPT_USERAGENT] : ''
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
+ <div class="form-group">
+ <label class="group-name" for="proxy_type"><?= _t('sub.feed.proxy') ?></label>
+ <div class="group-controls">
+ <select name="proxy_type" id="proxy_type"><?php
+ $type = '';
+ if ($this->feed->attributeArray('curl_params') !== null && isset($this->feed->attributeArray('curl_params')[CURLOPT_PROXYTYPE])) {
+ $type = $this->feed->attributeArray('curl_params')[CURLOPT_PROXYTYPE];
+ }
+ foreach(['' => '', 3 => 'NONE', 0 => 'HTTP', 2 => 'HTTPS', 4 => 'SOCKS4', 6 => 'SOCKS4A', 5 => 'SOCKS5', 7 => 'SOCKS5H'] as $k => $v) {
+ echo '<option value="' . $k . ($type === $k ? '" selected="selected' : '' ) . '">' . $v . '</option>';
+ }
+ ?>
+ </select>
+ <input type="text" name="curl_params" id="curl_params" value="<?=
+ $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_PROXY]) ?
+ $this->feed->attributeArray('curl_params')[CURLOPT_PROXY] : ''
+ ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_help') ?></p>
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="proxy_type"><?= _t('sub.feed.proxy') ?></label>
- <div class="group-controls">
- <select name="proxy_type" id="proxy_type"><?php
- $type = '';
- if ($this->feed->attributeArray('curl_params') !== null && isset($this->feed->attributeArray('curl_params')[CURLOPT_PROXYTYPE])) {
- $type = $this->feed->attributeArray('curl_params')[CURLOPT_PROXYTYPE];
+ <div class="form-group">
+ <label class="group-name" for="curl_method"><?= _t('sub.feed.method') ?></label>
+ <div class="group-controls">
+ <select class="number" name="curl_method" id="curl_method"><?php
+ $curl_method = 'GET';
+ if ($this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_POST])) {
+ $curl_method = 'POST';
}
- foreach(['' => '', 3 => 'NONE', 0 => 'HTTP', 2 => 'HTTPS', 4 => 'SOCKS4', 6 => 'SOCKS4A', 5 => 'SOCKS5', 7 => 'SOCKS5H'] as $k => $v) {
- echo '<option value="' . $k . ($type === $k ? '" selected="selected' : '' ) . '">' . $v . '</option>';
+ foreach (['GET' => 'GET', 'POST' => 'POST'] as $k => $v) {
+ echo '<option value="' . $k . ($curl_method === $k ? '" selected="selected' : '') . '">' . $v . '</option>';
}
- ?>
- </select>
- <input type="text" name="curl_params" id="curl_params" value="<?=
- $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_PROXY]) ?
- $this->feed->attributeArray('curl_params')[CURLOPT_PROXY] : ''
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_help') ?></p>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="curl_method"><?= _t('sub.feed.method') ?></label>
- <div class="group-controls">
- <select class="number" name="curl_method" id="curl_method"><?php
- $curl_method = 'GET';
- if ($this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_POST])) {
- $curl_method = 'POST';
- }
- foreach (['GET' => 'GET', 'POST' => 'POST'] as $k => $v) {
- echo '<option value="' . $k . ($curl_method === $k ? '" selected="selected' : '') . '">' . $v . '</option>';
- }
- ?>
- </select>
- <div class="stick">
- <input type="text" name="curl_fields" id="curl_fields" value="<?=
- $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS]) ?
- htmlentities($this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS], ENT_COMPAT) : ''
- ?>" placeholder="<?= _t('sub.feed.method_postparams') ?>" />
+ ?>
+ </select>
+ <div class="stick">
+ <input type="text" name="curl_fields" id="curl_fields" value="<?=
+ $this->feed->attributeArray('curl_params') !== null && !empty($this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS]) ?
+ htmlentities($this->feed->attributeArray('curl_params')[CURLOPT_POSTFIELDS], ENT_COMPAT) : ''
+ ?>" placeholder="<?= _t('sub.feed.method_postparams') ?>" />
+ </div>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.method_help') ?></p>
</div>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.method_help') ?></p>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="timeout"><?= _t('sub.feed.timeout') ?></label>
- <div class="group-controls">
- <input type="number" name="timeout" id="timeout" class="w50" min="3" max="900" value="<?= $this->feed->attributeInt('timeout') ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
+ <div class="form-group">
+ <label class="group-name" for="timeout"><?= _t('sub.feed.timeout') ?></label>
+ <div class="group-controls">
+ <input type="number" name="timeout" id="timeout" class="w50" min="3" max="900" value="<?= $this->feed->attributeInt('timeout') ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
+ </div>
</div>
- </div>
- <div class="form-group">
- <label class="group-name" for="ssl_verify"><?= _t('sub.feed.ssl_verify') ?></label>
- <div class="group-controls">
- <select name="ssl_verify" id="ssl_verify" class="w50">
- <option value=""<?= $this->feed->attributeBoolean('ssl_verify') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
- <option value="0"<?= $this->feed->attributeBoolean('ssl_verify') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
- <option value="1"<?= $this->feed->attributeBoolean('ssl_verify') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
- </select>
+ <div class="form-group">
+ <label class="group-name" for="ssl_verify"><?= _t('sub.feed.ssl_verify') ?></label>
+ <div class="group-controls">
+ <select name="ssl_verify" id="ssl_verify" class="w50">
+ <option value=""<?= $this->feed->attributeBoolean('ssl_verify') === null ? ' selected="selected"' : '' ?>><?= _t('gen.short.by_default') ?></option>
+ <option value="0"<?= $this->feed->attributeBoolean('ssl_verify') === false ? ' selected="selected"' : '' ?>><?= _t('gen.short.no') ?></option>
+ <option value="1"<?= $this->feed->attributeBoolean('ssl_verify') === true ? ' selected="selected"' : '' ?>><?= _t('gen.short.yes') ?></option>
+ </select>
+ </div>
</div>
- </div>
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="clear_cache">
- <input type="checkbox" name="clear_cache" id="clear_cache" value="1"<?= $this->feed->attributeBoolean('clear_cache') ? ' checked="checked"' : '' ?> />
- <?= _t('sub.feed.clear_cache') ?>
- </label>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="clear_cache">
+ <input type="checkbox" name="clear_cache" id="clear_cache" value="1"<?= $this->feed->attributeBoolean('clear_cache') ? ' checked="checked"' : '' ?> />
+ <?= _t('sub.feed.clear_cache') ?>
+ </label>
+ </div>
</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 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>
- </div>
+ </fieldset>
</form>
- <legend><?= _t('sub.feed.maintenance.title') ?></legend>
+
+ <h2><?= _t('sub.feed.maintenance.title') ?></h2>
<div class="form-group">
<div class="group-controls">
<a class="btn btn-important" href="<?= _url('feed', 'clearCache', 'id', $this->feed->id(), '#', 'slider') ?>">