{% extends "admin/cms/usersettings/change_form.html" %}
{% load admin_static admin_urls i18n %}

{% block field_sets %}
	{{ plugin_intro }}
	{% if empty_form %}
<div class="module">
	<h2>{% trans "There are no further settings for this plugin" %}</h2>
	<p>{% trans "Please hit OK to save." %}</p>
</div>
	{% else %}
	{{ block.super }}
	{% endif %}
	{{ plugin_footnote }}
{% endblock %}

{% block after_field_sets %}
	{{ block.super }}
	<script type="text/javascript">
	django.cascade = django.cascade || {};
	django.cascade.sharable_fields = {{ sharable_fields|default:"[]" }};
	django.cascade.page_sections_url = "{% url 'admin:get_page_sections' %}";
	django.cascade.ring_plugin_bases = {{% for key, bases in ring_plugin_bases.items %}
		{{ key }}: "[{{ bases|join:", " }}]"{% if not forloop.last %},{% endif %}{% endfor %}
	};
{% if ring_plugin %}
	django.jQuery(function($) {
		new django.cascade.{{ ring_plugin }}();
	});
{% endif %}
	</script>
{% endblock %}
