diff options
author | Andrew Dolgov <[email protected]> | 2019-03-03 06:18:19 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-03-03 06:18:19 +0300 |
commit | cc57ed377544b5b8a07d18d3c59117654886649e (patch) | |
tree | 5491421362767397dae2826dc1918c77f242784e | |
parent | 79945082b31689f6bbb8e074336ad20a96c81a64 (diff) |
public/subscribe: add basic dialog to enter feed urls
-rwxr-xr-x | classes/handler/public.php | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index 5cb5bd64a..c3f18d8bb 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -772,7 +772,21 @@ class Handler_Public extends Handler { <?php if (!$feed_url) { - print_error("No feed to subscribe to."); + ?> + <form method="post"> + <input type="hidden" name="op" value="subscribe"> + <fieldset> + <label>Feed or site URL:</label> + <input style="width: 300px" dojoType="dijit.form.ValidationTextBox" required="1" name="feed_url"> + </fieldset> + + <button class="alt-primary" dojoType="dijit.form.Button" type="submit"> + <?php echo __("Subscribe") ?> + </button> + + <a href="index.php"><?php echo __("Return to Tiny Tiny RSS") ?></a> + </form> + <?php } else { $rc = Feeds::subscribe_to_feed($feed_url); @@ -816,9 +830,11 @@ class Handler_Public extends Handler { } print "</select>"; - print "<button class='alt-primary' dojoType='dijit.form.Button' type='submit'>".__("Subscribe to selected feed")."</button>"; print "</fieldset>"; + print "<button class='alt-primary' dojoType='dijit.form.Button' type='submit'>".__("Subscribe to selected feed")."</button>"; + print "<a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>"; + print "</form>"; } @@ -834,20 +850,18 @@ class Handler_Public extends Handler { } else { $feed_id = 0; } - print "<p>"; if ($feed_id) { - print "<form method='GET' style='float : left' action=\"$tp_uri\"> + print "<form method='GET' action=\"$tp_uri\"> <input type='hidden' name='tab' value='feedConfig'> <input type='hidden' name='method' value='editfeed'> <input type='hidden' name='methodparam' value='$feed_id'> <button dojoType='dijit.form.Button' class='alt-info' type='submit'>".__("Edit subscription options")."</button> + <a href='index.php'>".__("Return to Tiny Tiny RSS")."</a> </form>"; } } - print "<a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>"; - print "</div></div></body></html>"; } else { |