| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <?php
- /** @var FreshRSS_View $this */
- $this->partial('aside_subscription');
- ?>
- <main class="post drop-section">
- <div class="link-back-wrapper">
- <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
- </div>
- <h1><?= _t('sub.menu.add') ?></h1>
- <h2><?= _t('sub.title.add_category') ?></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" autocomplete="off"/>
- </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>
- <h2><?= _t('sub.title.add_feed') ?></h2>
- <form id="add_rss" method="post" action="<?= _url('feed', 'add') ?>" autocomplete="off">
- <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
- <div class="form-group">
- <label class="group-name" for="url_rss"><?= _t('sub.feed.url') ?></label>
- <div class="group-controls">
- <input id="url_rss" name="url_rss" type="url" required="required" autocomplete="off" class="long" autofocus="autofocus" />
- </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">
- <?php foreach ($this->categories as $cat) { ?>
- <option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
- <?= $cat->name() ?>
- </option>
- <?php } ?>
- </select>
- </div>
- </div>
- <details class="form-advanced">
- <summary class="form-advanced-title">
- <?= _t('sub.feed.kind') ?>
- </summary>
- <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">
- <option value="<?= FreshRSS_Feed::KIND_RSS ?>" selected="selected"><?= _t('sub.feed.kind.rss') ?></option>
- <option value="<?= FreshRSS_Feed::KIND_HTML_XPATH ?>" data-show="html_xpath"><?= _t('sub.feed.kind.html_xpath') ?></option>
- </select>
- </div>
- </div>
- <fieldset id="html_xpath">
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.help') ?></p>
- <div class="form-group">
- <label class="group-name" for="xPathFeedTitle"><small><?= _t('sub.feed.kind.html_xpath.xpath') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.feed_title') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathFeedTitle" id="xPathFeedTitle" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.feed_title.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItem"><small><?= _t('sub.feed.kind.html_xpath.xpath') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItem" id="xPathItem" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemTitle"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_title') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemTitle" id="xPathItemTitle" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_title.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemContent"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_content') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemContent" id="xPathItemContent" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_content.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemUri"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_uri') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemUri" id="xPathItemUri" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_uri.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemThumbnail"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_thumbnail') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemThumbnail" id="xPathItemThumbnail" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_thumbnail.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemAuthor"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_author') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemAuthor" id="xPathItemAuthor" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_author.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemTimestamp"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_timestamp') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemTimestamp" id="xPathItemTimestamp" rows="2" cols="64" spellcheck="false"></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.item_timestamp.help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="xPathItemCategories"><small><?= _t('sub.feed.kind.html_xpath.relative') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.item_categories') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathItemCategories" id="xPathItemCategories" rows="2" cols="64" spellcheck="false"></textarea>
- </div>
- </div>
- </fieldset>
- </details>
- <details class="form-advanced">
- <summary class="form-advanced-title">
- <?= _t('sub.feed.advanced') ?>
- </summary>
- <div class="form-group">
- <label class="group-name" for="http_user"><?= _t('sub.feed.auth.username') ?></label>
- <div class="group-controls">
- <input id="http_user" name="http_user" type="text" autocomplete="off"/>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="http_pass"><?= _t('sub.feed.auth.password') ?></label>
- <div class="group-controls">
- <div class="stick">
- <input id="http_pass" name="http_pass" type="password" value="" autocomplete="new-password" />
- <button type="button" class="btn toggle-password" data-toggle="http_pass"><?= _i('key') ?></button>
- </div>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="curl_params_useragent"><?= _t('sub.feed.useragent') ?></label>
- <div class="group-controls">
- <div class="stick">
- <input type="text" name="curl_params_useragent" id="curl_params_useragent" class="extend" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- </div>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
- </div>
- </div>
- <div class="form-group">
- <label class="group-name" for="proxy_type"><?= _t('sub.feed.proxy') ?></label>
- <div class="group-controls">
- <select class="number" name="proxy_type" id="proxy_type"><?php
- foreach(['' => '', 3 => 'NONE', 0 => 'HTTP', 2 => 'HTTPS', 4 => 'SOCKS4', 6 => 'SOCKS4A', 5 => 'SOCKS5', 7 => 'SOCKS5H'] as $k => $v) {
- echo '<option value="' . $k . '">' . $v . '</option>';
- }
- ?>
- </select>
- <div class="stick">
- <input type="text" name="curl_params" id="curl_params" class="extend" value="" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- </div>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_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" min="3" max="120" value="" placeholder="<?= _t('gen.short.by_default') ?>" />
- </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">
- <option value=""><?= _t('gen.short.by_default') ?></option>
- <option value="0"><?= _t('gen.short.no') ?></option>
- <option value="1"><?= _t('gen.short.yes') ?></option>
- </select>
- </div>
- </div>
- </details>
- <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>
|