aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default/forms
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default/forms')
-rw-r--r--mod/file/views/default/forms/file/upload.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/mod/file/views/default/forms/file/upload.php b/mod/file/views/default/forms/file/upload.php
index 001e66674..f637a419e 100644
--- a/mod/file/views/default/forms/file/upload.php
+++ b/mod/file/views/default/forms/file/upload.php
@@ -11,13 +11,17 @@ $desc = elgg_extract('description', $vars, '');
$tags = elgg_extract('tags', $vars, '');
$access_id = elgg_extract('access_id', $vars, ACCESS_DEFAULT);
$container_guid = elgg_extract('container_guid', $vars);
+if (!$container_guid) {
+ $container_guid = elgg_get_logged_in_user_guid();
+}
$guid = elgg_extract('guid', $vars, null);
-$ajax = elgg_extract('ajax', $vars, FALSE);
if ($guid) {
$file_label = elgg_echo("file:replace");
+ $submit_label = elgg_echo('save');
} else {
$file_label = elgg_echo("file:file");
+ $submit_label = elgg_echo('upload');
}
?>
@@ -49,21 +53,16 @@ if ($categories) {
<label><?php echo elgg_echo('access'); ?></label><br />
<?php echo elgg_view('input/access', array('name' => 'access_id', 'value' => $access_id)); ?>
</div>
-<div>
+<div class="elgg-foot">
<?php
echo elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $container_guid));
-//@todo this should not be necessary in 1.8... -- ajax actions can be auto-detected
-if ($ajax) {
- echo elgg_view('input/hidden', array('name' => 'ajax', 'value' => 1));
-}
-
if ($guid) {
echo elgg_view('input/hidden', array('name' => 'file_guid', 'value' => $guid));
}
-echo elgg_view('input/submit', array('value' => elgg_echo("save")));
+echo elgg_view('input/submit', array('value' => $submit_label));
?>
</div>