diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-03-18 14:08:31 +0100 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2012-03-18 14:08:31 +0100 |
commit | ccff9ce8d8a2818699ce4e20a310986fc95ea022 (patch) | |
tree | c585ead91c894c621c73b63bc84012709e795151 /tpl/general | |
parent | 24547ccec6526fcef3cccb34bc35fb81f31236b3 (diff) | |
download | Bits-ccff9ce8d8a2818699ce4e20a310986fc95ea022.tar.gz Bits-ccff9ce8d8a2818699ce4e20a310986fc95ea022.zip |
Added a way of classifying images in folders.
Diffstat (limited to 'tpl/general')
-rw-r--r-- | tpl/general/inc_form.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tpl/general/inc_form.php b/tpl/general/inc_form.php index 8cd2ad5..24e4a49 100644 --- a/tpl/general/inc_form.php +++ b/tpl/general/inc_form.php @@ -13,6 +13,14 @@ foreach($fields as $f) { if (isset($f['type']) && $f['type'] == 'textarea') { echo '<label>' . $f['label'] . '</label><br />'; echo '<textarea name="' . $f['name'] . '">' . $f['value'] . '</textarea><br />'; + } else if (isset($f['type']) && $f['type'] == 'select') { + echo '<label>' . $f['label'] . '</label>'; + echo '<select name="' . $f['name'] . '">'; + foreach ($f['choices'] as $id => $text) { + echo '<option value="' . $id . '"'. ($id == $f['value'] ? ' selected="selected"' : '') . + '>' . $text . '</option>'; + } + echo '</select><br />'; } else { ?> <label for="ff_<?php echo $f['name']; ?>"><?php echo $f['label']; ?></label> |