aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default/forms/file/upload.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
commit7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 (patch)
tree1070be6b85c5a2327163cb0326dfbcbc62f10d62 /mod/file/views/default/forms/file/upload.php
parent07ffe6464b453fd90cd2833fc55f804c57c52b4a (diff)
downloadelgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.gz
elgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.bz2
almost finished updating the file plugin to work with new html/css
git-svn-id: http://code.elgg.org/elgg/trunk@7804 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/views/default/forms/file/upload.php')
-rw-r--r--mod/file/views/default/forms/file/upload.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/mod/file/views/default/forms/file/upload.php b/mod/file/views/default/forms/file/upload.php
new file mode 100644
index 000000000..f3012ea7a
--- /dev/null
+++ b/mod/file/views/default/forms/file/upload.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Elgg file upload/save form
+ *
+ * @package ElggFile
+ */
+
+// once elgg_view stops throwing all sorts of junk into $vars, we can use
+$title = elgg_get_array_value('title', $vars, '');
+$desc = elgg_get_array_value('description', $vars, '');
+$tags = elgg_get_array_value('tags', $vars, '');
+$access_id = elgg_get_array_value('access_id', $vars, ACCESS_DEFAULT);
+$container_guid = elgg_get_array_value('container_guid', $vars);
+$guid = elgg_get_array_value('guid', $vars, null);
+
+if ($guid) {
+ $file_label = elgg_echo("file:replace");
+} else {
+ $file_label = elgg_echo("file:file");
+}
+
+?>
+<p>
+ <label><?php echo $file_label; ?></label><br />
+ <?php echo elgg_view('input/file', array('internalname' => 'upload')); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('title'); ?></label><br />
+ <?php echo elgg_view('input/text', array('internalname' => 'title', 'value' => $title)); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('description'); ?></label>
+ <?php echo elgg_view('input/longtext', array('internalname' => 'description', 'value' => $desc)); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('tags'); ?></label>
+ <?php echo elgg_view('input/tags', array('internalname' => 'tags', 'value' => $tags)); ?>
+</p>
+<?php
+
+$categories = elgg_view('categories', $vars);
+if ($categories) {
+ echo "<p>$categories</p>";
+}
+
+?>
+<p>
+ <label><?php echo elgg_echo('access'); ?></label><br />
+ <?php echo elgg_view('input/access', array('internalname' => 'access_id', 'value' => $access_id)); ?>
+</p>
+<p>
+<?php
+
+echo elgg_view('input/hidden', array('internalname' => 'container_guid', 'value' => $container_guid));
+
+if ($guid) {
+ echo elgg_view('input/hidden', array('internalname' => 'file_guid', 'value' => $guid));
+}
+
+echo elgg_view('input/submit', array('value' => elgg_echo("save")));
+
+?>
+</p>