aboutsummaryrefslogtreecommitdiff
path: root/app/views/subscription/add.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-07-04 09:53:26 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-04 09:53:26 +0200
commit509c8cae6381ec46af7c8303eb92fda6ce496a4a (patch)
tree653f7f44df842f9d7135decd89467879a0098c50 /app/views/subscription/add.phtml
parent57d571230eeb2d3ede57e640b640f17c7a2298a2 (diff)
Dynamic OPML (#4407)
* Dynamic OPML draft #fix https://github.com/FreshRSS/FreshRSS/issues/4191 * Export dynamic OPML http://opml.org/spec2.opml#1629043127000 * Restart with simpler approach * Minor revert * Export dynamic OPML also for single feeds * Special category type for importing dynamic OPML * Parameter for excludeMutedFeeds * Details * More draft * i18n * Fix update * Draft manual import working * Working manual refresh * Draft automatic update * Working Web refresh + fixes * Import/export dynamic OPML settings * Annoying numerous lines in SQL logs * Fix minor JavaScript error * Fix auto adding new columns * Add require * Add missing 🗲 * Missing space * Disable adding new feeds to dynamic categories * Link from import * i18n typo * Improve theme icon function * Fix pink-dark
Diffstat (limited to 'app/views/subscription/add.phtml')
-rw-r--r--app/views/subscription/add.phtml40
1 files changed, 38 insertions, 2 deletions
diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtml
index 9e5b2a399..5aadc350b 100644
--- a/app/views/subscription/add.phtml
+++ b/app/views/subscription/add.phtml
@@ -15,7 +15,7 @@
<div class="form-group">
<label class="group-name" for="new-category"><?= _t('sub.category') ?></label>
<div class="group-controls">
- <input id="new-category" name="new-category" type="text" autocomplete="off"/>
+ <input id="new-category" name="new-category" type="text" required="required" autocomplete="off" />
</div>
</div>
@@ -45,7 +45,12 @@
<label class="group-name" for="category"><?= _t('sub.category') ?></label>
<div class="group-controls">
<select name="category" id="category">
- <?php foreach ($this->categories as $cat) { ?>
+ <?php
+ foreach ($this->categories as $cat) {
+ if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) {
+ continue;
+ }
+ ?>
<option value="<?= $cat->id() ?>"<?= $cat->id() == ( Minz_Request::param('cat_id') ?: 1 ) ? ' selected="selected"' : '' ?>>
<?= $cat->name() ?>
</option>
@@ -218,4 +223,35 @@
</div>
</div>
</form>
+
+ <h2>
+ <?= _t('sub.title.add_dynamic_opml') ?>
+ <?= _i('opml-dyn') ?>
+ </h2>
+ <form action="<?= _url('category', 'create') ?>" method="post">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+ <div class="form-group">
+ <label class="group-name" for="new-category"><?= _t('sub.category') ?></label>
+ <div class="group-controls">
+ <input id="new-category" name="new-category" type="text" required="required" autocomplete="off" />
+ </div>
+ </div>
+
+ <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" required="required" autocomplete="off" class="long" />
+ <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('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.add') ?></button>
+ </div>
+ </div>
+ </form>
</main>