{% extends 'base.html' %} {% block content %}
{% set footer %} {% endset %} {% call widget.gcard(title='Create new user', footer=footer) %} {{ widget.gform('form_change_password', url_for('myaccount'), form, ['current_password','password','confirm']) }} {% endcall %} {% if role == 'admin' %} {% call widget.gcard(title='Recreate Plugins Cache') %}
{% endcall %} {% endif %}
{% endblock %} {% block javascript %} $SCRIPT_ROOT = {{ request.script_root|tojson|safe }}; $('.btn-recreate').bind('click', function() { $.get($SCRIPT_ROOT + '/plugins-cache-recreate', function(data) { $('.loading-plugins-cache').html('  Please wait and dont refresh the page.') setTimeout(function(){ var url = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); var mytoken = "{{token|safe}}" window.location.href = url + "/reauth?token=" + mytoken.replace("b'","").replace("'",""); }, 5000); }); return false; }); {% endblock %}