<xf:macro name="callback_fields"
	arg-data=""
	arg-namePrefix=""
	arg-className="callback_class"
	arg-methodName="callback_method"
	arg-classValue=""
	arg-methodValue=""
	arg-size="25"
	arg-readOnly="{{ false }}">

	<xf:if is="$namePrefix">
		<xf:set var="$className" value="{$namePrefix}_class" />
		<xf:set var="$methodName" value="{$namePrefix}_method" />
	</xf:if>
	<xf:if is="empty($classValue) && !empty($data)">
		<xf:set var="$classValue" value="{$data.{$className}}" />
	</xf:if>
	<xf:if is="empty($methodValue) && !empty($data)">
		<xf:set var="$methodValue" value="{$data.{$methodName}}" />
	</xf:if>

	<div class="inputGroup" dir="ltr">
		<xf:textbox name="{$className}" value="{$classValue}" size="{$size}" maxlength="100" dir="ltr"
			readonly="{$readOnly}"
			placeholder="{{ phrase('class') }}" />
		<span class="inputGroup-text">::</span>
		<xf:textbox name="{$methodName}" value="{$methodValue}" size="{$size}" maxlength="75" dir="ltr"
			readonly="{$readOnly}"
			placeholder="{{ phrase('method') }}" />
	</div>
	<p class="formRow-explain">{{ phrase('callback_class_method_explain') }}</p>
</xf:macro>

<xf:macro name="callback_row"
	arg-label="!"
	arg-explain=""
	arg-data=""
	arg-namePrefix=""
	arg-className="callback_class"
	arg-methodName="callback_method"
	arg-classValue=""
	arg-methodValue=""
	arg-size="25"
	arg-readOnly="{{ false }}">
	<xf:formrow label="{$label}" explain="{$explain|raw}" rowtype="input">
		<xf:macro name="callback_fields"
			arg-data="{$data}"
			arg-namePrefix="{$namePrefix}"
			arg-className="{$className}"
			arg-methodName="{$methodName}"
			arg-classValue="{$classValue}"
			arg-methodValue="{$methodValue}"
			arg-size="{$size}"
			arg-readOnly="{$readOnly}" />
	</xf:formrow>
</xf:macro>