deluge/deluge/ui/webui/templates/classic/torrent_add.html
2008-07-11 19:22:52 +00:00

57 lines
1.3 KiB
HTML

$def with (add_form, options_form, error)
$:render.header(_("Add Torrent"))
<div class="panel">
<h2>$_("Add Torrent")</h2>
<form method="POST" action="$base/torrent/add" ENCTYPE="multipart/form-data">
<input type="hidden" name="redir" value="$get('redir')">
$if error:
<div class="error">$error</div>
<div id="torrent_add" >
<table>
$:add_form.as_table()
</table>
<a onclick="javascript:toggle_options()">$_('Options')</a>
<!--todo: cookie setting for last-used options display or not-->
<br>
<div id="torrent_add_options" style="display:none">
<table>
$:options_form.as_table()
</table>
</div>
<div class="form_row">
<span class="form_label"></span>
<input type="submit" name="submit"
value="$_('Submit')" class="form_input">
</div>
</form>
</div>
<script language="javascript">
function toggle_options(){
el = document.getElementById("torrent_add_options");
if (el.style.display == "block"){
el.style.display = "none";
setCookie("torrent_add_options","hide");
}
else{
el.style.display = "block";
setCookie("torrent_add_options","show");
}
}
if (getCookie("torrent_add_options") == "show") {
el = document.getElementById("torrent_add_options");
el.style.display = "block";
}
</script>
$:render.footer()