mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
validate request not empty to update
This commit is contained in:
parent
0f01ecde96
commit
ba8d528522
2 changed files with 13 additions and 1 deletions
|
|
@ -138,6 +138,13 @@ class Page
|
||||||
int $timeout = 15
|
int $timeout = 15
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
|
// Request entry should not be empty to update
|
||||||
|
if (empty($this->navbar->request->getValue()))
|
||||||
|
{
|
||||||
|
// return;
|
||||||
|
throw new \Exception;
|
||||||
|
}
|
||||||
|
|
||||||
// Update title
|
// Update title
|
||||||
$this->title->set(
|
$this->title->set(
|
||||||
_('Loading...')
|
_('Loading...')
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,13 @@ class Request extends Entry
|
||||||
\GtkEntry $entry
|
\GtkEntry $entry
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
|
if (empty($this->getValue()))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->navbar->page->open(
|
$this->navbar->page->open(
|
||||||
$entry->get_text()
|
$this->getValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->navbar->page->container->tab->update();
|
$this->navbar->page->container->tab->update();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue