mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement status code 11 route
This commit is contained in:
parent
176f14e36e
commit
dca454cf50
2 changed files with 17 additions and 3 deletions
|
|
@ -190,6 +190,7 @@ class Content
|
||||||
switch ($response->getCode())
|
switch ($response->getCode())
|
||||||
{
|
{
|
||||||
case 10: // response expected
|
case 10: // response expected
|
||||||
|
case 11: // sensitive input
|
||||||
|
|
||||||
$this->page->title->setValue(
|
$this->page->title->setValue(
|
||||||
$address->getHost(),
|
$address->getHost(),
|
||||||
|
|
@ -202,7 +203,8 @@ class Content
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->page->response->show(
|
$this->page->response->show(
|
||||||
$response->getMeta() // pass to placeholder
|
$response->getMeta(), // placeholder
|
||||||
|
boolval(10 === $response->getCode()) // input visibility
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -80,16 +80,24 @@ class Response
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show(
|
public function show(
|
||||||
?string $placeholder = null
|
?string $placeholder = null,
|
||||||
|
?bool $visible = null
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
if ($placeholder)
|
if (!is_null($placeholder))
|
||||||
{
|
{
|
||||||
$this->query->setPlaceholder(
|
$this->query->setPlaceholder(
|
||||||
$placeholder
|
$placeholder
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_null($visible))
|
||||||
|
{
|
||||||
|
$this->query->setVisible(
|
||||||
|
$visible
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->gtk->show();
|
$this->gtk->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,6 +107,10 @@ class Response
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->query->setVisible(
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
$this->gtk->hide();
|
$this->gtk->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue