- Author:
- nnrcschmdt
- Posted:
- March 23, 2008
- Language:
- HTML/template
- Version:
- Not specified
- Score:
- 2 (after 2 ratings)
This template extends the change form for the flatpages inside the admin interface to use Yahoo! User Interface Library's Rich Text Editor.
It should be named change_form.html
and be placed in the admin/flatpages/flatpage/
directory of the project templates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | {% extends "admin/change_form.html" %}
{% block extrastyle %}
<link rel="stylesheet" type="text/css"
href="http://yui.yahooapis.com/2.5.1/build/assets/skins/sam/skin.css">
{% endblock %}
{% block extrahead %}
{{ block.super }}
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/element/element-beta.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/container/container_core.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/menu/menu.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/button/button.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/editor/editor-beta.js"></script>
{% endblock %}
{% block bodyclass %}{{ block.super }} change-form yui-skin-sam{% endblock %}
{% block after_field_sets %}
<script type="text/javascript">
var editor = new YAHOO.widget.Editor('id_content', { handleSubmit: true});
editor.render();
</script>
{% endblock %}
|
More like this
- Bootstrap Accordian by Netplay4 5 years, 10 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
- Reusable form template with generic view by roldandvg 8 years, 11 months ago
- Pagination Django with Boostrap by guilegarcia 9 years, 1 month ago
Comments
extrastyle also needs {{block.super}} (otherwise the whole page is broken), though i just moved styles to extrahead. Also "change-form" body class duplicates definition in parent.
#
Please login first before commenting.