<!--#set global $pane="Email"#-->
<!--#set global $help_uri="Configure+Notifications-0-7"#-->
<!--#include $webdir + "/_inc_header.tmpl"#-->

  <script>
  \$(function() {
    \$( "#email_endjob_radio" ).buttonset();
  });
  </script>

<form action="saveEmail" method="post" name="fullform" id="fullform" autocomplete="off">
<input type="hidden" name="session" id="session" value="$session">

<div id="config-components">

  <div id="core-component-group1" class="component-group clearfix">
    <div class="component-group-desc">
      <h3>$T('emailOptions')</h3>
    </div>
    <fieldset class="component-group-list">
      <div class="field-pair clearfix">
        <span class="component-title" style="padding-left: 13px;">$T('opt-email_endjob')</span>
        <div id="email_endjob_radio">
          <input type="radio" name="email_endjob" id="email_endjob0" value="0" <!--#if $email_endjob == "0" then "checked=1" else ""#--> /> <label for="email_endjob0">$T('email-never')</label>
          <input type="radio" name="email_endjob" id="email_endjob1" value="1" <!--#if $email_endjob == "1" then "checked=1" else ""#--> /> <label for="email_endjob1">$T('email-always')</label>
          <input type="radio" name="email_endjob" id="email_endjob2" value="2" <!--#if $email_endjob == "2" then "checked=1" else ""#--> /> <label for="email_endjob2">$T('email-errorOnly')</label>
        </div>
      </div>
      <div class="field-pair alt">
        <input type="checkbox" name="email_full" id="email_full" value="1" <!--#if $email_full != "0" then "checked=1" else ""#--> />
        <label class="clearfix" for="email_full">
          <span class="component-title">$T('opt-email_full')</span>
          <span class="component-desc">$T('explain-email_full')</span>
        </label>
      </div>
      <div class="field-pair">
        <input type="checkbox" name="email_rss" id="email_rss" value="1" <!--#if $email_rss != "0" then "checked=1" else ""#--> />
        <label class="clearfix" for="email_rss">
          <span class="component-title">$T('opt-email_rss')</span>
          <span class="component-desc">$T('explain-email_rss')</span>
        </label>
      </div>
      <div class="field-pair alt">
        <label class="nocheck clearfix" for="email_dir">
          <span class="component-title">$T('opt-email_dir')</span>
          <input type="text" size="40" name="email_dir" id="email_dir" value="$email_dir">
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_dir')</span>
        </label>
      </div>
    </fieldset>
  </div><!-- /component-group1 -->

  <div id="core-component-group2" class="component-group clearfix">
    <div class="component-group-desc">
      <h3>$T('emailAccount')</h3>
    </div>
    <fieldset class="component-group-list">
      <div class="field-pair">
        <label class="nocheck clearfix" for="email_server">
          <span class="component-title">$T('opt-email_server')</span>
          <input type="text" size="35" name="email_server" id="email_server" value="$email_server"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_server')</span>
        </label>
      </div>
      <div class="field-pair alt">
        <label class="nocheck clearfix" for="email_to">
          <span class="component-title">$T('opt-email_to')</span>
          <input type="text" size="35" name="email_to" id="email_to" value="$email_to"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_to')</span>
        </label>
      </div>
      <div class="field-pair">
        <label class="nocheck clearfix" for="email_from">
          <span class="component-title">$T('opt-email_from')</span>
          <input type="text" size="35" name="email_from" id="email_from" value="$email_from"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_from')</span>
        </label>
      </div>
      <div class="field-pair alt">
        <label class="nocheck clearfix" for="email_account">
          <span class="component-title">$T('opt-email_account')</span>
          <input type="text" size="35" name="email_account" id="email_account" value="$email_account"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_account')</span>
        </label>
      </div>
      <div class="field-pair">
        <label class="nocheck clearfix" for="email_pwd">
          <span class="component-title">$T('opt-email_pwd')</span>
          <input type="password" size="35" name="email_pwd" id="email_pwd" value="$email_pwd"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-email_pwd')</span>
        </label>
      </div>
    </fieldset>
  </div><!-- /component-group2 -->

<!--#if $have_growl or $have_ntfosd#-->
    <div id="core-component-group3" class="component-group clearfix">
    <div class="component-group-desc">
      <h3>$T('growlSettings')</h3>
    </div>
    <fieldset class="component-group-list">
    <!--#if $have_ntfosd#-->
      <div class="field-pair">
        <input type="checkbox" name="ntfosd_enable" id="ntfosd_enable" value="1" <!--#if $ntfosd_enable != "0" then "checked=1" else ""#--> />
        <label class="clearfix" for="ntfosd_enable">
          <span class="component-title">$T('opt-ntfosd_enable')</span>
          <span class="component-desc">$T('explain-ntfosd_enable')</span>
        </label>
      </div>
    <!--#end if#-->
    <!--#if $have_growl#-->
      <div class="field-pair">
        <input type="checkbox" name="growl_enable" id="growl_enable" value="1" <!--#if $growl_enable != "0" then "checked=1" else ""#--> />
        <label class="clearfix" for="growl_enable">
          <span class="component-title">$T('opt-growl_enable')</span>
          <span class="component-desc">$T('explain-growl_enable')</span>
        </label>
      </div>
      <div class="field-pair">
        <label class="nocheck clearfix" for="growl_server">
          <span class="component-title">$T('opt-growl_server')</span>
          <input type="text" name="growl_server" id="growl_server" value="$growl_server"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-growl_server')</span>
        </label>
      </div>
      <div class="field-pair">
        <label class="nocheck clearfix" for="growl_password">
          <span class="component-title">$T('opt-growl_password')</span>
          <input type="password" size="35" name="growl_password" id="growl_password" value="$growl_password"/>
        </label>
        <label class="nocheck clearfix">
          <span class="component-title">&nbsp;</span>
          <span class="component-desc">$T('explain-growl_password')</span>
        </label>
      </div>
    <!--#end if#-->
    </fieldset>
  </div><!-- /component-group3 -->
<!--#end if#-->

  <div class="component-group-last clearfix">
    <div class="component-group-desc">
      <h3>&nbsp;</h3>
    </div>
    <fieldset class="component-group-list">
      <div class="left_links">
        <a id="save"><span class="config_sprite_container sprite_config_save">&nbsp;</span> $T('button-saveChanges')</a>
        <a id="test_email" href="testmail?session=$session" rel="$T('askTestEmail')">
          <span class="config_sprite_container sprite_config_email_test">&nbsp;</span> $T('link-testEmail')</a>
        <a id="test_notification" href="testnotification?session=$session">
          <span class="config_sprite_container sprite_config_email_test">&nbsp;</span> $T('testNotify')</a>
      </div>
      <!--#if $lastmail#-->
        &nbsp;&nbsp;&nbsp;&nbsp;$T('emailResult') = <b>$lastmail</b>
      <!--#end if#-->
    </fieldset>
  </div><!-- /component-group -->

</div>

</form>

<!--#include $webdir + "/_inc_footer.tmpl"#-->
