<xf:if is="$profile.isInsert()">
	<xf:title>{{ phrase('add_payment_profile:') }} {$provider.title}</xf:title>
<xf:else />
	<xf:title>{{ phrase('edit_payment_profile:') }} {$provider.title} - {$profile.title}</xf:title>
</xf:if>

<xf:pageaction if="$profile.isUpdate()">
	<xf:button href="{{ link('payment-profiles/delete', $profile) }}" icon="delete" overlay="true" />
</xf:pageaction>

<xf:if is="$profile.isDeprecated()">
	<div class="blockMessage blockMessage--important blockMessage--iconic">
		<xf:if is="$profile.isUpdate()">
			{{ phrase('this_payment_provider_is_deprecated_will_not_be_removed') }}
		<xf:else />
			{{ phrase('this_payment_provider_is_deprecated') }}
		</xf:if>
	</div>
</xf:if>

<xf:form action="{{ link('payment-profiles/save', $profile) }}" ajax="true" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="title" value="{$profile}"
				label="{{ phrase('title') }}" />

			<xf:textboxrow name="display_title" value="{$profile}"
				label="{{ phrase('display_title') }}"
				explain="{{ phrase('payment_profile_display_title_explain') }}" />

			<hr class="formRowSep" />

			{{ $provider.renderConfig($profile)|raw }}

			<xf:submitrow sticky="true" icon="save" />
		</div>
	</div>

	<xf:hiddenval name="provider_id">{$provider.provider_id}</xf:hiddenval>
</xf:form>