# --
# AdminMailAccount.dtl - provides HTML form for AdminMailAccount
# Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id: AdminMailAccount.dtl,v 1.3 2008/06/03 08:53:01 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl-2.0.txt.
# --

<!-- dtl:block:Overview -->
<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td colspan="2" class="mainhead">
      $Env{"Box0"}$Text{"Mail Account Management"}$Env{"Box1"}
    </td>
  </tr>
  <tr>
    <td width="30%" class="mainbody">
      <form action="$Env{"CGIHandle"}" method="post">
        <input type="hidden" name="Action" value="$Env{"Action"}"/>
        <input type="hidden" name="Subaction" value="AddAction"/>
        <table width="100%" cellspacing="0" cellpadding="4">
          <tr>
            <td class="contenthead">$Text{"Add"}:</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table>
                <tr>
                  <td class="contentkey">$Text{"Type"}:</td>
                  <td class="contentvalue">$Data{"TypeOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Username"}:</td>
                  <td class="contentvalue"><input type="text" name="Login" value="" size="25"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Password"}:</td>
                  <td class="contentvalue"><input type="password" name="Password" value="" size="25"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Host"}:</td>
                  <td class="contentvalue"><input type="text" name="Host" value="" size="25"/></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="contentfooter">
              <input class="button" type="submit" value="$Text{"Add"}"/>
            </td>
          </tr>
        </table>
      </form>
    </td>
    <td width="70%" class="mainbody">
<!-- dtl:block:OverviewResult -->
      <table width="100%" cellspacing="0" cellpadding="4">
        <tr>
          <td class="contenthead">$Text{"List"}:</td>
        </tr>
        <tr>
          <td class="contentbody">
            <table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td class="contentkey" width="50%">$Text{"Host"}/$Text{"Username"}</td>
                <td align="center" class="contentkey">$Text{"Type"}</td>
                <td align="center" class="contentkey">$Text{"valid"}/$Text{"invalid"}</td>
                <td align="center" class="contentkey">$Text{"Delete"}</td>
                <td align="center" class="contentkey">$Text{"Run Now!"}</td>
              </tr>
<!-- dtl:block:OverviewResultRow -->
              <dtl if ($Data{"ValidID"} ne "1") { $Data{"StartFont"} = "<font color="gray">"; }>
              <dtl if ($Data{"ValidID"} ne "1") { $Data{"StopFont"} = "</font>"; }>
              <dtl if ($Env{"Color"} eq "") { $Env{"Color"} = "searchactive"; }>
              <dtl if ($Data{"ValidID"} eq "1") { $Data{"ShownValid"} = "valid"; }>
              <dtl if ($Data{"ValidID"} ne "1") { $Data{"ShownValid"} = "invalid"; }>
              <tr>
                <td class="$Env{"Color"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=Update&ID=$QData{"ID"}">$Data{"StartFont"}$QData{"Host"} / $QData{"Login"}$Data{"StopFont"}</a>
                </td>
                <td align="center" class="$Env{"Color"}">
                  $Data{"StartFont"}$QData{"Type"}$Data{"StopFont"}
                </td>
                <td align="center" class="$Env{"Color"}">
                  $Data{"StartFont"}$Text{"$QData{"ShownValid"}"}$Data{"StopFont"}
                </td>
                <td align="center" class="$Env{"Color"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=Delete&ID=$QData{"ID"}">$Data{"StartFont"}x$Data{"StopFont"}</a>
                </td>
                <td align="center" class="$Env{"Color"}">
                  <a href="$Env{"Baselink"}Action=$Env{"Action"}&Subaction=Run&ID=$QData{"ID"}">$Data{"StartFont"}x$Data{"StopFont"}</a>
                </td>
              </tr>
              <dtl if ($Env{"Color"} eq "searchpassive") { $Env{"Color"} = ""; }>
              <dtl if ($Env{"Color"} eq "searchactive") { $Env{"Color"} = "searchpassive"; }>
<!-- dtl:block:OverviewResultRow -->
            </table>
          </td>
        </tr>
        <tr>
          <td class="contentfooter">
            &nbsp;
          </td>
        </tr>
      </table>
<!-- dtl:block:OverviewResult -->
<!-- dtl:block:OverviewUpdate -->
      <form action="$Env{"CGIHandle"}" method="post">
        <input type="hidden" name="Action" value="$Env{"Action"}"/>
        <input type="hidden" name="Subaction" value="UpdateAction"/>
        <input type="hidden" name="ID" value="$QData{"ID"}"/>
        <table width="100%" cellspacing="0" cellpadding="4">
          <tr>
            <td class="contenthead">$Text{"Edit"}:</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table border="0" cellspacing="0" cellpadding="3">
                <tr>
                  <td class="contentkey">$Text{"Type"}: </td>
                  <td class="contentvalue"> $Data{"TypeOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Username"}: </td>
                  <td class="contentvalue"> <input type="text" name="Login" value="$QData{"Login"}" size="35" maxlength="50"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Password"}: </td>
                  <td class="contentvalue"> <input type="password" name="Password" value="$QData{"Password"}" size="35" maxlength="50"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Host"}: </td>
                  <td class="contentvalue"> <input type="text" name="Host" value="$QData{"Host"}" size="35" maxlength="50"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Trusted"}: </td>
                  <td class="contentvalue"> $Data{"TrustedOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Dispatching"}: </td>
                  <td class="contentvalue"> $Data{"DispatchingOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Queue"}: </td>
                  <td class="contentvalue"> $Data{"QueueOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Valid"}: </td>
                  <td class="contentvalue"> $Data{"ValidOption"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Comment"}: </td>
                  <td class="contentvalue"> <input type="text" name="Comment" value="$QData{"Comment"}" size="60" maxlength="150"/></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="contentfooter">
              <input class="button" type="submit" value="$Text{"Submit"}"/>
            </td>
          </tr>
        </table>
      </form>
<!-- dtl:block:OverviewUpdate -->
    </td>
  </tr>
</table>
<!-- end form -->
<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td class="mainhead">
      $Env{"Box0"}$Text{"Note"}$Env{"Box1"}
    </td>
  </tr>
  <tr>
    <td class="mainbody">
      <p>
        $Text{"All incoming emails with one account will be dispatched in the selected queue!"}
        <br/>
        $Text{"If your account is trusted, the already existing X-OTRS header at arrival time (for priority, ...) will be used! PostMaster filter will be used anyway."}
      </p>
      <p>
        $Text{"Example"}:
        <hr>
        <form action="/">
          <table>
            <tr>
              <td>$Text{"Type"}: </td>
              <td>
                <select name="Type">
                  <option selected value="POP3">POP3</option>
                  <option value="IMAP">IMAP</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>$Text{"Username"}: </td>
              <td> <input type="text" name="Login" value="mail2" size="35" maxlength="50"/></td>
            </tr>
            <tr>
              <td>$Text{"Password"}: </td>
              <td> <input type="password" name="Password" value="" size="35" maxlength="50"/></td>
            </tr>
            <tr>
              <td>$Text{"Host"}: </td>
              <td> <input type="text" name="Host" value="mail.example.com" size="35" maxlength="50"/></td>
            </tr>
            <tr>
              <td>$Text{"Trusted"}: </td>
              <td>
                <select name="Trusted">
                  <option selected value="0">$Text{"No"}</option>
                  <option value="1">$Text{"Yes"}</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>$Text{"Dispatching"}: </td>
              <td>
                <select name="DispatchingBy">
                  <option selected value="From">$Text{"Dispatching by email To: field."}</option>
                  <option value="Queue">$Text{"Dispatching by selected Queue."}</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>$Text{"Queue"}</td>
              <td>
                <select name="QueueID">
                  <option VALUE="3">Tech (1)</option>
                  <option VALUE="4">Misc (2)</option>
                  <option VALUE="2">Raw (3)</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>$Text{"Valid"}: </td>
              <td>
                <select name="ValidID">
                  <option value="2">$Text{"invalid"}</option>
                  <option value="3">$Text{"invalid-temporarily"}</option>
                  <option selected value="1">$Text{"valid"}</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>$Text{"Comment"}: </td>
              <td> <input type="text" name="Comment" value="$Text{"Comment"}" size="60" maxlength="150"/></td>
            </tr>
          </table>
        </form>
        <hr>
      </p>
    </td>
  </tr>
</table>
<!-- dtl:block:Overview -->
