{% if setting_data['type'] == 'file' %} {% set setting_file_name = setting_config.get("file_name", "") if setting_config else "" %}
{% if setting_value and setting_file_name %} Current content loaded from {{ setting_file_name }} ({{ setting_value|length }} chars) {% elif setting_value %} Current content loaded ({{ setting_value|length }} chars) {% else %} No file selected {% endif %} {% if setting_config %} {% if current_endpoint != 'global-config' and current_endpoint != 'global-settings' and setting_config and setting_config.get('global') and setting_value != setting_default %} {% set tooltip_key = "tooltip.button.reset_global" %} {% set tooltip_fallback = "Reset to global value" %} {% else %} {% set tooltip_key = "tooltip.button.reset_default" %} {% set tooltip_fallback = "Reset to default value" %} {% endif %} {% endif %}
{% else %}
{% if setting_data['type'] == 'password' %} {% endif %} {% if setting_config %} {% if current_endpoint != 'global-config' and current_endpoint != 'global-settings' and setting_config and setting_config.get('global') and setting_value != setting_default %} {% set tooltip_key = "tooltip.button.reset_global" %} {% set tooltip_fallback = "Reset to global value" %} {% else %} {% set tooltip_key = "tooltip.button.reset_default" %} {% set tooltip_fallback = "Reset to default value" %} {% endif %} {% endif %}
{% endif %}