mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
implement status code 11 route
This commit is contained in:
parent
176f14e36e
commit
dca454cf50
@ -190,6 +190,7 @@ class Content
|
||||
switch ($response->getCode())
|
||||
{
|
||||
case 10: // response expected
|
||||
case 11: // sensitive input
|
||||
|
||||
$this->page->title->setValue(
|
||||
$address->getHost(),
|
||||
@ -202,7 +203,8 @@ class Content
|
||||
);
|
||||
|
||||
$this->page->response->show(
|
||||
$response->getMeta() // pass to placeholder
|
||||
$response->getMeta(), // placeholder
|
||||
boolval(10 === $response->getCode()) // input visibility
|
||||
);
|
||||
|
||||
break;
|
||||
|
@ -80,16 +80,24 @@ class Response
|
||||
}
|
||||
|
||||
public function show(
|
||||
?string $placeholder = null
|
||||
?string $placeholder = null,
|
||||
?bool $visible = null
|
||||
): void
|
||||
{
|
||||
if ($placeholder)
|
||||
if (!is_null($placeholder))
|
||||
{
|
||||
$this->query->setPlaceholder(
|
||||
$placeholder
|
||||
);
|
||||
}
|
||||
|
||||
if (!is_null($visible))
|
||||
{
|
||||
$this->query->setVisible(
|
||||
$visible
|
||||
);
|
||||
}
|
||||
|
||||
$this->gtk->show();
|
||||
}
|
||||
|
||||
@ -99,6 +107,10 @@ class Response
|
||||
null
|
||||
);
|
||||
|
||||
$this->query->setVisible(
|
||||
null
|
||||
);
|
||||
|
||||
$this->gtk->hide();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user