diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2023-08-03 21:38:50 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2023-08-03 21:38:50 +0000 |
commit | a45bcb74dde80ee576bfcbc2f3efb719e8f6b2d9 (patch) | |
tree | a0407eb415e89b8660a8a8d1566230ebf0223e94 /views | |
parent | fc56c91d09da2d9c929be5469fcae73ed2f9d5e3 (diff) | |
download | tagrss-a45bcb74dde80ee576bfcbc2f3efb719e8f6b2d9.tar tagrss-a45bcb74dde80ee576bfcbc2f3efb719e8f6b2d9.tar.gz tagrss-a45bcb74dde80ee576bfcbc2f3efb719e8f6b2d9.zip |
Allow setting custom title on /add_feed, improve form layout
Diffstat (limited to 'views')
-rw-r--r-- | views/add_feed.tpl | 20 | ||||
-rw-r--r-- | views/manage_feed.tpl | 16 | ||||
-rw-r--r-- | views/tag_input.tpl | 5 |
3 files changed, 21 insertions, 20 deletions
diff --git a/views/add_feed.tpl b/views/add_feed.tpl index 4b139d3..04a1008 100644 --- a/views/add_feed.tpl +++ b/views/add_feed.tpl @@ -8,20 +8,20 @@ </head> <body> <a href="/" class="no-visited-indication">< home</a> - % if not get("already_present", False): - % if get("after_add", False): - <p><em>Added feed {{feed_source}}</em></p> - % end - % else: - <p><em>Feed {{feed_source}} was already added; no changes made.</em></p> + % if get("after_add", False): + <p><em>Added feed {{feed_source}}</em></p> % end <h1>Add a feed</h1> <form method="post"> - <label>Source: - <input type="url" name="feed_source"> - </label> - <br> + <div> + <label for="feed-source-input">Source:</label> + <input type="url" name="feed_source" id="feed-source-input"> + </div> % include("tag_input.tpl", input_name="tags") + <div> + <label for="title-input">Custom title (optional):</label> + <input type="text" name="title" id="title-input"> + </div> <input type="submit" value="Add"> </form> % include("footer.tpl") diff --git a/views/manage_feed.tpl b/views/manage_feed.tpl index dce9dc5..a26c6bc 100644 --- a/views/manage_feed.tpl +++ b/views/manage_feed.tpl @@ -35,13 +35,15 @@ </tr> </table> <form method="post"> - <input type="number" name="id" value="{{feed['id']}}" style="display: none;"> - <label>Title: - <input type="text" name="title" value="{{feed['title']}}"><br> - </label> - <label>Source: - <input type="text" name="source" value="{{feed['source']}}"><br> - </label> + <input type="hidden" name="id" value="{{feed['id']}}"> + <div> + <label for="title-input">Title:</label> + <input type="text" name="title" value="{{feed['title']}}" id="title-input"> + </div> + <div> + <label for="source-input">Source:</label> + <input type="text" name="source" value="{{feed['source']}}" id="source-input"> + </div> % include("tag_input.tpl", input_name="tags", input_value=feed["serialised_tags"]) <input type="submit" value="Update" name="update_feed"> </form> diff --git a/views/tag_input.tpl b/views/tag_input.tpl index 99145e9..409360f 100644 --- a/views/tag_input.tpl +++ b/views/tag_input.tpl @@ -1,6 +1,5 @@ <div class="side-by-side-help-container"> - <label>{{get("label", "Tags:")}} - <input type="text" name="{{input_name}}" value="{{get('input_value', '')}}"> - </label> + <label for="tag-input">{{get("label", "Tags:")}}</label> + <input type="text" name="{{input_name}}" value="{{get('input_value', '')}}" id="tag-input"> % include("hover_help.tpl", text="Space-separated. Backslashes escape spaces.") </div> |