upload microhtml
This commit is contained in:
parent
5f771c0138
commit
217a36a8c5
@ -2,23 +2,38 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use MicroHTML\HTMLElement;
|
||||||
|
use function MicroHTML\TABLE;
|
||||||
|
use function MicroHTML\TR;
|
||||||
|
use function MicroHTML\TD;
|
||||||
|
use function MicroHTML\SMALL;
|
||||||
|
use function MicroHTML\rawHTML;
|
||||||
|
use function MicroHTML\INPUT;
|
||||||
|
use function MicroHTML\emptyHTML;
|
||||||
|
use function MicroHTML\NOSCRIPT;
|
||||||
|
use function MicroHTML\DIV;
|
||||||
|
use function MicroHTML\BR;
|
||||||
|
use function MicroHTML\A;
|
||||||
|
|
||||||
|
use function MicroHTML\P;
|
||||||
|
|
||||||
class UploadTheme extends Themelet
|
class UploadTheme extends Themelet
|
||||||
{
|
{
|
||||||
protected bool $has_errors = false;
|
protected bool $has_errors = false;
|
||||||
|
|
||||||
public function display_block(Page $page)
|
public function display_block(Page $page): void
|
||||||
{
|
{
|
||||||
$b = new Block("Upload", $this->build_upload_block(), "left", 20);
|
$b = new Block("Upload", (string)$this->build_upload_block(), "left", 20);
|
||||||
$b->is_content = false;
|
$b->is_content = false;
|
||||||
$page->add_block($b);
|
$page->add_block($b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_full(Page $page)
|
public function display_full(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "left", 20));
|
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "left", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
global $config, $page;
|
global $config, $page;
|
||||||
|
|
||||||
@ -26,75 +41,69 @@ class UploadTheme extends Themelet
|
|||||||
$max_size = $config->get_int(UploadConfig::SIZE);
|
$max_size = $config->get_int(UploadConfig::SIZE);
|
||||||
$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();
|
||||||
$html = "
|
|
||||||
".make_form(make_link("upload"), "POST", $multipart=true, 'file_upload')."
|
$form = SHM_FORM(make_link("upload"), "POST", true, "file_upload");
|
||||||
<table id='large_upload_form' class='vert'>
|
$form->appendChild(
|
||||||
<tr><td width='20'>Common Tags<td colspan='5'><input name='tags' type='text' placeholder='tagme' class='autocomplete_tags' autocomplete='off'></td></tr>
|
TABLE(
|
||||||
<tr><td>Common Source</td><td colspan='5'><input name='source' type='text'></td></tr>
|
["id"=>"large_upload_form", "class"=>"vert"],
|
||||||
$upload_list
|
TR(
|
||||||
<tr><td colspan='6'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
TD(["width"=>"20"], rawHTML("Common Tags")),
|
||||||
</table>
|
TD(["colspan"=>"5"], INPUT(["name"=>"tags", "type"=>"text", "placeholder"=>"tagme", "class"=>"autocomplete_tags", "autocomplete"=>"off"]))
|
||||||
</form>
|
),
|
||||||
<small>(Max file size is $max_kb)</small>
|
TR(
|
||||||
";
|
TD(["width"=>"20"], rawHTML("Common Source")),
|
||||||
|
TD(["colspan"=>"5"], INPUT(["name"=>"source", "type"=>"text"]))
|
||||||
|
),
|
||||||
|
$upload_list,
|
||||||
|
TR(
|
||||||
|
TD(["colspan"=>"6"], INPUT(["id"=>"uploadbutton", "type"=>"submit", "value"=>"Post"]))
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$html = emptyHTML(
|
||||||
|
$form,
|
||||||
|
SMALL("(Max file size is $max_kb)")
|
||||||
|
);
|
||||||
|
|
||||||
$page->set_title("Upload");
|
$page->set_title("Upload");
|
||||||
$page->set_heading("Upload");
|
$page->set_heading("Upload");
|
||||||
$page->add_block(new NavBlock());
|
$page->add_block(new NavBlock());
|
||||||
$page->add_block(new Block("Upload", $html, "main", 20));
|
$page->add_block(new Block("Upload", (string)$html, "main", 20));
|
||||||
if ($tl_enabled) {
|
if ($tl_enabled) {
|
||||||
$page->add_block(new Block("Bookmarklets", $this->h_bookmarklets(), "left", 20));
|
$page->add_block(new Block("Bookmarklets", (string)$this->h_bookmarklets(), "left", 20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function h_upload_list_1(): string
|
protected function h_upload_list_1(): HTMLElement
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$upload_list = "";
|
$upload_list = emptyHTML();
|
||||||
$upload_count = $config->get_int(UploadConfig::COUNT);
|
$upload_count = $config->get_int(UploadConfig::COUNT);
|
||||||
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
||||||
$accept = $this->get_accept();
|
$accept = $this->get_accept();
|
||||||
|
|
||||||
if ($tl_enabled) {
|
$upload_list->appendChild(
|
||||||
$upload_list .= "
|
TR(
|
||||||
<tr>
|
TD(["colspan"=>$tl_enabled ? 2 : 4], "Files"),
|
||||||
<td colspan='2'>Files</td>
|
$tl_enabled ? TD(["colspan"=>"2"], "URLs") : emptyHTML(),
|
||||||
<td colspan='2'>URLs</td>
|
TD(["colspan"=>"2"], "Post-Specific Tags"),
|
||||||
<td colspan='2'>Post-Specific Tags</td>
|
)
|
||||||
</tr>
|
);
|
||||||
";
|
|
||||||
|
|
||||||
for ($i=0; $i<$upload_count; $i++) {
|
for ($i=0; $i<$upload_count; $i++) {
|
||||||
$upload_list .= "
|
$upload_list->appendChild(
|
||||||
<tr>
|
TR(
|
||||||
<td colspan='2'><input type='file' name='data${i}[]' accept='$accept' multiple></td>
|
TD(["colspan"=>$tl_enabled ? 2 : 4], INPUT(["type"=>"file", "name"=>"data${i}[]", "accept"=>$accept, "multiple"=>true])),
|
||||||
<td colspan='2'><input type='text' name='url$i'></td>
|
$tl_enabled ? TD(["colspan"=>"2"], INPUT(["type"=>"text", "name"=>"url${i}"])) : emptyHTML(),
|
||||||
<td colspan='2'><input type='text' name='tags$i' class='autocomplete_tags' autocomplete='off'></td>
|
TD(["colspan"=>"2"], INPUT(["type"=>"text", "name"=>"tags${i}", "class"=>"autocomplete_tags", "autocomplete"=>"off"])),
|
||||||
</tr>
|
)
|
||||||
";
|
);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$upload_list .= "
|
|
||||||
<tr>
|
|
||||||
<td colspan='4'>Files</td>
|
|
||||||
<td colspan='2'>Post-Specific Tags</td>
|
|
||||||
</tr>
|
|
||||||
";
|
|
||||||
|
|
||||||
for ($i=0; $i<$upload_count; $i++) {
|
|
||||||
$upload_list .= "
|
|
||||||
<tr>
|
|
||||||
<td colspan='4'><input type='file' name='data${i}[]' accept='$accept' multiple></td>
|
|
||||||
<td colspan='2'><input type='text' name='tags$i' class='autocomplete_tags' autocomplete='off'></td>
|
|
||||||
</tr>
|
|
||||||
";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $upload_list;
|
return $upload_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function h_bookmarklets(): string
|
protected function h_bookmarklets(): HTMLElement
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$link = make_http(make_link("upload"));
|
$link = make_http(make_link("upload"));
|
||||||
@ -103,45 +112,51 @@ class UploadTheme extends Themelet
|
|||||||
$max_size = $config->get_int(UploadConfig::SIZE);
|
$max_size = $config->get_int(UploadConfig::SIZE);
|
||||||
$max_kb = to_shorthand_int($max_size);
|
$max_kb = to_shorthand_int($max_size);
|
||||||
$delimiter = $config->get_bool('nice_urls') ? '?' : '&';
|
$delimiter = $config->get_bool('nice_urls') ? '?' : '&';
|
||||||
$html = '';
|
|
||||||
|
|
||||||
$js='javascript:(
|
$js='javascript:(
|
||||||
function() {
|
function() {
|
||||||
if(typeof window=="undefined" || !window.location || window.location.href=="about:blank") {
|
if(typeof window=="undefined" || !window.location || window.location.href=="about:blank") {
|
||||||
window.location = "'. $main_page .'";
|
window.location = "'. $main_page .'";
|
||||||
}
|
}
|
||||||
else if(typeof document=="undefined" || !document.body) {
|
else if(typeof document=="undefined" || !document.body) {
|
||||||
window.location = "'. $main_page .'?url="+encodeURIComponent(window.location.href);
|
window.location = "'. $main_page .'?url="+encodeURIComponent(window.location.href);
|
||||||
}
|
}
|
||||||
else if(window.location.href.match("\/\/'. $_SERVER["HTTP_HOST"] .'.*")) {
|
else if(window.location.href.match("\/\/'. $_SERVER["HTTP_HOST"] .'.*")) {
|
||||||
alert("You are already at '. $title .'!");
|
alert("You are already at '. $title .'!");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var tags = prompt("Please enter tags", "tagme");
|
var tags = prompt("Please enter tags", "tagme");
|
||||||
if(tags != "" && tags != null) {
|
if(tags != "" && tags != null) {
|
||||||
var link = "'. $link . $delimiter .'url="+location.href+"&tags="+tags;
|
var link = "'. $link . $delimiter .'url="+location.href+"&tags="+tags;
|
||||||
var w = window.open(link, "_blank");
|
var w = window.open(link, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)();';
|
)();';
|
||||||
$html .= '<a href=\''.$js.'\'>Upload to '.$title.'</a>';
|
$html1 = P(
|
||||||
$html .= ' (Drag & drop onto your bookmarks toolbar, then click when looking at a post)';
|
A(["href"=>$js], "Upload to $title"),
|
||||||
|
rawHTML(' (Drag & drop onto your bookmarks toolbar, then click when looking at a post)')
|
||||||
|
);
|
||||||
|
|
||||||
// Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported.
|
// Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported.
|
||||||
$supported_ext = join(" ", DataHandlerExtension::get_all_supported_exts());
|
$supported_ext = join(" ", DataHandlerExtension::get_all_supported_exts());
|
||||||
|
|
||||||
$title = "Booru to " . $config->get_string(SetupConfig::TITLE);
|
$title = "Booru to " . $config->get_string(SetupConfig::TITLE);
|
||||||
// CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags
|
// CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags
|
||||||
$html .= '<p><a href="javascript:
|
$js = '
|
||||||
var ste="'. $link . $delimiter .'url=";
|
javascript:
|
||||||
var supext="'.$supported_ext.'";
|
var ste="'. $link . $delimiter .'url=";
|
||||||
var maxsize="'.$max_kb.'";
|
var supext="'.$supported_ext.'";
|
||||||
var CA=0;
|
var maxsize="'.$max_kb.'";
|
||||||
void(document.body.appendChild(document.createElement("script")).src="'.make_http(get_base_href())."/ext/upload/bookmarklet.js".'")
|
var CA=0;
|
||||||
">'. $title . '</a> (Click when looking at a post page. Works on sites running Shimmie / Danbooru / Gelbooru. (This also grabs the tags / rating / source!))';
|
void(document.body.appendChild(document.createElement("script")).src="'.make_http(get_base_href())."/ext/upload/bookmarklet.js".'")
|
||||||
|
';
|
||||||
|
$html2 = P(
|
||||||
|
A(["href"=>$js], $title),
|
||||||
|
rawHTML("(Click when looking at a post page. Works on sites running Shimmie / Danbooru / Gelbooru. (This also grabs the tags / rating / source!))"),
|
||||||
|
);
|
||||||
|
|
||||||
return $html;
|
return emptyHTML($html1, $html2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,19 +168,19 @@ class UploadTheme extends Themelet
|
|||||||
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
$tl_enabled = ($config->get_string(UploadConfig::TRANSLOAD_ENGINE, "none") != "none");
|
||||||
$accept = $this->get_accept();
|
$accept = $this->get_accept();
|
||||||
|
|
||||||
$upload_list = "
|
$upload_list = emptyHTML(
|
||||||
<tr>
|
TR(
|
||||||
<td>File</td>
|
TD("File"),
|
||||||
<td><input name='data[]' type='file' accept='$accept'></td>
|
TD(INPUT(["name"=>"data[]", "type"=>"file", "accept"=>$accept]))
|
||||||
</tr>
|
)
|
||||||
";
|
);
|
||||||
if ($tl_enabled) {
|
if ($tl_enabled) {
|
||||||
$upload_list .="
|
$upload_list->appendChild(
|
||||||
<tr>
|
TR(
|
||||||
<td>or URL</td>
|
TD("or URL"),
|
||||||
<td><input name='url' type='text'></td>
|
TD(INPUT(["name"=>"url", "type"=>"text"]))
|
||||||
</tr>
|
)
|
||||||
";
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_size = $config->get_int(UploadConfig::SIZE);
|
$max_size = $config->get_int(UploadConfig::SIZE);
|
||||||
@ -174,27 +189,36 @@ 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);
|
||||||
|
|
||||||
$html = "
|
$form = SHM_FORM(make_link("upload/replace/".$image_id), "POST", true);
|
||||||
<p>Replacing Post ID ".$image_id."<br>Please note: You will have to refresh the post page, or empty your browser cache.</p>"
|
$form->appendChild(emptyHTML(
|
||||||
.$thumbnail."<br>"
|
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]),
|
||||||
.make_form(make_link("upload/replace/".$image_id), "POST", $multipart=true)."
|
TABLE(
|
||||||
<input type='hidden' name='image_id' value='$image_id'>
|
["id"=>"large_upload_form", "class"=>"vert"],
|
||||||
<table id='large_upload_form' class='vert'>
|
$upload_list,
|
||||||
$upload_list
|
TR(TD("Source"), TD(["colspan"=>3], INPUT(["name"=>"source", "type"=>"text"]))),
|
||||||
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
TR(TD(["colspan"=>4], INPUT(["id"=>"uploadbutton", "type"=>"submit", "value"=>"Post"]))),
|
||||||
<tr><td colspan='4'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
)
|
||||||
</table>
|
));
|
||||||
</form>
|
|
||||||
<small>(Max file size is $max_kb)</small>
|
$html = emptyHTML(
|
||||||
";
|
P(
|
||||||
|
"Replacing Post ID $image_id",
|
||||||
|
BR(),
|
||||||
|
"Please note: You will have to refresh the post page, or empty your browser cache."
|
||||||
|
),
|
||||||
|
$thumbnail,
|
||||||
|
BR(),
|
||||||
|
$form,
|
||||||
|
SMALL("(Max file size is $max_kb)"),
|
||||||
|
);
|
||||||
|
|
||||||
$page->set_title("Replace Post");
|
$page->set_title("Replace Post");
|
||||||
$page->set_heading("Replace Post");
|
$page->set_heading("Replace Post");
|
||||||
$page->add_block(new NavBlock());
|
$page->add_block(new NavBlock());
|
||||||
$page->add_block(new Block("Upload Replacement Post", $html, "main", 20));
|
$page->add_block(new Block("Upload Replacement Post", (string)$html, "main", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_upload_status(Page $page, array $image_ids)
|
public function display_upload_status(Page $page, array $image_ids): void
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
@ -217,7 +241,7 @@ class UploadTheme extends Themelet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_upload_error(Page $page, string $title, string $message)
|
public function display_upload_error(Page $page, string $title, string $message): void
|
||||||
{
|
{
|
||||||
// this message has intentional HTML in it...
|
// this message has intentional HTML in it...
|
||||||
$message = str_contains($message, "already has hash") ? $message : html_escape($message);
|
$message = str_contains($message, "already has hash") ? $message : html_escape($message);
|
||||||
@ -225,7 +249,7 @@ class UploadTheme extends Themelet
|
|||||||
$this->has_errors = true;
|
$this->has_errors = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function build_upload_block(): string
|
protected function build_upload_block(): HTMLElement
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -235,17 +259,21 @@ 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' />
|
||||||
return "
|
$form = SHM_FORM(make_link("upload"), "POST", true);
|
||||||
<div class='mini_upload'>
|
$form->appendChild(
|
||||||
".make_form(make_link("upload"), "POST", $multipart=true)."
|
emptyHTML(
|
||||||
<input id='data[]' name='data[]' size='16' type='file' accept='$accept' multiple>
|
INPUT(["id"=>"data[]", "name"=>"data[]", "size"=>"16", "type"=>"file", "accept"=>$accept, "multiple"=>true]),
|
||||||
<input name='tags' type='text' placeholder='tagme' class='autocomplete_tags' required='required' autocomplete='off'>
|
INPUT(["name"=>"tags", "type"=>"text", "placeholder"=>"tagme", "class"=>"autocomplete_tags", "required"=>true, "autocomplete"=>"off"]),
|
||||||
<input type='submit' value='Post'>
|
INPUT(["type"=>"submit", "value"=>"Post"]),
|
||||||
</form>
|
)
|
||||||
<small>(Max file size is $max_kb)</small>
|
);
|
||||||
<noscript><br><a href='".make_link("upload")."'>Larger Form</a></noscript>
|
|
||||||
</div>
|
return DIV(
|
||||||
";
|
["class"=>'mini_upload'],
|
||||||
|
$form,
|
||||||
|
SMALL("(Max file size is $max_kb)"),
|
||||||
|
NOSCRIPT(BR(), A(["href"=>make_link("upload")], "Larger Form"))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function get_accept(): string
|
protected function get_accept(): string
|
||||||
|
@ -4,13 +4,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
class CustomUploadTheme extends UploadTheme
|
class CustomUploadTheme extends UploadTheme
|
||||||
{
|
{
|
||||||
public function display_block(Page $page)
|
public function display_block(Page $page): void
|
||||||
{
|
{
|
||||||
// this theme links to /upload
|
// this theme links to /upload
|
||||||
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_page($page);
|
parent::display_page($page);
|
||||||
|
@ -4,13 +4,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
class CustomUploadTheme extends UploadTheme
|
class CustomUploadTheme extends UploadTheme
|
||||||
{
|
{
|
||||||
public function display_block(Page $page)
|
public function display_block(Page $page): void
|
||||||
{
|
{
|
||||||
// this theme links to /upload
|
// this theme links to /upload
|
||||||
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
$page->disable_left();
|
$page->disable_left();
|
||||||
parent::display_page($page);
|
parent::display_page($page);
|
||||||
|
@ -1,19 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use MicroHTML\HTMLElement;
|
||||||
|
use function MicroHTML\A;
|
||||||
|
|
||||||
class CustomUploadTheme extends UploadTheme
|
class CustomUploadTheme extends UploadTheme
|
||||||
{
|
{
|
||||||
public function display_block(Page $page)
|
public function display_block(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Upload", $this->build_upload_block(), "head", 20));
|
$page->add_block(new Block("Upload", $this->build_upload_block(), "head", 20));
|
||||||
$page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
$page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_full(Page $page)
|
public function display_full(Page $page): void
|
||||||
{
|
{
|
||||||
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "head", 20));
|
$page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "head", 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_page(Page $page)
|
public function display_page(Page $page): void
|
||||||
{
|
{
|
||||||
parent::display_page($page);
|
parent::display_page($page);
|
||||||
$html = "
|
$html = "
|
||||||
@ -22,9 +25,8 @@ class CustomUploadTheme extends UploadTheme
|
|||||||
$page->add_block(new Block(null, $html, "main", 19));
|
$page->add_block(new Block(null, $html, "main", 19));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function build_upload_block(): string
|
protected function build_upload_block(): HTMLElement
|
||||||
{
|
{
|
||||||
$url = make_link("upload");
|
return A(["href"=>make_link("upload"), "style"=>'font-size: 2em; display: block;'], "Upload");
|
||||||
return "<a href='$url' style='font-size: 2em; display: block;'>Upload</a>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user