<form action="index.php?ToDo={{ FormAction|safe }}" onSubmit="return ValidateForm(CheckForm);" name="frmAddBrand" method="post">
{{ hiddenFields|safe }}

<div class="row">
	<div class="col-sm-12">
		<h4 class="page-title">{{ BrandTitle|safe }}</h4>
		<p>{{ BrandIntro|safe }}</p>
		{{ Message|safe }}
	</div>
</div>

<div class="row">
	<div class="col-sm-12">
		<input type="submit" name="SubmitButton1" value="{% lang 'Save' %}" class="FormButton btn btn-primary">
		<input type="button" name="CancelButton1" value="{% lang 'Cancel' %}" class="FormButton btn btn-default" onclick="ConfirmCancel()"></p>
	</div>
</div>
<br />

<div class="panel panel-default form-horizontal">
	<div class="panel-heading"> 
		<h3 class="panel-title">{% lang 'BrandDetails' %}</h3> 
	</div> 

	<div class="panel-body">
		<div class="form-group">
			<label class="col-md-2 control-label">{% lang 'BrandNames' %}</label>
			<div class="col-md-10">
				<textarea name="brands" id="brands" class="form-control" rows="5" value=""></textarea>
				<p class="help-block">{% lang 'BrandNamesHelp' %}</p>
			</div>
		</div>
	</div>
</div>

<div class="row">
	<div class="col-sm-12">
		<input type="submit" name="SubmitButton1" value="{% lang 'Save' %}" class="FormButton btn btn-primary">
		<input type="button" name="CancelButton1" value="{% lang 'Cancel' %}" class="FormButton btn btn-default" onclick="ConfirmCancel()"></p>
	</div>
</div>
</form>

<script type="text/javascript">

	function CheckForm() {
		var brands = document.getElementById("brands");

		if(brands.value == "") {
			alert("{% lang 'EnterBrands' %}");
			brands.focus();
			return false;
		}

		return true;
	}

	function ConfirmCancel()
	{
		if(confirm('{{ CancelMessage|safe }}'))
			document.location.href='index.php?ToDo=viewBrands';
		else
			return false;
	}

</script>
