2cdb554623
* Fixes an incorrect link in dashboard * Disables the symposion sponsors app * Adds redirect links for login/logout; adds THEME_CONTACT_EMAIL value * Re-adds colophon/copyright message. * Adds AceMarkdownEditor widget * Tidies up the generated HTML * Tidies up form snippet behaviour * Proposals forms now use the markdown editor * Monkey patches the markdown editor into the speaker form. * Adds missing field to proposal details * Fixes #10 — adds a link to random unreviewed proposals * Minor tweaks
16 lines
471 B
Python
16 lines
471 B
Python
from django import forms
|
|
|
|
class AceMarkdownEditor(forms.Textarea):
|
|
|
|
def render(self, name, value, attrs):
|
|
original = super(AceMarkdownEditor, self).render(name, value, attrs)
|
|
ret = '''
|
|
%s
|
|
<script>
|
|
window.addEventListener("load", () => {
|
|
editor = loadEditor("%s");
|
|
}, 0);
|
|
</script>
|
|
''' % (original, attrs["id"])
|
|
|
|
return ret
|