diff options
Diffstat (limited to 'views/admin/form')
| -rw-r--r-- | views/admin/form/checkbox.phtml | 18 | ||||
| -rw-r--r-- | views/admin/form/input.phtml | 2 | ||||
| -rw-r--r-- | views/admin/form/select.phtml | 15 |
3 files changed, 34 insertions, 1 deletions
diff --git a/views/admin/form/checkbox.phtml b/views/admin/form/checkbox.phtml new file mode 100644 index 0000000..9c08291 --- /dev/null +++ b/views/admin/form/checkbox.phtml @@ -0,0 +1,18 @@ +<div class="form-group">
+
+ <div class="col-sm-offset-6 col-sm-6">
+
+ <div class="checkbox">
+ <label>
+
+ <input type="hidden" name="<?php echo $this->view['field_name']; ?>" value="0" />
+ <input type="checkbox" name="<?php echo $this->view['field_name']; ?>" value="1" <?php echo (($this->view['field_checked'] > 0)?'checked="checked"':''); ?> />
+
+ <?php echo $this->view['field_label']; ?>
+
+ </label>
+ </div>
+
+ </div>
+
+</div>
\ No newline at end of file diff --git a/views/admin/form/input.phtml b/views/admin/form/input.phtml index a2abe45..c1213d2 100644 --- a/views/admin/form/input.phtml +++ b/views/admin/form/input.phtml @@ -3,7 +3,7 @@ <label class="col-sm-6 control-label" for="<?php echo $this->view['field_id']; ?>"><?php echo $this->view['field_label']; ?></label>
<div class="col-sm-6">
- <input type="text" class="form-control" value="<?php echo wpsg_hspc($this->view['field_value']); ?>" id="<?php echo $this->view['field_id']; ?>" />
+ <input type="text" class="form-control" name="<?php echo $this->view['field_name']; ?>" value="<?php echo wpsg_hspc($this->view['field_value']); ?>" id="<?php echo $this->view['field_id']; ?>" />
</div>
</div>
\ No newline at end of file diff --git a/views/admin/form/select.phtml b/views/admin/form/select.phtml new file mode 100644 index 0000000..70e040c --- /dev/null +++ b/views/admin/form/select.phtml @@ -0,0 +1,15 @@ +<div class="form-group">
+
+ <label class="col-sm-6 control-label" for="<?php echo $this->view['field_id']; ?>"><?php echo $this->view['field_label']; ?></label>
+
+ <div class="col-sm-6">
+
+ <select id="<?php echo $this->view['field_id']; ?>" name="<?php echo $this->view['field_name']; ?>">
+ <?php foreach ($this->view['field_values'] as $k => $v) { ?>
+ <option <?php echo (($k == $this->view['field_value'])?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($k); ?>"><?php echo wpsg_hspc($v); ?></option>
+ <?php } ?>
+ </select>
+
+ </div>
+
+</div>
\ No newline at end of file |
