aboutsummaryrefslogtreecommitdiff
path: root/src/web/templates/edit_feed.html
blob: fd2427c104bab93921af86f4b9210da997f3a6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{% extends "layout.html" %}
{% block content %}
<div class="container">
    <div class="well">
        <h3>{{ action }}</h3>
        <form action="" method="post" name="save" class="form-horizontal">
            {{ form.hidden_tag() }}
            <div class="form-group">
                <label for="{{ form.link.id }}" class="col-sm-3 control-label">{{ form.link.label }}</label>
                <div class="col-sm-9">
                    {{ form.link(class_="form-control", size="100%") }}
                </div>
                {% for error in form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
            </div>

            <div class="form-group">
                <label for="{{ form.title.id }}" class="col-sm-3 control-label">{{ form.title.label }}</label>
                <div class="col-sm-9">
                    {{ form.title(class_="form-control", size="100%", placeholder=_('Optional')) }}
                </div>
                {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
            </div>

            <div class="form-group">
                <label for="{{ form.site_link.id }}" class="col-sm-3 control-label">{{ form.site_link.label }}</label>
                <div class="col-sm-9">
                    {{ form.site_link(class_="form-control", size="100%", placeholder=_('Optional')) }}
                </div>
                {% for error in form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
            </div>

            <div class="form-group">
                <label for="{{ form.category_id.id }}" class="col-sm-3 control-label">{{ form.category_id.label }}</label>
                <div class="col-sm-9">
                    {{ form.category_id(class_="form-control", placeholder=_('Optional')) }}
                </div>
                {% for error in form.category_id.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
            </div>

            <div class="form-group">
                <label for="{{ form.enabled.id }}" class="col-sm-3 control-label">{{ form.enabled.label }}</label>
                <div class="col-sm-9">
                    <div class="checkbox">
                        {{ form.enabled(class_="checkbox",  style="margin-left: 0px;") }}
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="{{ form.private.id }}" class="col-sm-3 control-label">{{ form.private.label }}</label>
                <div class="col-sm-9">
                    <div class="checkbox">
                        {{ form.private(class_="checkbox",  style="margin-left: 0px;") }}
                    </div>
                    <span class="text-muted">{{ _("If checked, articles of this feed won't be available to others and the feed won't be listed on <a href='%(url)s'>your profile page</a>.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }}</span>
                </div>

            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{{ _("Filters") }}</label>
                <div class="col-sm-1">
                    <input value="+" type="button" class="form-control" id="add-feed-filter-row" />
                </div>
            </div>
            <div class="form-inline col-sm-offset-4 col-sm-8" id="filters-container">
                {% if feed %}
                    {% for filter_ in feed.filters or [] %}
                        <div class="form-group">
                            <input value="-" type="button" class="form-control del-feed-filter-row" />
                            <select name="type" class="form-control" >
                                <option value="simple match" {% if filter_.get("type") == "simple match" %}selected{% endif %}>{{ _("simple match") }}</option>
                                <option value="regex" {% if filter_.get("type") == "regex" %}selected{% endif %}>{{ _("regex") }}</option>
                            </select>
                            <input type="text" class="form-control" value="{{ filter_.get("pattern") }}" name="pattern" />
                            <select name="action_on" class="form-control">
                                <option value="match" {% if filter_.get("action on") == "match" %}selected{% endif %}>{{ _("match") }}</option>
                                <option value="no match" {% if filter_.get("action on") == "no match" %}selected{% endif %}>{{ _("no match") }}</option>
                            </select>
                            <select name="action" class="form-control">
                                <option value="mark as read" {% if filter_.get("action") == "mark as read" %}selected{% endif %}>{{ _("mark as read") }}</option>
                                <option value="mark as favorite" {% if filter_.get("action") == "mark as favorite" %}selected{% endif %}>{{ _("mark as favorite") }}</option>
                            </select>
                        </div>
                    {% endfor %}
                {% endif %}
            </div>

            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    {{ form.submit(class_="btn btn-default") }}
                </div>
            </div>
        </form>
    </div>
</div><!-- /.container -->
{% endblock %}
bgstack15