]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - templates/admin-planet-compose.html
netboot: Allow booting multiple architectures
[people/shoehn/ipfire.org.git] / templates / admin-planet-compose.html
CommitLineData
66862195 1{% extends "base.html" %}
feb02477 2
8876f3df
MT
3{% block body %}
4 <div class="page-header">
5 <h2>{{ _("Compose new entry") }}</h2>
feb02477
MT
6 </div>
7
8876f3df
MT
8 <form class="form-horizontal" action="" method="POST" name="entry">
9 {% raw xsrf_form_html() %}
10
67ab72b8 11 {% if entry %}
8876f3df
MT
12 <input type="hidden" name="id" value="{{ entry.id }}">
13 {% end %}
14
c9275d4e
MT
15 <div class="form-group">
16 <label class="control-label col-sm-2" for="inputTitle">{{ _("Title") }}</label>
17 <div class="col-sm-10">
18 <input class="form-control" type="text" name="title" id="inputTitle"
67ab72b8 19 {% if entry %}value="{{ entry.title }}"{% end %} placeholder="{{ _("Title") }}">
8876f3df
MT
20 </div>
21 </div>
22
c9275d4e
MT
23 <div class="form-group">
24 <div class="col-sm-10 col-sm-offset-2">
25 <textarea class="form-control" name="markdown" rows="12" id="inputMarkdown"
67ab72b8 26 placeholder="{{ _("Content") }}">{% if entry %}{{ entry.markdown }}{% end %}</textarea>
8876f3df
MT
27 </div>
28 </div>
29
30 <hr>
31
c9275d4e
MT
32 <div class="form-group">
33 <label class="control-label col-sm-2">{{ _("Status") }}</label>
34 <div class="col-sm-10">
67ab72b8 35 <label class="radio inline">
864437e2 36 <input type="radio" name="status" value="draft" {% if not entry or not entry.is_published() %}checked{% end %}>
67ab72b8
MT
37 {{ _("Draft") }}
38 </label>
39 <label class="radio inline">
864437e2 40 <input type="radio" name="status" value="published" {% if entry and entry.is_published() %}checked{% end %}>
67ab72b8
MT
41 {{ _("Published") }}
42 </label>
43 </div>
44 </div>
45
c9275d4e
MT
46 <hr>
47
48 <div class="col-sm-10 col-sm-offset-2">
8876f3df 49 <button type="submit" class="btn btn-primary">{{ _("Save") }}</button>
c9275d4e
MT
50 <a class="btn btn-default" href="javascript:preview();">{{ _("Preview") }}</a>
51 <a class="btn btn-default" href="/planet">{{ _("Cancel") }}</a>
8876f3df
MT
52 </div>
53 </form>
54
c9275d4e
MT
55 <br class="separator">
56
feb02477 57 <div id="preview"></div>
feb02477 58
feb02477
MT
59 <script type="text/javascript">
60 preview = function() {
8876f3df 61 $.postJSON("/api/planet/render", { text : $("#inputMarkdown").val() },
feb02477 62 function(data) {
0e824faf 63 $("#preview").html(data.html);
feb02477
MT
64 }
65 );
66 }
67 </script>
68{% end block %}