[upload] upload form is a form

This commit is contained in:
Shish 2024-01-08 20:41:03 +00:00
parent 8237a22029
commit e564646dd8
3 changed files with 16 additions and 16 deletions

View file

@ -13,8 +13,10 @@ TD>BUTTON, TD>SPAN>BUTTON {width: 100%;}
TABLE.form {width: 300px;} TABLE.form {width: 300px;}
TABLE.form TD, TABLE.form TH {vertical-align: middle;} TABLE.form TD, TABLE.form TH {vertical-align: middle;}
TABLE.form TBODY TD {text-align: left;} TABLE.form TBODY TR TD {text-align: left;}
TABLE.form TBODY TH {text-align: right; padding-right: 4px; width: 1%; white-space: nowrap;} TABLE.form TBODY TR TH {text-align: right; padding-right: 4px; width: 1%; white-space: nowrap;}
TABLE.form TBODY TR.header TD,
TABLE.form TBODY TR.header TH {text-align: center; width: auto;}
TABLE.form TD + TH {padding-left: 8px;} TABLE.form TD + TH {padding-left: 8px;}
*[onclick], *[onclick],

View file

@ -1,6 +1,5 @@
#large_upload_form TD, TABLE#large_upload_form.form {
#large_upload_form TH { width: 100%;
vertical-align: middle;
} }
.mini_upload INPUT { .mini_upload INPUT {

View file

@ -6,9 +6,7 @@ namespace Shimmie2;
use MicroHTML\HTMLElement; use MicroHTML\HTMLElement;
use function MicroHTML\TABLE; use function MicroHTML\{TABLE,TR,TH,TD};
use function MicroHTML\TR;
use function MicroHTML\TD;
use function MicroHTML\SMALL; use function MicroHTML\SMALL;
use function MicroHTML\rawHTML; use function MicroHTML\rawHTML;
use function MicroHTML\INPUT; use function MicroHTML\INPUT;
@ -49,13 +47,13 @@ class UploadTheme extends Themelet
$form = SHM_FORM("upload", "POST", true, "file_upload"); $form = SHM_FORM("upload", "POST", true, "file_upload");
$form->appendChild( $form->appendChild(
TABLE( TABLE(
["id" => "large_upload_form"], ["id" => "large_upload_form", "class"=>"form"],
TR( TR(
TD(["width" => "20"], rawHTML("Common Tags")), TH(["width" => "20"], "Common Tags"),
TD(["colspan" => "6"], INPUT(["name" => "tags", "type" => "text", "placeholder" => "tagme", "class" => "autocomplete_tags"])) TD(["colspan" => "6"], INPUT(["name" => "tags", "type" => "text", "placeholder" => "tagme", "class" => "autocomplete_tags"]))
), ),
TR( TR(
TD(["width" => "20"], rawHTML("Common Source")), TH(["width" => "20"], "Common Source"),
TD(["colspan" => "6"], INPUT(["name" => "source", "type" => "text", "placeholder" => "https://..."])) TD(["colspan" => "6"], INPUT(["name" => "source", "type" => "text", "placeholder" => "https://..."]))
), ),
$upload_list, $upload_list,
@ -100,10 +98,11 @@ class UploadTheme extends Themelet
$upload_list->appendChild( $upload_list->appendChild(
TR( TR(
TD(["colspan" => 2], "Select File"), ["class" => "header"],
TD($tl_enabled ? "or URL" : null), TH(["colspan" => 2], "Select File"),
TD("Post-Specific Tags"), TH($tl_enabled ? "or URL" : null),
TD("Post-Specific Source"), TH("Post-Specific Tags"),
TH("Post-Specific Source"),
) )
); );
@ -243,7 +242,7 @@ class UploadTheme extends Themelet
$form = SHM_FORM("replace/".$image_id, "POST", true); $form = SHM_FORM("replace/".$image_id, "POST", true);
$form->appendChild(emptyHTML( $form->appendChild(emptyHTML(
TABLE( TABLE(
["id" => "large_upload_form"], ["id" => "large_upload_form", "class"=>"form"],
$upload_list, $upload_list,
TR(TD("Source"), TD(["colspan" => 3], INPUT(["name" => "source", "type" => "text"]))), TR(TD("Source"), TD(["colspan" => 3], INPUT(["name" => "source", "type" => "text"]))),
TR(TD(["colspan" => 4], INPUT(["id" => "uploadbutton", "type" => "submit", "value" => "Post"]))), TR(TD(["colspan" => 4], INPUT(["id" => "uploadbutton", "type" => "submit", "value" => "Post"]))),