advanced_edit.html 2.63 KB
{% extends "freeadmin/generic_model_edit.html" %}

{% block buttons_extra %}
            <button data-dojo-type="dijit.form.Button">
            {% trans "Rebuild LDAP/AD Cache" %}
                <script type="dojo/event" data-dojo-event="onClick" data-dojo-args="e">
                    var sendbtn = this;
                    this.set('disabled', true);
                    form = getForm(this);
                    data = form.get('value');
                    dojo.xhrPost( {
                        url: '{% url system_clearcache %}',
                        handleAs: 'json',
                        content: data,
                        load: function(data) {
                            sendbtn.set('disabled', false);
                            if(!data.error) {
                                setMessage("{% trans "The cache is being rebuilt."|force_escape %}");
                            } else {
                                setMessage("{% trans "The cache could not be rebuilt"|force_escape %}: "+data.errmsg, "error");
                            }
                        },
                     });
                </script>
            </button>
            <button data-dojo-type="dijit.form.Button" type="button">
                {% trans "Save Debug" %}
                <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                    addObject('{% trans "Save Debug"|force_escape|force_escape %}', '{% url system_debug %}');
                </script>
            </button>
            <button data-dojo-type="dijit.form.Button" type="button">
                {% trans "Firmware Update" %}
                <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                    addObject('{% trans "Firmware Update"|force_escape|force_escape %}', '{% url system_firmwizard %}');
                </script>
            </button>
            <button data-dojo-type="dijit.form.Button" type="button">
                {% trans "Import Plugins Jail" %}
                <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                    addObject('{% trans "Import Plugins Jail"|force_escape|force_escape %}', '{% url plugins_jail_import %}');
                </script>
            </button>
            <button data-dojo-type="dijit.form.Button" type="button">
                {% trans "Update Plugins Jail" %}
                <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                    addObject('{% trans "Update Plugins Jail"|force_escape|force_escape %}', '{% url plugins_jail_update%}');
                </script>
            </button>
{% endblock %}