summaryrefslogtreecommitdiff
path: root/views/admin
diff options
context:
space:
mode:
Diffstat (limited to 'views/admin')
-rw-r--r--views/admin/kundendaten.phtml28
-rw-r--r--views/admin/kundendaten_tab2.phtml49
2 files changed, 25 insertions, 52 deletions
diff --git a/views/admin/kundendaten.phtml b/views/admin/kundendaten.phtml
index 4c65f1d..3208acc 100644
--- a/views/admin/kundendaten.phtml
+++ b/views/admin/kundendaten.phtml
@@ -17,7 +17,7 @@
</div>
-<!-- Modal -->
+<!-- Modal für Codeanzeige -->
<div class="modal fade" id="wpsg_code_dialog" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -56,9 +56,16 @@
<?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab1.phtml'); ?>
</div>
<div role="tabpanel" id="tabcontent2" class="tab-pane">
- <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
+
+ <div id="wpsg_kv_list">
+ <?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab2.phtml'); ?>
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+ <a href="" onclick="return wpsg_addCustomField();"><span class="glyphicon glyphicon-plus"></span>&nbsp;<?php echo __('Neue Kundenvariable anlegen.', 'wpsg'); ?></a>
+
</div>
- <div role="tabpanel" id="tabcontent3" class="tab-pane">
+ <div role="tabpanel" id="tabcontent3" class="tab-pane">
<?php echo $this->render(WPSG_PATH_VIEW.'/admin/kundendaten_tab3.phtml'); ?>
</div>
</div>
@@ -66,7 +73,7 @@
</div>
</div>
- <p calss="submit"><input type="submit" value="<?php echo __('Einstellungen Speichern', 'wpsg'); ?>" class="button-primary" /></p>
+ <p calss="submit"><input name="submit" type="submit" value="<?php echo __('Einstellungen Speichern', 'wpsg'); ?>" class="button-primary" /></p>
</form>
@@ -78,12 +85,12 @@
function wpsg_addCustomField()
{
- jQuery('#tabcontent2').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+ jQuery('#wpsg_kv_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=add&noheader=1',
success: function(data) {
- jQuery('#tabcontent2').html(data);
+ jQuery('#wpsg_kv_list').html(data);
}
} );
@@ -136,6 +143,15 @@
return false;
} // function wpsg_genPACode(pa_id)
+
+ jQuery(document).ready(function() {
+
+ jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { localStorage.setItem('wpsg_admin_customer_lastTab', jQuery(this).attr('href')); } );
+
+ var lastTab = localStorage.getItem('wpsg_admin_customer_lastTab');
+ if (lastTab) jQuery('[href="' + lastTab + '"]').tab('show');
+
+ } );
/* ]]> */</script>
diff --git a/views/admin/kundendaten_tab2.phtml b/views/admin/kundendaten_tab2.phtml
index b6073a5..759500b 100644
--- a/views/admin/kundendaten_tab2.phtml
+++ b/views/admin/kundendaten_tab2.phtml
@@ -17,9 +17,7 @@
<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>
+ <th class="col5"></th>
</tr>
</thead>
<tbody>
@@ -35,7 +33,7 @@
</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]">
+ <select class="form-control wpsg-sm" onchange="if (jQuery(this).val() == '1') { jQuery('#row_auswahl_<?php echo $c_id; ?>').show(); jQuery('#row_auswahl_<?php echo $c_id; ?> input').first().focus(); } 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>
@@ -66,7 +64,7 @@
</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;'); ?>">
+ <tr class="wpsg_customervar_row2 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">
@@ -77,47 +75,6 @@
</tbody>
</table>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- /**
- * Zeigt den HTML Code, der die gewählte Kundenvariablen in die Templates einbaut
- */
- function wpsg_genKVCode(kv_id)
- {
-
- jQuery("#wpsg_kv_code_dialog").dialog( {
- 'dialogClass': 'wp-dialog',
- 'modal': true,
- 'width': 700,
- 'height': 300,
- 'title': '<?php echo __('HTML Code Block', 'wpsg'); ?>',
- open: function(event, ui) {
-
- jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- jQuery.ajax( {
- url: 'admin.php?page=wpsg-Admin&subaction=kundendaten&noheader=1&show=code',
- data: {
- 'kv_id': kv_id
- },
- success: function(data)
- {
-
- jQuery('#wpsg_kv_code_dialog .wpsg_dialog').html(data);
-
- }
- } );
-
- }
- } );
-
- return false;
-
- } // function wpsg_genPACode(pa_id)
-
-/* ]]> */</script>
-
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
<?php } else { ?>