{if $action == ''}
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
    <script type="text/javascript" src="jquery/jquery-1.9.1.js"></script>
    <script type='text/javascript'>
      function felder_aktiv(){
        if ( document.erfassen.gemlv.value == 'J' ){
           document.erfassen.anzgemlv.disabled = false;
           document.erfassen.massgemlv.disabled = false;
           document.erfassen.namegemlv.disabled = false;
           document.erfassen.teamteaching.disabled = false;
        }else{
           document.erfassen.anzgemlv.disabled = true;
           document.erfassen.massgemlv.disabled = true;
           document.erfassen.namegemlv.disabled = true;
           document.erfassen.teamteaching.disabled = true;
        }
      }
    </script>
    <script type="text/javascript">
      function show(gemlv, erfs_value_art, erfs_value_exk_tage){
        if ( gemlv == 'J' ){
          document.erfassen.anzgemlv.disabled = false;
          document.erfassen.massgemlv.disabled = false;
          document.erfassen.namegemlv.disabled = false;
          document.erfassen.teamteaching.disabled = false;
        }
        if ( erfs_value_exk_tage == '1' ){
         /* Bei bearbeiten: Eintägig wird ausgewählt, Mehrtägig werden Werte gelöscht und disabled*/
         //<![CDATA[
          $(document).ready(function(){
            var id = "exkursion1";
            var id2 = "lehrstd1";
            var id3 = "extracurr";
            $("#" + id).show();
            $("#" + id2).hide();
            $("#" + id3).hide();
          });
          //]]>
          document.getElementById('tage_exkursion1').checked = true;
          document.getElementById('exk_datumvon2').value = '';
          document.getElementById("exk_datumvon2").disabled = true;
          document.getElementById('exk_datumbis2').value = '';
          document.getElementById("exk_datumbis2").disabled = true;
          document.getElementById('exk_beschreibung2').value = '';
          document.getElementById("exk_beschreibung2").disabled = true;
          document.getElementById('exk_stdanreise2').value = '';
          document.getElementById("exk_stdanreise2").disabled = true;
          document.getElementById('exk_stdabreise2').value = '';
          document.getElementById("exk_stdabreise2").disabled = true;

        }else if(erfs_value_exk_tage == '2' ){
         /* Bei bearbeiten: Mehrtägig wird ausgewählt, Eintägig werden Werte gelöscht und disabled*/
          //<![CDATA[
          $(document).ready(function(){
            var id = "exkursion1";
            var id2 = "lehrstd1";
            var id3 = "extracurr";
            $("#" + id).show();
            $("#" + id2).hide();
            $("#" + id3).hide();
          });
          //]]>
          document.getElementById('tage_exkursion2').checked = true;
          document.getElementById('exk_datumvon1').value = '';
          document.getElementById("exk_datumvon1").disabled = true;
          document.getElementById('exk_beschreibung1').value = '';
          document.getElementById("exk_beschreibung1").disabled = true;
          document.getElementById('exk_stdanreise1').value = '';
          document.getElementById("exk_stdanreise1").disabled = true;

        }else{
         /* Default beim Laden der Seite nur das lvs Gesamtsummenfeld einblenden und exkursion ausblenden*/
          //<![CDATA[
          $(document).ready(function(){
            var id = "exkursion1";
            var id2 = "lehrstd1";
            var id3 = "extracurr";

            $("#" + id).hide();
            $("#" + id2).show()

            /* Beim Editieren von Extracurricularem Klausurenkurs soll der hinweis angezeigt werden, sonst nicht (beim Laden ist erfs_value_art sonst leer)*/
            if(erfs_value_art == '6' ){
              $("#" + id3).show();
            }else{
              $("#" + id3).hide();
            }

          });
          //]]>
        }
        document.getElementById("titel").focus();

      }
    </script>
    <style>
      .StandardTable thead th{
      background: lightgray;
      border: 1px solid #656565;
      font-size:12px;
      font-family:Arial;
      padding-top:5px;
      padding-bottom:5px;
      padding-left:5px;
      padding-right:5px;
      }
      textarea{
      border: 1px solid #888;
      height: 6.7em;
      width: 48.5em;
      }
      select{
      width:630px;
      }
    </style>
  </head>
  <body onload="show('{$erfs_value_gemlv}','{$erfs_value_art}', '{$erfs_value_exk_tage}');">
    <br />
    <br />
    <div class="header">
      <div>
        <div>{$erfs_titel}</div>
      </div>
    </div>
    <form action="?action=register" method='post' name='erfassen'>
      <div class="pat_list_box">
        {if $erfs_error == '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>
              {$erfs_error_text}
            </td>
          </tr>
        </table>
        <br />
        {/if}
        {if $erfs_abschluss == '0'}
        <fieldset>
          <legend>
            <b>Lehrveranstaltung erfassen</b>
          </legend>
          <br />
          <br />
          <table cellspacing="0" cellpadding="0" width="100%" border="0" class="StandardTable">
            <tr>
              <td>
                Titel der Lehrveranstaltung (LV)
              </td>
              <td valign="top">
                <!--<textarea name="titel" id="titel" size="60">{$erfs_value_titel}</textarea>-->
                <input type="text" name="titel"  id="titel"  size="101" value="{$erfs_value_titel}">
              </td>
            </tr>
            <tr>
              <td>&nbsp;
              </td>
              <td>&nbsp;
              </td>
            </tr>
            <script language="javascript" type="text/javascript">
              function einblenden ($verid) {
                  /* Bei Exkursionen Erfassungsfeld einblenden*/
              	if (document.getElementById("art").value == "5") {
              		document.getElementById("exkursion1").style.visibility = "visible";
              		document.getElementById("lehrstd1").style.visibility = "hidden";
                    document.getElementById("exk_datumvon2").disabled = true;
                    document.getElementById("exk_datumbis2").disabled = true;
                    document.getElementById("exk_beschreibung2").disabled = true;
                    document.getElementById("exk_stdanreise2").disabled = true;
                    document.getElementById("exk_stdabreise2").disabled = true;

                    //<![CDATA[
                    $(document).ready(function(){
                            var id = "exkursion1";
                            var id2 = "lehrstd1";
                            var id3 = "extracurr";
                            $("#" + id).fadeIn("slow");
                            $("#" + id2).fadeOut("slow");
                            $("#" + id3).fadeOut("slow");
                    });
                    //]]>

                  }else{
                      document.getElementById("exkursion1").style.visibility = "hidden";
                      document.getElementById("lehrstd1").style.visibility = "visible";
                    //<![CDATA[
                    $(document).ready(function(){
                      var id = "exkursion1";
                      var id2 = "lehrstd1";
                      var id3 = "extracurr";
                      $("#" + id).fadeOut("slow");
                      $("#" + id2).fadeIn("slow");
                      $("#" + id3).fadeOut("slow");
                    });
                    //]]>
                  }
                  if (document.getElementById("art").value == "6") {
                    /*Hinweis zu Extracurricularer Klausurenkurs einblenden*/
                    //<![CDATA[
                    $(document).ready(function(){
                      var id = "exkursion1";
                      var id2 = "lehrstd1";
                      var id3 = "extracurr";
                      $("#" + id).fadeOut("slow");
                      $("#" + id2).fadeIn("slow");
                      $("#" + id3).fadeIn("slow");
                    });
                    //]]>
                  }
              }
            </script>
            <tr>
              <td>
                Art der LV
              </td>
              <td valign="top">
                <select name="art" id="art" size=5 onchange="einblenden();">
                {section name=table_data1 loop=$table_data1}
                <option value="{$table_data1[table_data1].verid}" {if $erfs_value_art == $table_data1[table_data1].verid} selected {/if} >{$table_data1[table_data1].bezeichnung}</option>
                {/section}
                </select>
              </td>
            </tr>
            <!--
              <tr id="extracurr">
                <td>
                  &nbsp;
                </td>
                <td valign="top">
                  <table width="70%" class="errorTable">
                    <tr>
                      <td>
                        <b>Extracurricularer Klausurenkurs</b><br>
                        <ul>
                          <li>Es dürfen höchstens {$abschluss_value_max_extracur} Lehrstunden (LVS) pro {$abschluss_einheit_max_extracur} erfasst werden.</li>
                        </ul>
                      </td>
                    </tr>
                  </table>
                  <br>
                </td>
              </tr>
              <tr>
                <td>Krankheitsbedingte Merkmale
                </td>
                <td><label for="krankheit1"><input type="radio" name="krankheit" id="krankheit1"value="0" {if $erfs_value_krankheit == 0} checked {/if}> keine</label><br>
                  <label for="krankheit2"><input type="radio" name="krankheit" id="krankheit2"value="1" {if $erfs_value_krankheit == 1} checked {/if}> Lehrveranstaltung übernommen</label><br>
                  <label for="krankheit3"><input type="radio" name="krankheit" id="krankheit3"value="2" {if $erfs_value_krankheit == 2} checked {/if}> Lehrveranstaltung nachgeholt</label>
                </td>
              </tr>
              <tr>
                <td>&nbsp;
                </td>
                <td>&nbsp;
                </td>
              </tr>
              <tr>
                <td>
                  gemeinsame&nbsp;LV
                </td>
                <td valign="top">
                  <select name="gemlv" id="gemlv" onchange='felder_aktiv();' size=2>
                  <option value="N" {if $erfs_value_gemlv == "N"} selected {/if} {if $erfs_value_gemlv == ""} selected {/if}>Nein</option>
                  <option value="J" {if $erfs_value_gemlv == "J"} selected {/if}>Ja</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td>
                  Anzahl der Lehrenden
                </td>
                <td valign="top">
                  <select name="anzgemlv" disabled>
                    <option value="">Anzahl der Lehrenden</option>
                    <option value="1" {if $erfs_value_anzgemlv == "1"} selected {/if}>1</option>
                    <option value="2" {if $erfs_value_anzgemlv == "2"} selected {/if}>2</option>
                    <option value="3" {if $erfs_value_anzgemlv == "3"} selected {/if}>3</option>
                    <option value="4" {if $erfs_value_anzgemlv == "4"} selected {/if}>4</option>
                    <option value="5" {if $erfs_value_anzgemlv == "5"} selected {/if}>5</option>
                    <option value="6" {if $erfs_value_anzgemlv == "6"} selected {/if}>6</option>
                    <option value="7" {if $erfs_value_anzgemlv == "7"} selected {/if}>7</option>
                    <option value="8" {if $erfs_value_anzgemlv == "8"} selected {/if}>8</option>
                    <option value="9" {if $erfs_value_anzgemlv == "9"} selected {/if}>9</option>
                    <option value="10" {if $erfs_value_anzgemlv == "10"} selected {/if}>10</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td>
                  Maß der Lehrbeteiligung (%)
                </td>
                <td valign="top">
                  <select name="massgemlv" disabled>
                    <option value="">Maß der Beteiligung</option>
                    <option value="5" {if $erfs_value_massgemlv == "5"} selected {/if}>5%</option>
                    <option value="10" {if $erfs_value_massgemlv == "10"} selected {/if}>10%</option>
                    <option value="15" {if $erfs_value_massgemlv == "15"} selected {/if}>15%</option>
                    <option value="20" {if $erfs_value_massgemlv == "20"} selected {/if}>20%</option>
                    <option value="25" {if $erfs_value_massgemlv == "25"} selected {/if}>25%</option>
                    <option value="30" {if $erfs_value_massgemlv == "30"} selected {/if}>30%</option>
                    <option value="35" {if $erfs_value_massgemlv == "35"} selected {/if}>35%</option>
                    <option value="40" {if $erfs_value_massgemlv == "40"} selected {/if}>40%</option>
                    <option value="45" {if $erfs_value_massgemlv == "45"} selected {/if}>45%</option>
                    <option value="50" {if $erfs_value_massgemlv == "50"} selected {/if}>50%</option>
                    <option value="55" {if $erfs_value_massgemlv == "55"} selected {/if}>55%</option>
                    <option value="60" {if $erfs_value_massgemlv == "60"} selected {/if}>60%</option>
                    <option value="65" {if $erfs_value_massgemlv == "65"} selected {/if}>65%</option>
                    <option value="70" {if $erfs_value_massgemlv == "70"} selected {/if}>70%</option>
                    <option value="75" {if $erfs_value_massgemlv == "75"} selected {/if}>75%</option>
                    <option value="80" {if $erfs_value_massgemlv == "80"} selected {/if}>80%</option>
                    <option value="85" {if $erfs_value_massgemlv == "85"} selected {/if}>85%</option>
                    <option value="90" {if $erfs_value_massgemlv == "90"} selected {/if}>90%</option>
                    <option value="95" {if $erfs_value_massgemlv == "95"} selected {/if}>95%</option>
                    <option value="100" {if $erfs_value_massgemlv == "100"} selected {/if}>100%</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td>
                  Namen der Lehrenden
                </td>
                <td valign="top">
                  <textarea name="namegemlv" disabled>{$erfs_value_namegemlv}</textarea>
                </td>
              </tr>
              <tr>
                <td>
                  Teachingfaktor
                </td>
                <td valign="top">
                  <select name="teamteaching" disabled size="5">
                  {section name=table_data3 loop=$table_data3}
                  <option value="{$table_data3[table_data3].tid}" {if $erfs_value_teamteaching == $table_data3[table_data3].tid} selected {/if} >{$table_data3[table_data3].bezeichnung}</option>
                  {/section}
                  </select>
                </td>
              </tr>
              <tr>
                <td>&nbsp;
                </td>
                <td>&nbsp;
                </td>
              </tr>
              <script type="text/javascript">
                {literal}
                function senden_aktiv(){
                   if ( document.erfassen.tage_exkursion1.checked == true ){
                      document.getElementById("exk_datumvon1").disabled = false;
                      document.getElementById("exk_beschreibung1").disabled = false;
                      document.getElementById("exk_stdanreise1").disabled = false;
                   }else{
                      document.getElementById("exk_datumvon1").disabled = true;
                      document.getElementById("exk_beschreibung1").disabled = true;
                      document.getElementById("exk_stdanreise1").disabled = true;
                   }
                   if ( document.erfassen.tage_exkursion2.checked == true ){
                      document.getElementById("exk_datumvon2").disabled = false;
                      document.getElementById("exk_datumbis2").disabled = false;
                      document.getElementById("exk_beschreibung2").disabled = false;
                      document.getElementById("exk_stdanreise2").disabled = false;
                      document.getElementById("exk_stdabreise2").disabled = false;
                   }else{
                      document.getElementById("exk_datumvon2").disabled = true;
                      document.getElementById("exk_datumbis2").disabled = true;
                      document.getElementById("exk_beschreibung2").disabled = true;
                      document.getElementById("exk_stdanreise2").disabled = true;
                      document.getElementById("exk_stdabreise2").disabled = true;
                   }
                 }
                 {/literal}
              </script>
              <tr id="exkursion1">
                <td>
                  Exkursionsstunden
                </td>
                <td valign="top">
                  <label for="tage_exkursion1"><input type="radio" name="tage_exkursion" id="tage_exkursion1"value="1" checked onclick="senden_aktiv();"> Eintägig</label><br>
                  <table>
                    <tr>
                      <td width=200><b>Datum:</b></td>
                      <td><input type="date" name="exk_datumvon" id="exk_datumvon1"value="{$erfs_value_exk_datumvon}"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Beschreibung/Ort:</b></td>
                      <td><input type="text" name="exk_beschreibung" id="exk_beschreibung1"  value="{$erfs_value_exk_beschreibung}" size="67"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Stunden:</b></td>
                      <td><input type="number" step="0.1" name="exk_stdanreise" id="exk_stdanreise1" value="{$erfs_value_exk_stdanreise}"></td>
                    </tr>
                  </table>
                  <br><br>
                  <label for="tage_exkursion2"><input type="radio" name="tage_exkursion"  id="tage_exkursion2" value="2" onclick="senden_aktiv();"> Mehrtägig</label><br>
                  <table>
                    <tr>
                      <td width=200><b>Datum von:</b></td>
                      <td><input type="date" name="exk_datumvon" id="exk_datumvon2" value="{$erfs_value_exk_datumvon}"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Datum bis:</b></td>
                      <td><input type="date" name="exk_datumbis" id="exk_datumbis2" value="{$erfs_value_exk_datumbis}"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Beschreibung/Ort:</b></td>
                      <td><input type="text" name="exk_beschreibung" id="exk_beschreibung2" value="{$erfs_value_exk_beschreibung}" size="67"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Stunden Anreisetag:</b></td>
                      <td><input type="number" step="0.1" name="exk_stdanreise" id="exk_stdanreise2" value="{$erfs_value_exk_stdanreise}"></td>
                    </tr>
                    <tr>
                      <td width=200><b>Stunden Ankunftstag:</b></td>
                      <td><input type="number" step="0.1" name="exk_stdabreise" id="exk_stdabreise2" value="{$erfs_value_exk_stdabreise}"></td>
                    </tr>
                  </table>
                  <br>
                  <table width="70%" class="errorTable">
                    <tr>
                      <td>
                        <b>Informationen</b><br>
                        <ul>
                          <li>Die Stunden werden mit dem Faktor {$erfs_value_exk_faktor} multipliziert, um die LVS zu erhalten.</li>
                          <li>Tageshöchstsatz liegt bei 10 Std. Das entspricht {$erfs_value_exk_max_tag} LVS.</li>
                          <li>Ganze Tage werden mit dem Höchstsatz {$erfs_value_exk_max_tag} LVS berechnet.</li>
                        </ul>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              -->
            <tr>
              <td>&nbsp;
              </td>
              <td>&nbsp;
              </td>
            </tr>
            <tr id="lehrstd1">
              <td>
                Summe eigene Lehrstunden (LVS)
              </td>
              <td valign="top">
                <input type="number" step="0.1" name="std" size="101" value="{$erfs_value_std}">
              </td>
            </tr>
            <tr>
              <td>&nbsp;
              </td>
              <td>&nbsp;
              </td>
            </tr>
            <tr>
              <td>
                Hinweise
              </td>
              <td valign="top">
                <textarea name="hinweise">{$erfs_value_hinweise}</textarea>
              </td>
            </tr>
          </table>
          <br />
          <p align='center'>
            <input type='submit' name='senden' value="Speichern">
          </p>
          <br />
        </fieldset>
    </form>
    <br />
    <br />
    <fieldset>
    <legend>
    <b>Erfasste Lehrveranstaltungen</b>
    </legend>
    <table cellspacing="0" cellpadding="2" width="100%" border="1">
    <tr>
    <td>
    <b>lfd.Nr.</b>
    </td>
    <td>
    <b>Titel der Lehrveranstaltung (LV)</b>
    </td>
    <td>
    <b>Art der LV</b>
    </td>
    <!--
      <td>
      <b>Krankheitsbedingte Merkmale</b>
      </td>
      <td>
      <b>gemeinsame&nbsp;LV</b>
      </td>
        <td>
        <b>Anzahl der Lehrenden</b>
        </td>
        <td>
        <b>Maß der<br>Lehrbeteiligung (%)</b>
        </td>
        <td>
        <b>Namen der Lehrenden</b>
        </td>
        <td>
        <b>Teachingfaktor</b>
        </td>
        -->
    <td align="right">
    <b>Summe eigene Lehrstunden (LVS)</b>
    </td>
    <td>
    <b>Hinweise</b>
    </td>
    <td align="center">
    <b>Edit</b>
    </td>
    <tr>
    {section name=table_data2 loop=$table_data2}
    {if $smarty.section.table_data2.rownum != ''}
    <tr>
    <td>
    {$smarty.section.table_data2.rownum}
    </td>
    <td>
    {$table_data2[table_data2].titel}
    </td>
    <td>
    {$table_data2[table_data2].veranstaltung}
    </td>
    <!--
      <td>
      {$table_data2[table_data2].krankheitsmerkmal}
      </td>
      <td>
      {$table_data2[table_data2].gemlv_form}
      </td>
        <td>
        {$table_data2[table_data2].anzgemlv}
        </td>
        <td>
        {$table_data2[table_data2].massgemlv}%
        </td>
        <td>
        {$table_data2[table_data2].namegemlv}
        </td>
        <td>
        {$table_data2[table_data2].teamteaching_form}
        </td>
        -->
    <td align="right">
    {$table_data2[table_data2].lvs}
    </td>
    <td>
    {$table_data2[table_data2].hinweise}
    </td>
    <td align="center">
    <a href=?edit={$table_data2[table_data2].dsid}><img title = "Lehrveranstaltung bearbeiten" border="0" height=10 src="templates/{$global_template}/images/edit.png"></a>
    &nbsp;
    <a href="?action=del&dsid={$table_data2[table_data2].dsid}"><img title = 'Lehrveranstaltung l&ouml;schen' border="0" height=10 src="templates/{$global_template}/images/drop.png"></a>
    </td>
    </tr>
    {/if}
    {/section}
    <tr>
    <td colspan="3">&nbsp;</td>
    <td align="right"><b>Summe: {$erfs_value_summe_jahr}</b></td>
    <td colspan="2">&nbsp;</td>
    </tr>
    </table>
    </fieldset>
    {/if}
    <br />
    <br />
    </div>
  </body>
</html>
{/if}