{% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
{% for plugin in plugins %}
{% if plugin['type'] == "pro" and not is_pro_version %}
You need a valid pro license to use this plugin
{% endif %}
{{ plugin['name'] }} {{ plugin['version'] }}
{% if plugin['page'] %}
{% endif %}
{% if plugin['type'] == "pro" %}
{% endif %}
{{ plugin['description'] }}
{# get number of multiple groups for the plugin #}
{% set multList = [] %}
{% for setting, value in plugin["settings"].items() %}
{% if setting != "IS_DRAFT" and (current_endpoint == "global-config" and setting not in ["SERVER_NAME", "IS_LOADING"] or current_endpoint == "services" and value['context'] == "multisite") %}
{% if value['multiple'] and value['multiple'] not in multList %}
{% if multList.append(value['multiple']) %}{% endif %}
{% endif %}
{% if not value['multiple'] %}
{{ value["label"] }}
{{ value['help'] }}
{% if value["context"] == "multisite" and current_endpoint == "global-config" %}
Multisite (apply as default to services without specific value).
{% endif %}
{% if value["type"] != "select" and value["type"] != "check" %}
{% if value['type'] == "password" %}
{% endif %}
{% endif %}
{% if value["type"] == "select" %}
{% for item in value['select'] %}
{% if global_config[setting]['value'] and
global_config[setting]['value'] == item or not global_config[setting]['value']
and value['default'] == item %}
{% else %}
{% endif %}
{% endfor %}
{% endif %}
{% if value["type"] == "check" %}
{% endif %}
Invalid value
{{ value['label'] }} is invalid and must match this pattern:
{{ value['regex']|safe }}
{% for setting, value in plugin["settings"].items() %}
{# render only setting that match the multiple id and context #}
{% if value['multiple'] == multiple and (
current_endpoint == "global-config"
or current_endpoint == "services" and value['context'] == "multisite"
) %}
{{ value["label"] }}
{{ value['help'] }}
{% if value["context"] == "multisite" and current_endpoint == "global-config" %}
Multisite (apply as default to services without specific value).
{% endif %}
{% if value["type"] not in ["select", "check"] %}
{% if value['type'] == "password" %}
{% endif %}
{% endif %}
{% if value["type"] == "select" %}
{% for item in value['select'] %}
{% if value['default'] == item %}
{% else %}
{% endif %}
{% endfor %}
{% endif %}
{% if value["type"] == "check" %}
{% endif %}
Invalid value
{{ value['label'] }} is invalid and must match this pattern:
{{ value['regex']|safe }}