diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2016-03-22 13:59:16 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2016-03-22 13:59:16 +0000 |
| commit | 0fc69ce3ad89844dd5fb2f87532e7b6fca55923d (patch) | |
| tree | b89a251b26e0726a80c4c24eb0b726f1bbaeea62 /views/admin/kundendaten_tab2.phtml | |
| parent | c14a7c20ec8c489a37412cebb524e367679f5a60 (diff) | |
- sync
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5439 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/admin/kundendaten_tab2.phtml')
| -rw-r--r-- | views/admin/kundendaten_tab2.phtml | 140 |
1 files changed, 74 insertions, 66 deletions
diff --git a/views/admin/kundendaten_tab2.phtml b/views/admin/kundendaten_tab2.phtml index e506f2e..b6073a5 100644 --- a/views/admin/kundendaten_tab2.phtml +++ b/views/admin/kundendaten_tab2.phtml @@ -5,9 +5,80 @@ */
?>
+
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
+<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
+
+<table class="wpsg_customfields table">
+ <thead>
+ <tr>
+ <th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
+ <th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
+ <th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
+ <th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="col4"></th>
+ <th class="col5">
+ <a href="#" title="<?php echo __('Neue Kundenvariable anlegen', 'wpsg'); ?>" onclick="return wpsg_addCustomField();" class="customer_variable_add"><span class="glyphicon glyphicon-plus"></span></a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
+ <tr class="wpsg_customervar_row_<?php echo $c_id; ?>">
+ <td class="col0"><?php echo $c_id; ?></td>
+ <td class="col2"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
+ <td class="col3">
+ <select class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][show]">
+ <option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
+ <option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col3">
+ <select class="form-control wpsg-sm" onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
+ <option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
+ <option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
+ </select>
+ </td>
+ <td class="col4">
+ <a href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-modal-window"></span></a>
+ </td>
+ <td class="col5">
+
+ <a href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeCustomField(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
+
+ <script type="text/javascript">
+
+ jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ field_id: '<?php echo $c_id; ?>'
+ },
+ submit : '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+
+ </script>
+
+ </td>
+ </tr>
+ <tr class="wpsg_customervar_row_<?php echo $c_id; ?>" id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
+ <td class="col0"></td>
+ <td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
+ <td class="col2345" colspan="4">
+ <input type="text" class="form-control wpsg-sm" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+</table>
+
-<script type="text/javascript">
+<script type="text/javascript">/* <![CDATA[ */
/**
* Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
@@ -45,73 +116,10 @@ } // function wpsg_genPACode(pa_id)
-</script>
+/* ]]> */</script>
-<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
-
-<table class="wpsg_customfields">
- <tr>
- <th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
- <th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
- <th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
- <th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
- <th class="col4"></th>
- <th class="col5">
- <a class="wpsg_icon wpsg_icon_center wpsg_icon_remove" href="#" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return false;"></a>
- </th>
- </tr>
- <?php foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
- <tr>
- <td class="col0"><?php echo $c_id; ?></td>
- <td class="col2 wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></td>
- <td class="col3">
- <select name="pflicht[custom][<?php echo $c_id; ?>][show]">
- <option <?php echo (($c['show'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Ja', 'wpsg'); ?></option>
- <option <?php echo (($c['show'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Nein', 'wpsg'); ?></option>
- <option <?php echo (($c['show'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Nicht zeigen', 'wpsg'); ?></option>
- </select>
- </td>
- <td class="col3">
- <select onchange="if (jQuery(this).val() == '1') jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); else jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();" name="pflicht[custom][<?php echo $c_id; ?>][typ]">
- <option <?php echo (($c['typ'] == '0')?'selected="selected"':''); ?> value="0"><?php echo __('Textfeld', 'wpsg'); ?></option>
- <option <?php echo (($c['typ'] == '1')?'selected="selected"':''); ?> value="1"><?php echo __('Auswahlfeld', 'wpsg'); ?></option>
- <option <?php echo (($c['typ'] == '2')?'selected="selected"':''); ?> value="2"><?php echo __('Checkbox', 'wpsg'); ?></option>
- </select>
- </td>
- <td class="col4">
- <a class="wpsg_icon wpsg_icon_html wpsg_icon_center" href="#" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"></a>
- </td>
- <td class="col5">
- <input type="checkbox" value="1" name="pflicht[custom][<?php echo $c_id; ?>][del]" />
-
- <script type="text/javascript">
-
- jQuery('#kundenvariable_name_<?php echo $c_id; ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
- submitdata: {
- field: 'name',
- field_id: '<?php echo $c_id; ?>'
- },
- submit : '<?php echo __('Speichern', 'wpsg'); ?>',
- placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
- indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
- tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
- });
-
- </script>
-
- </td>
- </tr>
- <tr id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
- <td class="col0"></td>
- <td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
- <td class="col2345" colspan="4">
- <input type="text" name="pflicht[custom][<?php echo $c_id; ?>][auswahl]" value="<?php echo wpsg_hspc($c['auswahl']); ?>" />
- </td>
- </tr>
- <?php } ?>
-</table>
<br />
-<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
<?php } else { ?>
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
<?php } ?>
\ No newline at end of file |
