{# vim: ts=2:sw=2:et:ft=twig #} {% macro restore(cfg_key, section, home_path, backups, lang) %} {% from 'modules/backup_mgr/macros.html' import browser_widget, error_box %}

{{ lang.RESTORE_OPTS }}

{% if backups|length > 0 %}
{% if cfg_key != 'homedir' %} {% endif %} {% if cfg_key != 'homedir' %} {# for databases, populate the date dropdown with data-dbnames in #} {% for snap in backups %} {% endfor %} {% else %} {# for homedirs, just add the date in #} {% for snap in backups %} {% endfor %} {% endif %}
{% if mod.bakmgr.show_geo %}
Selected cluster is in
{% endif %}
{% if cfg_key != 'homedir' %} {# for databases, they also get a select for the database to restore #}

No database selected.

{% else %} {# homedirs get a jquery widget instead #} {{ browser_widget('homedir_filebrowser', home_path, 'enable_home_restore', 'browse', true, []) }} {% endif %} {% if cfg_key != 'homedir' %} {# for databases, show a dump path field #}
{{ home_path }}/

This folder cannot be accessed.

{% endif %}
{% if cfg_key != 'homedir' %} {# for databases, they have 3 options on how to restore #}
{% else %} {# for homedirs, they have 2 options on how to restore, and a path that hides when unchecked #}
{{ home_path }}/

This folder cannot be accessed.

{% endif %}

Invalid email address

Clicking Restore will queue the restoration immediately, and restoring a backup is irreversible.

If restoring a website which relies on a database such as a WordPress website, you may need to restore both website files and SQL data.

{{ error_box("#{cfg_key}-restore-msg") }}
{% else %}

No backups available to restore

{% endif %}
{% endmacro %}