<form class="wssBarSettings wssSubmit" action="{$selflink}" method="post">
<h3>Eingestellte Felder für {$title}</h3>
<ul class="eingestellteFelder">
</ul>

<script>
  var wssAry = [];
{foreach item=spalte from=$eingestellteSpalten}
  var wss = {};
  wss.wsfId = '{$spalte->sight_field_id|escape:javascript}';
  wss.name = '{$spalte->name|escape:javascript}';
  wss.label = '{$spalte->title|escape:javascript}';
  wss.bold = '{$spalte->bold|escape:javascript}';
  wss.maxlength = '{$spalte->maxlength|escape:javascript}';
  wss.fontsize = '{$spalte->fontsize|escape:javascript}';
  wss.textfarbe = '{$spalte->textfarbe|escape:javascript}';
  wss.ausrichtung = '{$spalte->ausrichtung|escape:javascript}';
  wss.mandatory = '{$spalte->mandatory_field|escape:javascript}';
  wss.wenn_leer = '{$spalte->wenn_leer|escape:javascript}';
  wss.head = '{if $spalte->head}{$spalte->head|escape:javascript}{/if}';
  wss.tail = '{if $spalte->tail}{$spalte->tail|escape:javascript}{/if}';
  
  wssAry[wssAry.length] = wss;
{/foreach}
</script>

<input class="openwsslist" type="submit" id="{$sightId}"
  name="openwsslist" title="Weitere Felder hinzufügen" value="Hinzufügen" />
<input class="wsslistsubmit" type="submit"
  name="savesettings" title="Eingestellte Felder übernehmen" value="Übernehmen" />
</form>

<div id="wsf_settings_dialog">
  <div  style="background-color: #d1d1d1;">
    <div class="wsf_setting_feld wsf_font_elements">
      <i id="align_left" class="fa fa-align-left wsf_align "></i>
      <i id="align_center" class="fa fa-align-center wsf_align"></i>
      <i id="align_right" class="fa fa-align-right wsf_align"></i>
      <i id="align_justify" class="fa fa-align-justify wsf_align"></i>
      <label id="wsf_setting_fett" class="wsf_mark_checkbox">F</label>
      <span class="wsf_border"></span>
      <i class="fa fa-text-height" style="font-size: 1.21em; margin-top: -2px;"></i>
      <input type="text" id="wsf_setting_fontsize" maxlength="3" size="3" value="" /> <b>%</b>
      <span class="wsf_border"></span>
      <i id="setting_setColor_icon" class="fa fa-palette"></i>
      <span style="background-color:#000000; width: 13px; height: 13px; margin-bottom: -4px;" class="setting_setColor">
        <input type="hidden" value="#000000" class="hidden_color"/>
      </span>
    </div>
    <div style="margin-bottom: 3px; margin-top: 3px; margin-left: 3px; margin-right: 3px; height: 2px; background: #c1c1c1;"></div>
    <div class="wsf_setting_feld">
      <table>
        <tr>
          <td><label>Beschriftung: </label></td>
          <td><input type="text" id="wsf_setting_beschriftung" size="25" /></td>
        </tr>
        <tr>
          <td><label style="font-weight: bold;">Pflichtfeld:</label></td>
          <td><input type="checkbox" id="wsf_setting_mandatory" /></td>
        </tr>
        <tr>
          <td><label>Maximale Länge:</label></td>
          <td><input type="text" id="wsf_setting_maxlength" maxlength="4" size="4" value="" /></td>
        </tr>
        <tr>
          <td><label>Präfix:</label></td>
          <td><input type="text" id="wsf_setting_head" size="16" /></td>
        </tr>
        <tr>
          <td><label>Suffix:</label></td>
          <td><input type="text" id="wsf_setting_tail" size="16" /></td>
        </tr>
        <tr>
          <td colspan="2"><label style="font-weight: bold;">Falls der Inhalt leer ist</label><td>
        </tr>
        <tr>
          <td><input type="radio" class="wenn_leer wenn_leer_normal" name="wenn_leer" value="normal" checked="checked"/></td>
          <td> die Beschriftung anzeigen</td>
        </tr>
        <tr>
          <td><input type="radio" class="wenn_leer wenn_leer_hide" name="wenn_leer" value="hide"/></td>
          <td> die Beschriftung verstecken</td>
        </tr>
        <tr>
          <td><input type="radio" class="wenn_leer wenn_leer_alternativtext" name="wenn_leer" value="alternativtext"/></td>
          <td> folgenden Inhalt ausgeben:</td>
        </tr>
        <tr>
          <td></td>
          <td><input size="25" class="alternativtext" style="margin-right: 4px; margin-bottom: 4px;" name="alternativtext" value="" /></td>
        </tr>
      </table>
    </div>
  </div>
</div>

<div class="wsslist" title="Felder hinzufügen">
  <div class="wssContent">
    <!-- Hier werden per AJAX die Variablen angezeigt -->
  </div>
</div>

<ul class="wsf_prototype" style="display:none">
  <li class="wsf">
    <span class="wsf_move"></span>
    <span class="wsf_label"></span>
    <span class="wsf_beschreibung nowrap"></span>
    <span class="wsf_setting"></span>
    <span class="wsf_entfernen"></span>
    <input type="hidden" class="wsf_wenn_leer" value=""/>
  </li>
</ul>