Rev 1197 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* Template für die Einstellungen des Export Moduls
* Sollte normalerweise nicht verändert werden
*/
?>
<div class="wpsg_form_field">
<div class="wpsg_form_left"><?php echo __('Profil wählen', 'wpsg'); ?>:</div>
<div class="wpsg_form_right">
<select name="profil" onchange="document.forms['form1'].submit();">
<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
<option value="-2" <?php echo (($_REQUEST['profil'] == '-2')?'selected="selected"':''); ?>><?php echo __('Neues Profil erstellen', 'wpsg'); ?></option>
<?php foreach ((array)$this->data['arProfil'] as $p) { ?>
<option value="<?php echo $p['id']; ?>" <?php echo (($_REQUEST['profil'] == $p['id'])?'selected="selected"':''); ?>><?php echo $p['filename'].' ('.$p['id'].')'; ?></option>
<?php } ?>
</select>
<?php if ($_REQUEST['profil'] > 0) { ?>
<label><input type="checkbox" name="profil_delete" value="<?php echo $_REQUEST['profil']; ?>" /> <?php echo __('Profil löschen', 'wpsg'); ?></label>
<?php } ?>
</div>
</div>
<?php if (isset($_REQUEST['profil']) && $_REQUEST['profil'] != '-1') { ?>
<hr /><input type="hidden" name="save_profil" value="<?php echo $_REQUEST['profil']; ?>" />
<?php echo wpsg_drawForm_Input('set_profil[filename]', __('Dateiname', 'wpsg'), $this->view['wpsg_mod_export']['profil']['filename']); ?>
<?php echo wpsg_drawForm_Input('set_profil[trenner]', __('Feld Trennzeichen', 'wpsg'), $this->view['wpsg_mod_export']['profil']['separator']); ?>
<tr>
<td style="vertical-align:top;"><?php echo __('Optionen', 'wpsg'); ?>:</td>
<td>
<label>
<input type="checkbox" name="set_profil[onerow]" value="1" <?php echo (($this->data['profil']['onerow'] == '1')?'checked="checked"':''); ?> /> <?php echo __('Eine Zeile pro Bestellung (Bei mehreren bestellten Produkten)', 'wpsg'); ?>
</label><br />
<label>
<input type="checkbox" name="set_profil[firstline]" value="1" <?php echo (($this->data['profil']['firstline'] == '1')?'checked="checked"':''); ?> /> <?php echo __('Erste Spalte enthält Spaltennamen', 'wpsg'); ?>
</label><br />
<label>
<input type="checkbox" name="set_profil[iso]" value="1" <?php echo (($this->data['profil']['iso'] == '1')?'checked="checked"':''); ?> /> <?php echo __('ISO statt UFT-8', 'wpsg'); ?>
</label>
</td>
</tr>
<tr>
<td><?php echo __('Vorgabe CSV', 'wpsg'); ?>:</td>
<td><input type="file" name="vorlage" /></td>
</tr>
<tr><td colspan="2">
<br />
<table style="" cellpadding="0" cellspacing="0" class="exportprofiltable">
<tr>
<th style="font-weight:bold; width:200px;"><?php echo __('CSV Spaltenname', 'wpsg'); ?></th>
<th style="font-weight:bold; width:120px;"><?php echo __('Anzahl max. Zeichen', 'wpsg'); ?></th>
<!-- <th style="font-weight:bold; width:10px;"><?php echo __('""', 'wpsg'); ?></th> -->
<th style="font-weight:bold;"><?php echo __('wpShopGermany - Felder', 'wpsg'); ?></th>
<th style="font-weight:bold;"><?php echo __('Statischer Wert', 'wpsg'); ?></th>
<th style="font-weight:bold;"></th>
</tr>
<?php $i = 0; foreach ($this->data['profil']['xml']->fields->field as $f) { ?>
<tr class="<?php echo (($i % 2 == 0)?'wpsg_odd':'wpsg_even'); ?>">
<td><input type="text" style="width:100%;" value="<?php echo $f['colname']; ?>" name="field[<?php echo $i; ?>][colname]" /></td>
<td><input type="number" value="<?php echo (($f['size'] > 0)?$f['size']:'0'); ?>" name="field[<?php echo $i; ?>][size]" /></td>
<!-- <td><input type="checkbox" value="1" <?php echo (($f['enclosure'] == '1')?'checked="checked"':''); ?> name="field[<?php echo $i; ?>][enclosure]" /></td> -->
<td>
<select onchange="if (jQuery(this).val() == 'allgemein_statisch') jQuery('#static_<?php echo $i; ?>').show(); else jQuery('#static_<?php echo $i; ?>').hide();" name="field[<?php echo $i; ?>][value]" style="width:100%;">
<?php foreach ($this->data['fields'] as $og) { ?>
<optgroup label="<?php echo $og['name']; ?>">
<?php foreach ($og['fields'] as $k => $v) { ?>
<option <?php echo (($f['value'] == $k)?'selected="selected"':''); ?> value="<?php echo $k; ?>"><?php echo $v; ?></option>
<?php } ?>
</optgroup>
<?php $index ++; } ?>
</select>
</td>
<td>
<input id="static_<?php echo $i; ?>" style="<?php echo (($f['value'] != 'allgemein_statisch')?'display:none;':''); ?>" type="text" value="<?php echo $f['static']; ?>" name="field[<?php echo $i; ?>][static]" />
</td>
<td>
<label><input type="checkbox" value="1" name="field[<?php echo $i; ?>][remove]" /> <?php echo __('Löschen', 'wpsg'); ?></label>
</td>
</tr>
<?php $i ++; } ?>
<tr><td colspan="4"> </td></tr>
<tr><td colspan="4" style="font-weight:bold;"><?php echo __('Neue Spalte', 'wpsg'); ?></td></tr>
<tr>
<td><input type="text" style="width:100%;" value="" name="field[neu][colname]" /></td>
<td><input type="number" value="0" name="field[neu][size]" /></td>
<!-- <td><input type="checkbox" value="1" name="field[neu][enclosure]" /></td> -->
<td>
<select onchange="if (jQuery(this).val() == 'allgemein_statisch') jQuery('#static_neu').show(); else jQuery('#static_neu').hide();" id="field_neu_value" name="field[neu][value]" style="width:100%;">
<?php foreach ($this->data['fields'] as $og) { ?>
<optgroup label="<?php echo $og['name']; ?>">
<?php foreach ($og['fields'] as $k => $v) { ?>
<option <?php echo (($f['value'] == $k)?'selected="selected"':''); ?> value="<?php echo $k; ?>"><?php echo $v; ?></option>
<?php } ?>
</optgroup>
<?php $index ++; } ?>
</select>
</td>
<td>
<input id="static_neu" style="display:none;" type="text" value="" name="field[neu][static]" />
<script type="text/javascript">
jQuery(document).ready(function() {
if (jQuery('#field_neu_value').val() == 'allgemein_statisch') jQuery('#static_neu').show();
} );
</script>
</td>
<td></td>
</tr>
</table>
</td></tr>
<?php } ?>
<br />