Making the upload form look a bit nicer.
This commit is contained in:
parent
fbe0df29ed
commit
c125c4ba92
@ -1,4 +1,9 @@
|
|||||||
|
/* Only need to change the file/url inputs */
|
||||||
#large_upload_form INPUT {
|
#large_upload_form INPUT.wid {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
#radio_button {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
/* This is needed since the theme style.css forcibly sets vertical align to "top". */
|
||||||
|
TABLE.vert TD, TABLE.vert TH {vertical-align: middle;}
|
||||||
|
@ -12,22 +12,28 @@ class UploadTheme extends Themelet {
|
|||||||
public function display_page(Page $page) {
|
public function display_page(Page $page) {
|
||||||
global $config;
|
global $config;
|
||||||
$tl_enabled = ($config->get_string("transload_engine", "none") != "none");
|
$tl_enabled = ($config->get_string("transload_engine", "none") != "none");
|
||||||
|
|
||||||
|
// Uploader 2.0!
|
||||||
$upload_list = "";
|
$upload_list = "";
|
||||||
for($i=0; $i<$config->get_int('upload_count'); $i++) {
|
for($i=0; $i<$config->get_int('upload_count'); $i++) {
|
||||||
$n = $i + 1;
|
$n = $i + 1;
|
||||||
$width = $tl_enabled ? "35%" : "80%";
|
$width = $tl_enabled ? "35%" : "80%";
|
||||||
$upload_list .= "
|
$upload_list .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td width='50'>File $n</td>
|
<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url$i").style.display = "none";document.getElementById("url$i").value = "";document.getElementById("data$i").style.display = "inline"' /> File<br>";
|
||||||
<td width='250'><input id='data$i' name='data$i' type='file'></td>
|
if($tl_enabled) {
|
||||||
";
|
$upload_list .="
|
||||||
if($tl_enabled) {
|
<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data$i").style.display = "none";document.getElementById("data$i").value = "";document.getElementById("url$i").style.display = "inline"' /> URL</ br></td></form>
|
||||||
$upload_list .= "
|
|
||||||
<td width='50'>URL $n</td>
|
<td><input id='data$i' name='data$i' class='wid' type='file'><input id='url$i' name='url$i' class='wid' type='text' style='display:none'></td>
|
||||||
<td width='250'><input id='url$i' name='url$i' type='text'></td>
|
";
|
||||||
";
|
}
|
||||||
}
|
else {
|
||||||
|
$upload_list .= "</form></td>
|
||||||
|
<td width='250'><input id='data$i' name='data$i' class='wid' type='file'></td>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
$upload_list .= "
|
$upload_list .= "
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
@ -51,7 +57,7 @@ class UploadTheme extends Themelet {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
".make_form(make_link("upload"), "POST", $multipart=True)."
|
".make_form(make_link("upload"), "POST", $multipart=True)."
|
||||||
<table id='large_upload_form'>
|
<table id='large_upload_form' class='vert'>
|
||||||
$upload_list
|
$upload_list
|
||||||
<tr><td>Tags</td><td colspan='3'><input id='tag_box' name='tags' type='text'></td></tr>
|
<tr><td>Tags</td><td colspan='3'><input id='tag_box' name='tags' type='text'></td></tr>
|
||||||
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
||||||
@ -60,7 +66,7 @@ class UploadTheme extends Themelet {
|
|||||||
</form>
|
</form>
|
||||||
<small>(Max file size is $max_kb)</small>
|
<small>(Max file size is $max_kb)</small>
|
||||||
";
|
";
|
||||||
|
|
||||||
if($tl_enabled) {
|
if($tl_enabled) {
|
||||||
$link = make_http(make_link("upload"));
|
$link = make_http(make_link("upload"));
|
||||||
if($config->get_bool('nice_urls')){
|
if($config->get_bool('nice_urls')){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user