{% extends 'icon-picker/_layouts/settings' %} {% import '_includes/forms' as forms %} {% import 'verbb-base/_macros' as macros %} {% block content %}

{{ 'General Settings' | t('icon-picker') }}

{{ redirectInput('icon-picker/settings/general') }} {{ csrfInput() }} {% namespace 'settings' %} {{ forms.textField({ first: true, label: 'Icons URL' | t('icon-picker'), instructions: 'Provide the full, or relative URL to your icon files. Also supports aliases.' | t('icon-picker'), name: 'iconSetsUrl', value: settings.iconSetsUrl, errors: settings.getErrors('iconSetsUrl'), required: true, warning: macros.configWarning('iconSetsUrl', 'icon-picker'), }) }} {{ forms.textField({ label: 'Icons Path' | t('icon-picker'), instructions: 'Provide the full path to your icon files.' | t('icon-picker'), name: 'iconSetsPath', value: settings.iconSetsPath, errors: settings.getErrors('iconSetsPath'), required: true, warning: macros.configWarning('iconSetsPath', 'icon-picker'), }) }} {% set options = [{ label: 'Select a field' | t('icon-picker'), value: '' }] %} {% for field in craft.app.fields.getAllFields() %} {% if className(field) == 'verbb\\iconpicker\\fields\\IconPickerField' %} {% set options = options | merge([{ label: field.name, value: field.handle }]) %} {% endif %} {% endfor %} {{ forms.selectField({ label: 'Redactor Field' | t('icon-picker'), instructions: 'Select a Icon Picker field to be used for Redactor fields.' | t('icon-picker'), name: 'redactorFieldHandle', value: settings.redactorFieldHandle, errors: settings.getErrors('redactorFieldHandle'), warning: macros.configWarning('redactorFieldHandle', 'icon-picker'), options: options, }) }} {% endnamespace %}
{% endblock %}