Skip to content

Commit

Permalink
Pretty formatting (and stub for auto-import)
Browse files Browse the repository at this point in the history
  • Loading branch information
nugget committed Feb 23, 2012
1 parent fc0864c commit 769a776
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions webroot/upload.rvt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,35 @@
require_login

if {![var exists csvdata]} {
puts {<form enctype="multipart/form-data" method="post">}
puts [head "Upload your LogCard.csv File"]

puts "<center>"

form myform -defaults response -method post -name chooser -action post -enctype "multipart/form-data"
myform start

puts "<table>"
puts "<tr><th colspan=\"2\">Upload Options</th></tr>"
puts "<tr><td colspan=\"2\">"
puts {<input type="file" name="csvdata" size="40" />}
puts {<input type="submit" value="Upload CSV" />}
puts {</form>}
puts "</td></tr>"

pg_select $::db "SELECT id FROM activities WHERE user_id = $::user(id) LIMIT 1" buf {
#puts "<tr><td>Auto-import (bypass chooser):</td><td>"
#myform checkbox moo
#puts "</td></tr>"
}

puts "<tr><td colspan=\"2\" align=\"center\" style=\"background-color: #dfdfdf;\">"
myform submit submit -value "Upload LogCard File"
puts "</td></tr>"

puts "</table>"
puts "</center>"

myform end
myform destroy

page_foot
page_term
}
Expand Down

0 comments on commit 769a776

Please sign in to comment.