{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=cashsourceedit&id={$sourceedit.id}" name="sourceedit" id="sourceedit">
	<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="sourceedit[name]" value="{$sourceedit.name}" form="sourceedit" 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="sourceedit[account]" value="{$sourceedit.account}" size="45"
					form="sourceedit"
					{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="sourceedit[description]" form="sourceedit"
					{tip text="Enter additional information (optional)" trigger="value"}>{$sourceedit.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="sourceedit[isdefault]" value="1" form="sourceedit"
					{tip trigger="isdefault"}
					{if !empty($sourceedit.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="sourceedit"}
				{button icon="cancel" label="Cancel" href="?m=cashsourcelist"}
			</td>
		</tr>
	</tbody>
</table>
<script>

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

</script>
{/block}
