summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-13 19:25:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-13 19:25:45 +0200
commit4397fbcba26037acc2c1323e73e5a54200da7c17 (patch)
tree9ff3b21a08607bb580bbaa7c7e778a548f92ee66 /application/views
parenteb820e55b3e4a7af62038f8f236c37fb6e6c66d9 (diff)
Add do_paste() and remove ajax from upload_form
If the session has timed out, javascript will get the login page and try to redirect to "base_url/$htmlcode" which will obviously fail. Instead of fixing the js code, reintroduce do_paste and use it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/views')
-rw-r--r--application/views/file/upload_form.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
index ce1d00498..3ab70eb62 100644
--- a/application/views/file/upload_form.php
+++ b/application/views/file/upload_form.php
@@ -6,18 +6,15 @@
<input type="submit" value="Upload" id="upload_button" name="process" />
</p>
</form>
+ <p><b>OR</b></p>
+ <?php echo form_open_multipart('file/do_paste'); ?>
+ <p>
+ <textarea id="textarea" name="content" cols="80" rows="20"></textarea><br />
+ <input type="submit" value="Paste" name="process" />
+ </p>
+ </form>
<script type="text/javascript">
/* <![CDATA[ */
-document.write('\
- <p><b>OR</b></p>\
- <form action="javascript: do_paste()">\
- <p>\
- <textarea id="textarea" name="content" cols="80" rows="20"></textarea><br />\
- <input type="submit" value="Paste" name="process" />\
- </p>\
- </form>\
-');
- var upload_url = "<?php echo site_url("file/do_upload/dumb"); ?>";
var max_upload_size = "<?php echo $max_upload_size; ?>";
/* ]]> */
</script>