fmt
This commit is contained in:
parent
05a981d935
commit
4edf985a73
3 changed files with 19 additions and 13 deletions
|
@ -275,9 +275,13 @@ class Notes extends Extension
|
||||||
$database->execute("UPDATE images SET notes=(SELECT COUNT(*) FROM notes WHERE image_id=:id) WHERE id=:id", ['id' => $note['image_id']]);
|
$database->execute("UPDATE images SET notes=(SELECT COUNT(*) FROM notes WHERE image_id=:id) WHERE id=:id", ['id' => $note['image_id']]);
|
||||||
|
|
||||||
$this->add_history(
|
$this->add_history(
|
||||||
1, $noteID, $note['image_id'],
|
1,
|
||||||
$note['x1'], $note['y1'],
|
$noteID,
|
||||||
$note['height'], $note['width'],
|
$note['image_id'],
|
||||||
|
$note['x1'],
|
||||||
|
$note['y1'],
|
||||||
|
$note['height'],
|
||||||
|
$note['width'],
|
||||||
$note['note']
|
$note['note']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -5,36 +5,37 @@ declare(strict_types=1);
|
||||||
namespace Shimmie2;
|
namespace Shimmie2;
|
||||||
|
|
||||||
use MicroHTML\HTMLElement;
|
use MicroHTML\HTMLElement;
|
||||||
|
|
||||||
use function MicroHTML\INPUT;
|
use function MicroHTML\INPUT;
|
||||||
|
|
||||||
class NotesTheme extends Themelet
|
class NotesTheme extends Themelet
|
||||||
{
|
{
|
||||||
public function note_button(int $image_id): HTMLElement
|
public function note_button(int $image_id): HTMLElement
|
||||||
{
|
{
|
||||||
return SHM_SIMPLE_FORM("", INPUT(["type"=>"button", "value"=>"Add Note", "onclick"=>"addNewNote()"]));
|
return SHM_SIMPLE_FORM("", INPUT(["type" => "button", "value" => "Add Note", "onclick" => "addNewNote()"]));
|
||||||
}
|
}
|
||||||
public function request_button(int $image_id): HTMLElement
|
public function request_button(int $image_id): HTMLElement
|
||||||
{
|
{
|
||||||
return SHM_SIMPLE_FORM(
|
return SHM_SIMPLE_FORM(
|
||||||
"note/add_request",
|
"note/add_request",
|
||||||
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]),
|
INPUT(["type" => "hidden", "name" => "image_id", "value" => $image_id]),
|
||||||
INPUT(["type"=>"submit", "value"=>"Add Note Request"]),
|
INPUT(["type" => "submit", "value" => "Add Note Request"]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public function nuke_notes_button(int $image_id): HTMLElement
|
public function nuke_notes_button(int $image_id): HTMLElement
|
||||||
{
|
{
|
||||||
return SHM_SIMPLE_FORM(
|
return SHM_SIMPLE_FORM(
|
||||||
"note/nuke_notes",
|
"note/nuke_notes",
|
||||||
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]),
|
INPUT(["type" => "hidden", "name" => "image_id", "value" => $image_id]),
|
||||||
INPUT(["type"=>"submit", "value"=>"Nuke Notes", "onclick"=>"return confirm_action('Are you sure?')"]),
|
INPUT(["type" => "submit", "value" => "Nuke Notes", "onclick" => "return confirm_action('Are you sure?')"]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public function nuke_requests_button(int $image_id): HTMLElement
|
public function nuke_requests_button(int $image_id): HTMLElement
|
||||||
{
|
{
|
||||||
return SHM_SIMPLE_FORM(
|
return SHM_SIMPLE_FORM(
|
||||||
"note/nuke_requests",
|
"note/nuke_requests",
|
||||||
INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image_id]),
|
INPUT(["type" => "hidden", "name" => "image_id", "value" => $image_id]),
|
||||||
INPUT(["type"=>"submit", "value"=>"Nuke Requests", "onclick"=>"return confirm_action('Are you sure?')"]),
|
INPUT(["type" => "submit", "value" => "Nuke Requests", "onclick" => "return confirm_action('Are you sure?')"]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shimmie2;
|
namespace Shimmie2;
|
||||||
|
|
||||||
use MicroHTML\HTMLElement;
|
use MicroHTML\HTMLElement;
|
||||||
|
|
||||||
class ImageAdminBlockBuildingEvent extends Event
|
class ImageAdminBlockBuildingEvent extends Event
|
||||||
|
|
Reference in a new issue