]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/wiki/edit.html
wiki: Add help text to what watching a page means
[ipfire.org.git] / src / templates / wiki / edit.html
CommitLineData
d398ca08
MT
1{% extends "base.html" %}
2
3{% block title %}{% if page %}{{ _("Edit %s") % page.title }}{% else %}{{ _("Create A New Page") }}{% end %}{% end block %}
4
6c13ca2d
MT
5{% block sidebar %}
6 {% set help = backend.wiki.get_page("/wiki/edit") %}
7
8 {% if help %}
9 {% raw help.html %}
10 {% end %}
11{% end block %}
12
d398ca08
MT
13{% block main %}
14 <div class="card">
15 <div class="card-body">
16 <h4 class="card-title">
17 {% if page %}{{ _("Edit %s") % page.title }}{% else %}{{ _("Create A New Page") }}{% end %}
18 </h4>
19
b6e8b28f 20 <form action="/actions/edit" method="POST">
d398ca08
MT
21 {% raw xsrf_form_html() %}
22
b6e8b28f 23 <input type="hidden" name="path" value="{{ request.path }}">
d398ca08
MT
24
25 <div class="form-group">
26 <textarea class="form-control" rows="16" name="content" placeholder="{{ _("Text") }}"
27 >{% if page and page.markdown %}{{ page.markdown }}{% end %}</textarea>
28 </div>
29
30 <div class="form-group row">
31 <label class="col-sm-3 col-form-label">{{ _("What has changed?") }}</label>
32 <div class="col-sm-9">
33 <input type="text" class="form-control" name="changes" required>
34 </div>
35 </div>
36
f2e25ded 37 {% if page and not page.is_watched_by(current_user) %}
917d9cfa
MT
38 <div class="form-group form-check">
39 <input type="checkbox" class="form-check-input" name="watch" id="watch" checked>
40 <label class="form-check-label" for="watch">{{ _("Watch this page") }}</label>
bfb776cd
MT
41
42 <p class="form-text text-muted">
43 {{ _("Get notified when this page is changed") }}
44 </p>
917d9cfa
MT
45 </div>
46 {% end %}
d64a1e35 47
d398ca08
MT
48 <button type="submit" class="btn btn-primary btn-block">
49 {% if page %}{{ _("Save Page") }}{% else %}{{ _("Create Page") }}{% end %}
50 </button>
51 </form>
52 </div>
53 </div>
54{% end block %}