Fix uploader issue with SHM_FORM

This commit is contained in:
flatty 2021-12-17 23:40:55 -06:00 committed by Shish
parent 217a36a8c5
commit 9c05622d6e

View file

@ -42,7 +42,7 @@ class UploadTheme extends Themelet
$max_kb = to_shorthand_int($max_size); $max_kb = to_shorthand_int($max_size);
$upload_list = $this->h_upload_list_1(); $upload_list = $this->h_upload_list_1();
$form = SHM_FORM(make_link("upload"), "POST", true, "file_upload"); $form = SHM_FORM("upload", "POST", true, "file_upload");
$form->appendChild( $form->appendChild(
TABLE( TABLE(
["id"=>"large_upload_form", "class"=>"vert"], ["id"=>"large_upload_form", "class"=>"vert"],
@ -189,7 +189,7 @@ class UploadTheme extends Themelet
$image = Image::by_id($image_id); $image = Image::by_id($image_id);
$thumbnail = $this->build_thumb_html($image); $thumbnail = $this->build_thumb_html($image);
$form = SHM_FORM(make_link("upload/replace/".$image_id), "POST", true); $form = SHM_FORM("upload/replace/".$image_id, "POST", true);
$form->appendChild(emptyHTML( $form->appendChild(emptyHTML(
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]), INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]),
TABLE( TABLE(
@ -259,7 +259,7 @@ class UploadTheme extends Themelet
$max_kb = to_shorthand_int($max_size); $max_kb = to_shorthand_int($max_size);
// <input type='hidden' name='max_file_size' value='$max_size' /> // <input type='hidden' name='max_file_size' value='$max_size' />
$form = SHM_FORM(make_link("upload"), "POST", true); $form = SHM_FORM("upload", "POST", true);
$form->appendChild( $form->appendChild(
emptyHTML( emptyHTML(
INPUT(["id"=>"data[]", "name"=>"data[]", "size"=>"16", "type"=>"file", "accept"=>$accept, "multiple"=>true]), INPUT(["id"=>"data[]", "name"=>"data[]", "size"=>"16", "type"=>"file", "accept"=>$accept, "multiple"=>true]),