Add messaging.
[wolnelektury.git] / src / messaging / templates / admin / messaging / emailtemplate / change_form.html
diff --git a/src/messaging/templates/admin/messaging/emailtemplate/change_form.html b/src/messaging/templates/admin/messaging/emailtemplate/change_form.html
new file mode 100644 (file)
index 0000000..89c95d2
--- /dev/null
@@ -0,0 +1,19 @@
+{% extends 'admin/change_form.html' %}
+
+
+{% block admin_change_form_document_ready %}
+{{ block.super }}
+
+       <script>
+(function($) {
+       $("#id_state").on('change', function() {
+               $this = $(this);
+               $.get("/messaging/states/" + $(this).val() + "/info.json", function(data) {
+                       $(".help", $this.parent()).html(data.help);
+               }, "json");
+       });
+})(django.jQuery);
+
+       </script>
+
+{% endblock %}