{% extends "freeform/_layouts/main" %} {% hook "freeform.prepareCpTemplate" %} {% set selectedSubnavItem = "fields" %} {% block actionButton %} {% if currentUser.can("freeform-fieldsManage") %} {{ "New Field"|t('freeform') }} {% endif %} {% endblock %} {% set title = "Fields"|t('freeform') %} {% set content %} {% if fields|length %} {% for field in fields %} {% if fieldTypes[field.type] is defined %} {% endif %} {% endfor %}
{{ "Label"|t('freeform') }} {{ "Handle"|t('freeform') }} {{ "Type"|t('freeform') }}
{% if currentUser.can("freeform-fieldsManage") %} {{ field.label }} {% else %} {{ field.label }} {% endif %} {{ field.handle|truncater(50) }} {{ fieldTypes[field.type] }}
{% if currentUser.can("freeform-fieldsManage") %}
{{ csrfInput() }}
{% endif %}
{% endif %} {% endset %} {% js %} var adminTable = new Craft.AdminTable({ tableSelector: '#fields', noObjectsSelector: '#nofields', newObjectBtnSelector: '#newfieldcontainer', deleteAction: 'freeform/fields/delete', confirmDeleteMessage: '{{ "Are you sure you want to delete this field?"|t('freeform') }}' }); $("a.clone.icon").click(function() { $(this).parents("form:first").submit(); return false; }); {% endjs %}