summaryrefslogtreecommitdiff
path: root/views/admin/form
diff options
context:
space:
mode:
Diffstat (limited to 'views/admin/form')
-rw-r--r--views/admin/form/text.phtml13
1 files changed, 8 insertions, 5 deletions
diff --git a/views/admin/form/text.phtml b/views/admin/form/text.phtml
index 90a2b4c..1cfd831 100644
--- a/views/admin/form/text.phtml
+++ b/views/admin/form/text.phtml
@@ -8,7 +8,7 @@
<?php if (wpsg_isTrue($this->view['field_config']['noP'])) { ?>
<span <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?>><?php echo $this->view['field_value']; ?></span>
<?php } else { ?>
- <p <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static" style="padding-left:0px;"><?php echo $this->view['field_value']; ?></p>
+ <p <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static"><?php echo $this->view['field_value']; ?></p>
<?php } ?>
<?php if (wpsg_isSizedString($this->view['field_config']['help'])) { ?>
@@ -23,12 +23,15 @@
jQuery(document).ready(function() {
jQuery('#<?php echo $this->view['field_id']; ?>').wspg_editable('<?php echo $this->view['field_config']['inlineEdit_url']; ?>', {
- <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_type'])) { ?>
- 'type': '<?php echo $this->view['field_config']['inlineEdit_type']; ?>',
'placement': 'bottom'
+ <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_type'])) { ?>
+ ,'type': '<?php echo $this->view['field_config']['inlineEdit_type']; ?>'
+ <?php } ?>
+ <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_source'])) { ?>
+ , 'data': <?php echo $this->view['field_config']['inlineEdit_source']; ?>
<?php } ?>
- <?php if (wpsg_isSizedArray($this->view['field_config']['inlineEdit_source'])) { ?>
- ,'data': <?php echo json_encode($this->view['field_config']['inlineEdit_source']); ?>
+ <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_callback'])) { ?>
+ , 'callback': function(response, newValue) { <?php echo $this->view['field_config']['inlineEdit_callback']; ?>(response, newValue); }
<?php } ?>
} );