]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - templates/admin-planet-compose.html
Move everything to the root of the repository.
[people/shoehn/ipfire.org.git] / templates / admin-planet-compose.html
CommitLineData
feb02477
MT
1{% extends "admin-base.html" %}
2
60024cc8 3{% block bodyA %}
feb02477
MT
4 <div class="post">
5 <h3>{{ _("Compose new entry") }}</h3>
6 <form name="entry" method="post">
7 {{ xsrf_form_html() }}
27066195
MT
8 {% if entry.id %}
9 <input type="hidden" name="id" value="{{ entry.id }}">
10 {% end %}
feb02477
MT
11
12 <table>
13 <tr>
14 <td>{{ _("Title") }}</td>
15 <td><input type="text" name="title" value="{{ entry.title }}"
16 size="50" /></td>
17 </tr>
18 <tr>
19 <td>&nbsp;</td>
20 <td>
940227cb 21 <textarea id="markdown" name="markdown" rows="20" cols="80">{{ entry.markdown }}</textarea>
feb02477
MT
22 </td>
23 </tr>
24 <tr>
25 <td colspan="2">
26 <input type="button" onClick="preview()" value="{{ _("Preview") }}" />
27 <input type="submit" value="{{ _("Save") }}" />
28 </td>
29 </tr>
30 </table>
31 </form>
32 </div>
33
34 <div id="preview"></div>
feb02477 35
feb02477
MT
36 <script type="text/javascript">
37 preview = function() {
0e824faf 38 $.postJSON("/api/planet/render", { text : $("#markdown").val() },
feb02477 39 function(data) {
0e824faf 40 $("#preview").html(data.html);
feb02477
MT
41 }
42 );
43 }
44 </script>
45{% end block %}