<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: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.title}" maxlength="{{ max_length($profile, 'title') }}"
				label="{{ phrase('title') }}" />

			<xf:textboxrow name="display_title" value="{$profile.display_title}" maxlength="{{ max_length($profile, 'display_title') }}"
				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>