{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<h1>{$layout.pagetitle}</h1>

<form method="POST" action="?m=cashsourceadd" name="sourceadd" id="sourceadd">
	<input type="submit" class="hiddenbtn">
</form>

<table class="lmsbox">
	<colgroup>
		<col style="width: 1%;">
		<col style="width: 1%;">
		<col style="width: 98%;">
	</colgroup>
	<thead>
		<tr>
			<td>
				{icon name="cashsource"}
			</td>
			<td>
				<strong>{trans("Name")}</strong>
			</td>
			<td>
				<input type="text" size="40" name="sourceadd[name]" value="{$sourceadd.name}" form="sourceadd" required
					{tip text="Enter source name" trigger="name" bold=1}>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				{icon name="account-number"}
			</td>
			<td class="nobr">
				<strong>{trans("Bank account:")}</strong>
			</td>
			<td>
				<input type="text" name="sourceadd[account]" value="{$sourceadd.account}" size="45" form="sourceadd"
					{tip text="Enter main bank account number (optional)" trigger="account"}>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="info"}
			</td>
			<td>
				<strong>{trans("Description:")}</strong>
			</td>
			<td>
				<textarea rows="5" cols="50" name="sourceadd[description]" form="sourceadd"
					{tip text="Enter additional information (optional)" trigger="description"}>{$sourceadd.description|escape}</textarea>
			</td>
		</tr>
		<tr>
			<td>
				{icon name="checked"}
			</td>
			<td>
				<label for="default-checkbox">
					<strong>{trans("Default")}</strong>
				</label>
			</td>
			<td>
				<input type="checkbox" id="default-checkbox" name="sourceadd[isdefault]" value="1" form="sourceadd"
					{tip trigger="isdefault"}
					{if !empty($sourceadd.isdefault)} checked{/if}>
			</td>
		</tr>
		<tr>
			<td class="lms-ui-box-buttons" colspan="3">
				{button type="submit" class="lms-ui-button-submit" icon="save" label="Submit" form="sourceadd"}
				{button icon="cancel" label="Cancel" href="?m=cashsourcelist"}
				<br>
				<label>
					<input type="checkbox" name="sourceadd[reuse]" value="ON"{if $sourceadd.reuse} checked{/if} form="sourceadd">
					{trans("Display this form again, when this source is saved")}
				</label>
			</td>
		</tr>
    </tbody>
</table>

<script>

	$(function() {
		$('[name="sourceadd[name]"]').focus();
	});

</script>
{/block}
