{TXT_FUNC_SAVED_SEARCH_JS}
<script type="text/javascript" language="JavaScript">
//<![CDATA[
function SubmitForm(form)
{
form.elements["q"].value = form.elements["classname"].value+'.table_view';
form.submit();
}
function SaveTemplateAndSubmitForm(form)
{
if ( checkString( form.elements["tempname"], "{TXT_TEMPNAME}"))
{
	form.elements["q"].value = form.elements["classname"].value+'.save';
	return form.submit();
}
form.elements["q"].value = form.elements["classname"].value+'.search';
return false;
}
function DeleteTemplate(form)
{
var selNum = form.tar_used_search.selectedIndex; 
var selText = form.tar_used_search.options[selNum].text;
if ( selText == "-")
{
	form.elements["q"].value = form.elements["classname"].value+'.search';
	return false;
}
form.elements["q"].value = form.elements["classname"].value+'.remove';
return form.submit();
}

//]]>
</script>
<form method="post" action="{VAL_FORMACTION}" name="calform">
<div class="card">
<div class="card-header">
<input type="hidden" name="page" value="0" />
{HIDDEN_VARS}
</div>
<div class="card-body">
<div class="form-group">
<!-- BEGIN list -->
<label class="form-label">
{TXT_TARNAME}
</label>
{TXT_GET_TARIFF}
<!-- END list -->
<label class="form-label">
{TXT_SEARCHDATE1}
</label>
{TXT_FUNC_SEARCHDATE}
<label class="form-label">
{TXT_SEARCHDATE2}
</label>
{TXT_FUNC_SEARCHDATE2}
<!-- BEGIN save -->
<label class="form-label" for="tempname">
{TXT_TEMPNAME}
</label>
<input class="form-input" type="text" name="tempname" value="{VAL_TMPNAME}" placeholder="{TXT_TEMPNAME}" />
<label class="form-label">
{TXT_SAVED_SEARCH}
</label>
{TXT_FUNC_SAVED_SEARCH}
<div class="btn-group btn-group-block">
<button class="btn" onclick="javascript: return SaveTemplateAndSubmitForm(this.form);" >{BTN_SAVE}</button>
&nbsp;
<button class="btn btn-error" onclick="javascript: return DeleteTemplate(this.form);" >{BTN_DELETE}</button>
</div>
<!-- END save -->
</div>
</div>
<div class="card-footer">
<div class="btn-group btn-group-block">
<button class="btn btn-primary" onclick="javascript: return SubmitForm(this.form);">{BTN_SEARCH}</button>
</div>
</div>
</div>
</form>
