<div id="primary_header">
  <h1><?php print $this->translate('Anti-virus Settings')?></h1>

</div>

<div id="primary_content">
  <div id="primary_content_inner">
  <div id="Flash" class="flash_notice"><?php print $this->translate('The settings have been updated') ?></div>
	
  <form id="settingsForm" method="post" action="<?php echo $this->moduleBaseUrl ?>/services/avsave">

    <input type="hidden" name="save" value="1" />
	<!-- Specify default settings not available to edit -->

    <table class="settings">

      <tr>
        <td class="label"><?php print $this->translate('Enable Anti-virus')?></td>
        <td>
			<input name="fields[virus_enable]" type='hidden' value='0'/>
			<input name="fields[virus_enable]" type="checkbox" class="iphoneStyle" id="virus_enable" value="1" <?php echo ($this->exim['virus_enable']) ? 'checked' : '' ?>>
			<small><?php print $this->translate('Enable Antivirus checks for incoming emails.')?></small>
		</td>
      </tr>
	
      <tr>
        <td class="label"><?php print $this->translate('Enable Auto update')?></td>
        <td>
			<input name="fields[virus_autoupdate]" type='hidden' value='0'/>
			<input name="fields[virus_autoupdate]" type="checkbox" class="iphoneStyle" id="virus_autoupdate" value="1" <?php echo ($this->exim['virus_autoupdate']) ? 'checked' : '' ?> />
			<small><?php print $this->translate('Toggle to automatically download the latest Anti-virus signatures each day')?></small>
		</td>
      </tr>


      <tr>
        <td class="label"><?php print $this->translate('Virus Error Message')?></td>
        <td>
			<input class="large" name="fields[virus_msg]" type="text" id="virus_msg" value="<?php echo ($this->exim['virus_msg'])?>" />
			<small><?php print $this->translate('Specify the message users will receive if their email contains a virus.')?></small>
		</td>
      </tr>

	</table>

	<div class="divider"></div>
	
	<table class="settings">

      <tr>
        <td class="label"><?php print $this->translate('Anti-Virus Signatures')?></td>
        <td>
			<?php echo $this->signatureDate ?>
			<small><?php print $this->translate('The date the Anti-Virus signatures were last updated')?></small>
		</td>
      </tr>
	
	</table>
	
  </div>
  </form>

	<table class="settings">

    <tr>
      <td class="label"></td>
      <td>
		<div id="back_button" style="margin-left:0px;">
			<a href="#">
				<span class="stronglastword"><?php echo $this->translate('Save Settings') ?></span>
			</a>
		</div>
		</td>
    </tr>
	
	</table>
	
</div>

<script type="text/javascript">
$( function()
{
	var tabId = "#Anti-Virus";
	$('#settingsForm', tabId).submit(function()
	{
	<?php if( file_exists("/usr/local/atmail/mailserver/bin/atmail-services-restart") ) //is appliance
		echo '$.simpleFlash( "' . addslashes($this->translate('Saving, please wait while appliance services are restarted.')) . '", "important");';
	?>

		return false;
	});
	perform_service_common_binds(tabId);
});

</script>
