{if $action == ''}
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  </head>
  <body>
    <br />
    <br />
    <div class="header">
      <div>
        <div>{$anrede_titel}</div>
      </div>
    </div>
    <form action="?action=edit" method='post' name='erfassen'>
      <div class="pat_list_box">
        {if $anrede_pflichtfelder == '1'}
        <table width="70%" class="errorTable" align="center">
          <tr>
            <td>
              <img src="templates/{$global_template}/images/pflichtfelder/achtung_gross.gif">
            </td>
            <td><b>Achtung!</b><br>
              {$anrede_error_text}
            </td>
          </tr>
        </table>
        <br>
        {/if}
        <fieldset>
          <legend>
            <b>Anrede erstellen / bearbeiten</b>
          </legend>
          <br />
          <br />
          <p align="center">
            <select size="10" id='anrede' name='anrede'>
              <option style="font-weight:bold;font-style: italic;" value="new">Neue Anrede erstellen&nbsp;&nbsp;&nbsp;&nbsp;</option>
              <option disabled>&nbsp;</option>
              {section name=table_data loop=$table_data}
              <option value="{$table_data[table_data].arid}" {if $table_data[table_data].select == 'Y'} selected {/if}>{$table_data[table_data].bezeichnung}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
              {/section}
            </select>
            <br />
            <br />
            <br />
            <input type="submit" name="senden" value="Weiter">
          </p>
          <br />
        </fieldset>
    </form>
    <br />
    </div>
  </body>
</html>
{/if}
{if $action == 'edit'}
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  </head>
  <body onload="if(document.erfassen)document.erfassen.anrede_bez.focus();return false;">
    <br />
    <br />
    <div class="header">
      <div>
        <div>{$anrede_edit_titel}</div>
      </div>
    </div>
    <div class="pat_list_box">
    <form action="?action=save" method='post' name='erfassen'>
      <fieldset>
        <br />
        <br />
        <p align="center">
          {if $anrede_new == 1}{$anrede_edit_desc_new}:&nbsp;{/if}
          {if $anrede_new == 0}{$anrede_edit_desc_exist}:&nbsp;{/if}
          <input value="{$anrede_sav_value}" type="text" name="anrede_bez" size="30">
          <br />
          <br />
          <input type="submit" name="senden" value="Speichern">
          {if $anrede_new == 0}

            <input type="button" value="Diesen Wert löschen" onclick="{literal}window.location.href = '?action=del'{/literal}">
            &nbsp;
          {/if}
        </p>
        <br />
      </fieldset>
    </form>
    <br />
    </div>
  </body>
</html>
{/if}