forked from GNUsocial/gnu-social
[COMPONENT][Search] Make search title field not required
This commit is contained in:
parent
1e8eea0434
commit
4be226edd5
@ -59,7 +59,7 @@ class Search extends Component
|
||||
|
||||
if ($add_subscribe) {
|
||||
$form_definition[] = [
|
||||
'title', TextType::class, ['label' => _m('Title'), 'attr' => ['title' => _m('Title for this new feed in your left panel')]],
|
||||
'title', TextType::class, ['label' => _m('Title'), 'required' => false, 'attr' => ['title' => _m('Title for this new feed in your left panel')]],
|
||||
];
|
||||
$form_definition[] = [
|
||||
'subscribe_to_search',
|
||||
@ -96,6 +96,7 @@ class Search extends Component
|
||||
/** @var SubmitButton $subscribe */
|
||||
$subscribe = $form->get('subscribe_to_search');
|
||||
if ($subscribe->isClicked()) {
|
||||
// TODO ensure title is set
|
||||
Event::handle('AppendFeed', [$actor, $data['title'], 'search', ['q' => $data['search_query']]]);
|
||||
$redirect = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user