Changed create pool bulk action to default to the currently searched strings

This commit is contained in:
matthew 2019-07-04 22:37:00 -05:00 committed by Shish
parent 4116bda066
commit dbfa995ba5
2 changed files with 3 additions and 3 deletions

View file

@ -416,7 +416,7 @@ class Pools extends Extension
$event->add_action("bulk_pool_add_existing", "Add To (P)ool", "p","", $this->theme->get_bulk_pool_selector($pools));
$event->add_action("bulk_pool_add_new", "Create Pool", "","", $this->theme->get_bulk_pool_input());
$event->add_action("bulk_pool_add_new", "Create Pool", "","", $this->theme->get_bulk_pool_input($event->search_terms));
}
public function onBulkAction(BulkActionEvent $event)

View file

@ -399,8 +399,8 @@ class PoolsTheme extends Themelet
return $output . "</select>";
}
public function get_bulk_pool_input()
public function get_bulk_pool_input(array $search_terms)
{
return "<input type='text' name='bulk_pool_new' placeholder='New pool' required='required' />";
return "<input type='text' name='bulk_pool_new' placeholder='New pool' required='required' value='".(implode(" ",$search_terms))."' />";
}
}