Ajout formulaire, liens pour login
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage_django / templates / savoirs / editor.html
1 <script src="{{ MEDIA_URL }}js/jquery/jquery-ui.js"></script>
2 <script src="{{ MEDIA_URL }}js/form.js"></script>
3 <!--script src="{{ MEDIA_URL }}js/json2.js"></script-->
4 <link rel="stylesheet" href="{{ MEDIA_URL }}js/jquery/css/smoothness/jquery-ui-1.8rc3.custom.css" type="text/css" media="all" />
5
6 <script type="text/javascript" language="javascript">
7 var __jf = new JSONForm ('schema', 'mainform', 'jsonsource');
8
9 function saveThis() {
10 __jf.serialize();
11 var data = $("#jsonsource").html ();
12 if (data.length > 0) {
13 $.post('{% url savoirs.views.json_set %}', {'data': data},
14 function () { $('#edit-form').dialog('close') });
15 }
16 }
17 </script>
18
19 <div id="edit-form" style="display: none">
20 <div id="schema" style="display: none">
21 {% include "savoirs/recordmodel.json" %}
22 </div>
23 <div id="mainform" style="text-background: white">
24 </div>
25 <p>
26 <textarea id="jsonsource" style="display: none;"></textarea>
27 <input type="button" value="OK" onclick='saveThis();' style="width: 80px;"/>
28 </p>
29 </div>