9e7f3cb397
Rather than having a boolean for view or edit + optional editor, use the existence of the editor to know if a field is editable
21 lines
433 B
PHP
21 lines
433 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shimmie2;
|
|
|
|
use MicroHTML\HTMLElement;
|
|
|
|
use function MicroHTML\{INPUT};
|
|
|
|
class PostTitlesTheme extends Themelet
|
|
{
|
|
public function get_title_set_html(string $title, bool $can_set): HTMLElement
|
|
{
|
|
return SHM_POST_INFO(
|
|
"Title",
|
|
$title,
|
|
$can_set ? INPUT(["type" => "text", "name" => "post_title", "value" => $title]) : null
|
|
);
|
|
}
|
|
}
|