{extends file=$element.methods->getTemplatePath('general')}

{block name=input append}
	<div id="{$element.id}">

		{* the currency type *}
		<select size="1"
			{if $element.style.CSSClass}
				class="{$element.style.CSSClass}"
			{/if}

			id="{$element.id}_parent_"
			name="{$element.name}[parent]"
			{if $element.disabled}disabled="disabled"{/if}
		>
			{foreach $element.noFormulaCurrencyTypesList as $code=>$name}
				<option value="{$code}" {if $element.value.parent==$code}selected="1"{/if}>{$name}</option>
			{/foreach}
		</select>

		&nbsp;

		{* the operation *}
		<select name="{$element.name}[operation]">
			<option value="multiply" {if $element.value.operation=='multiply'}selected="1"{/if}>&times;</option>
			<option value="add" {if $element.value.operation=='add'}selected="1"{/if}>+</option>
		</select>

		&nbsp;

		{* the argument *}
		<input type="text"
			id="{$element.id}_argument_"
			name="{$element.name}[argument]"
			value="{$element.value.argument}"
			{if $element.disabled}disabled="disabled"{/if}
			style="width:60px;"
		/>

	</div>
{/block}


<script type="text/javascript">
	{block name=script}{** dont append to prev validators!! **}
		_inputValidator.createOnLoad('{$element.id}_argument_', 'float', {$element.validatorParams|@json_encode});
	{/block}
</script>
