<xf:title>{{ phrase('xfrm_add_resource') }}</xf:title>
<xf:breadcrumb source="$category.getBreadcrumbs()" />
<xf:form action="{{ link('resources/categories/add', $category) }}" upload="true" ajax="true" class="block"
draft="{{ link('resources/categories/draft', $category) }}"
>
<div class="block-container">
<div class="block-body">
<xf:macro template="xfrm_resource_edit_macros" name="title"
arg-resource="{$resource}"
arg-prefixes="{$prefixes}" />
<xf:macro template="xfrm_resource_edit_macros" name="tag_line" arg-resource="{$resource}" />
<xf:macro template="xfrm_resource_edit_macros" name="type"
arg-currentType="{{ $category.draft_resource.resource_type ?: $category.getDefaultSelectedType() }}"
arg-resource="{$resource}"
arg-category="{$category}"
arg-versionAttachData="{$versionAttachData}" />
<xf:if is="$category.hasVersioningSupport()">
<xf:textboxrow name="version_string" value="{$category.draft_resource.version_string}"
label="{{ phrase('xfrm_version_number') }}" />
</xf:if>
<xf:if contentcheck="true">
<hr class="formRowSep" />
<xf:contentcheck>
<xf:macro template="custom_fields_macros" name="custom_fields_edit"
arg-type="resources"
arg-set="{$resource.custom_fields}"
arg-group="above_info"
arg-editMode="{{ $resource.getFieldEditMode() }}"
arg-onlyInclude="{$category.field_cache}" />
</xf:contentcheck>
</xf:if>
<hr class="formRowSep" />
<xf:macro template="xfrm_resource_edit_macros" name="description"
arg-description="{$category.draft_resource.message}"
arg-attachmentData="{$attachmentData}"
arg-previewUrl="{{ link('resources/categories/preview', $category) }}" />
<xf:if is="$category.canEditTags()">
<xf:tokeninputrow name="tags" value="{$category.draft_resource.tags}"
href="{{ link('misc/tag-auto-complete') }}"
min-length="{$xf.options.tagLength.min}"
max-length="{$xf.options.tagLength.max}"
max-tokens="{$xf.options.maxContentTags}"
label="{{ phrase('tags') }}">
<xf:explain>
{{ phrase('multiple_tags_may_be_separated_by_commas') }}
<xf:if is="$category.min_tags">
{{ phrase('this_content_must_have_at_least_x_tags', {'min': $category.min_tags}) }}
</xf:if>
</xf:explain>
</xf:tokeninputrow>
</xf:if>
<xf:if contentcheck="true">
<hr class="formRowSep" />
<xf:contentcheck>
<xf:macro template="custom_fields_macros" name="custom_fields_edit_groups"
arg-type="resources"
arg-set="{$resource.custom_fields}"
arg-groups="{{ ['below_info', 'extra_tab', 'new_tab'] }}"
arg-editMode="{{ $resource.getFieldEditMode() }}"
arg-onlyInclude="{$category.field_cache}" />
</xf:contentcheck>
</xf:if>
<hr class="formRowSep" />
<xf:macro template="xfrm_resource_edit_macros" name="external_url" arg-resource="{$resource}" />
<xf:macro template="xfrm_resource_edit_macros" name="alt_support_url" arg-resource="{$resource}" />
<xf:if contentcheck="true">
<hr class="formRowSep" />
<xf:contentcheck>
<xf:macro template="xfrm_resource_edit_macros" name="resource_icon" arg-resource="{$resource}" />
</xf:contentcheck>
</xf:if>
</div>
<xf:submitrow icon="save" sticky="true" />
</div>
</xf:form>