no make_link for forms
This commit is contained in:
parent
55b697c198
commit
c2231432f3
16 changed files with 22 additions and 22 deletions
|
@ -934,7 +934,7 @@ function SHM_USER_FORM(User $duser, string $target, string $title, $body, $foot)
|
|||
$foot = TFOOT(TR(TD(["colspan"=>"2"], INPUT(["type"=>"submit", "value"=>$foot]))));
|
||||
}
|
||||
return SHM_SIMPLE_FORM(
|
||||
make_link($target),
|
||||
$target,
|
||||
P(
|
||||
INPUT(["type"=>'hidden', "name"=>'id', "value"=>$duser->id]),
|
||||
TABLE(
|
||||
|
|
|
@ -45,7 +45,7 @@ class AdminPageTheme extends Themelet
|
|||
$page->add_block(new Block("Misc Admin Tools", $html));
|
||||
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
make_link("admin/set_tag_case"),
|
||||
"admin/set_tag_case",
|
||||
INPUT(["type"=>'text', "name"=>'tag', "placeholder"=>'Enter tag with correct case', "class"=>'autocomplete_tags', "autocomplete"=>'off']),
|
||||
SHM_SUBMIT('Set Tag Case'),
|
||||
);
|
||||
|
|
|
@ -9,13 +9,13 @@ class ApprovalTheme extends Themelet
|
|||
{
|
||||
if ($image->approved===true) {
|
||||
$html = SHM_SIMPLE_FORM(
|
||||
make_link('disapprove_image/'.$image->id),
|
||||
'disapprove_image/'.$image->id,
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image->id]),
|
||||
SHM_SUBMIT("Disapprove")
|
||||
);
|
||||
} else {
|
||||
$html = SHM_SIMPLE_FORM(
|
||||
make_link('approve_image/'.$image->id),
|
||||
'approve_image/'.$image->id,
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image->id]),
|
||||
SHM_SUBMIT("Approve")
|
||||
);
|
||||
|
@ -51,7 +51,7 @@ class ApprovalTheme extends Themelet
|
|||
global $page;
|
||||
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
make_link("admin/approval"),
|
||||
"admin/approval",
|
||||
BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Images"),
|
||||
BR(),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Images"),
|
||||
|
|
|
@ -18,7 +18,7 @@ class BlocksTheme extends Themelet
|
|||
$html = TABLE(["class"=>"form", "style"=>"width: 100%;"]);
|
||||
foreach ($blocks as $block) {
|
||||
$html->appendChild(SHM_SIMPLE_FORM(
|
||||
make_link("blocks/update"),
|
||||
"blocks/update",
|
||||
TR(
|
||||
INPUT(["type"=>"hidden", "name"=>"id", "value"=>$block['id']]),
|
||||
TH("Title"),
|
||||
|
@ -43,7 +43,7 @@ class BlocksTheme extends Themelet
|
|||
}
|
||||
|
||||
$html->appendChild(SHM_SIMPLE_FORM(
|
||||
make_link("blocks/add"),
|
||||
"blocks/add",
|
||||
TR(
|
||||
TH("Title"),
|
||||
TD(INPUT(["type"=>"text", "name"=>"title", "value"=>""])),
|
||||
|
|
|
@ -27,7 +27,7 @@ class ExtManagerTheme extends Themelet
|
|||
$tbody = TBODY();
|
||||
|
||||
$form = SHM_SIMPLE_FORM(
|
||||
make_link("ext_manager/set"),
|
||||
"ext_manager/set",
|
||||
TABLE(
|
||||
["id"=>'extensions', "class"=>'zebra sortable'],
|
||||
THEAD(TR(
|
||||
|
|
|
@ -8,7 +8,7 @@ class FavoritesTheme extends Themelet
|
|||
$name = $is_favorited ? "unset" : "set";
|
||||
$label = $is_favorited ? "Un-Favorite" : "Favorite";
|
||||
return SHM_SIMPLE_FORM(
|
||||
make_link("change_favorite"),
|
||||
"change_favorite",
|
||||
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image->id]),
|
||||
INPUT(["type"=>"hidden", "name"=>"favorite_action", "value"=>$name]),
|
||||
INPUT(["type"=>"submit", "value"=>$label]),
|
||||
|
|
|
@ -11,7 +11,7 @@ class FeaturedTheme extends Themelet
|
|||
public function get_buttons_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("featured_image/set"),
|
||||
"featured_image/set",
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
INPUT(["type"=>'submit', "value"=>'Feature This']),
|
||||
);
|
||||
|
|
|
@ -10,7 +10,7 @@ class ImageIOTheme extends Themelet
|
|||
public function get_deleter_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("image/delete"),
|
||||
"image/delete",
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
INPUT(["type"=>'submit', "value"=>'Delete', "onclick"=>'return confirm("Delete the image?");']),
|
||||
);
|
||||
|
@ -22,7 +22,7 @@ class ImageIOTheme extends Themelet
|
|||
public function get_replace_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("image/replace"),
|
||||
"image/replace",
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
INPUT(["type"=>'submit', "value"=>'Replace']),
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@ class ImageBanTheme extends Themelet
|
|||
public function get_buttons_html(Image $image)
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("image_hash_ban/add"),
|
||||
"image_hash_ban/add",
|
||||
INPUT(["type"=>'hidden', "name"=>'c_hash', "value"=>$image->hash]),
|
||||
INPUT(["type"=>'hidden', "name"=>'c_image_id', "value"=>$image->id]),
|
||||
INPUT(["type"=>'text', "name"=>'c_reason']),
|
||||
|
|
|
@ -20,7 +20,7 @@ class MediaTheme extends Themelet
|
|||
}
|
||||
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
make_link("admin/media_rescan"),
|
||||
"admin/media_rescan",
|
||||
"Use this to force scanning for media properties.",
|
||||
TABLE(
|
||||
["class"=>"form"],
|
||||
|
@ -34,7 +34,7 @@ class MediaTheme extends Themelet
|
|||
public function get_buttons_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("media_rescan/"),
|
||||
"media_rescan/",
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
SHM_SUBMIT('Scan Media Properties'),
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ class RegenThumbTheme extends Themelet
|
|||
public function get_buttons_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link("regen_thumb/one"),
|
||||
"regen_thumb/one",
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
SHM_SUBMIT('Regenerate Thumbnail')
|
||||
);
|
||||
|
|
|
@ -91,7 +91,7 @@ class ReportImageTheme extends Themelet
|
|||
{
|
||||
global $page;
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
make_link("image_report/remove_reports_by"),
|
||||
"image_report/remove_reports_by",
|
||||
INPUT(["type"=>'hidden', "name"=>'user_id', "value"=>$duser->id]),
|
||||
SHM_SUBMIT('Delete all reports by this user')
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@ class RotateImageTheme extends Themelet
|
|||
public function get_rotate_html(int $image_id): string
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link('rotate/'.$image_id),
|
||||
'rotate/'.$image_id,
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
INPUT(["type"=>'number', "name"=>'rotate_deg', "id"=>"rotate_deg", "placeholder"=>"Rotation degrees"]),
|
||||
INPUT(["type"=>'submit', "value"=>'Rotate', "id"=>"rotatebutton"]),
|
||||
|
|
|
@ -9,7 +9,7 @@ class Rule34Theme extends Themelet
|
|||
{
|
||||
global $page;
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
make_link("rule34/comic_admin"),
|
||||
"rule34/comic_admin",
|
||||
INPUT(["type"=>'hidden', "name"=>'user_id', "value"=>$duser->id]),
|
||||
LABEL(INPUT(["type"=>'checkbox', "name"=>'is_admin', "checked"=>$current_state]), "Comic Admin"),
|
||||
BR(),
|
||||
|
|
|
@ -6,7 +6,7 @@ class TrashTheme extends Themelet
|
|||
public function get_image_admin_html(int $image_id)
|
||||
{
|
||||
return (string)SHM_SIMPLE_FORM(
|
||||
make_link('trash_restore/'.$image_id),
|
||||
'trash_restore/'.$image_id,
|
||||
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
|
||||
INPUT(["type"=>'submit', "value"=>'Restore From Trash']),
|
||||
);
|
||||
|
|
|
@ -64,7 +64,7 @@ class UserPageTheme extends Themelet
|
|||
}
|
||||
|
||||
$form = SHM_SIMPLE_FORM(
|
||||
make_link("user_admin/create"),
|
||||
"user_admin/create",
|
||||
TABLE(
|
||||
["class"=>"form"],
|
||||
TBODY(
|
||||
|
@ -120,7 +120,7 @@ class UserPageTheme extends Themelet
|
|||
{
|
||||
global $config, $user;
|
||||
$form = SHM_SIMPLE_FORM(
|
||||
make_link("user_admin/login"),
|
||||
"user_admin/login",
|
||||
TABLE(
|
||||
["style"=>"width: 100%", "class"=>"form"],
|
||||
TBODY(
|
||||
|
|
Reference in a new issue