[PLUGIN] Removing unnecessary labels

This commit is contained in:
rainydaysavings 2020-09-04 19:20:06 +01:00 committed by Hugo Sales
parent 0649095e88
commit ff9b5d9c01
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 4 additions and 5 deletions

View File

@ -22,7 +22,6 @@ namespace Plugin\Favourite;
use App\Core\DB\DB; use App\Core\DB\DB;
use App\Core\Event; use App\Core\Event;
use App\Core\Form; use App\Core\Form;
use function App\Core\I18n\_m;
use App\Core\Module; use App\Core\Module;
use App\Entity\Favourite as Fave; use App\Entity\Favourite as Fave;
use App\Entity\Note; use App\Entity\Note;
@ -40,7 +39,7 @@ class Favourite extends Module
$form = Form::create([ $form = Form::create([
['is_set', HiddenType::class, ['data' => $is_set ? '1' : '0']], ['is_set', HiddenType::class, ['data' => $is_set ? '1' : '0']],
['note_id', HiddenType::class, ['data' => $note->getId()]], ['note_id', HiddenType::class, ['data' => $note->getId()]],
['favourite', SubmitType::class, ['label' => _m('Favourite')]], ['favourite', SubmitType::class, ['label' => ' ']],
]); ]);
$form->handleRequest($request); $form->handleRequest($request);
@ -63,7 +62,7 @@ class Favourite extends Module
} }
} }
$actions[] = $form->createView(); $actions['post_fav'] = $form->createView();
return Event::next; return Event::next;
} }
} }

View File

@ -37,7 +37,7 @@ class Repeat extends Module
$form = Form::create([ $form = Form::create([
['is_set', HiddenType::class, ['data' => $is_set ? '1' : '0']], ['is_set', HiddenType::class, ['data' => $is_set ? '1' : '0']],
['note_id', HiddenType::class, ['data' => $note->getId()]], ['note_id', HiddenType::class, ['data' => $note->getId()]],
['repeat', SubmitType::class, ['label' => 'Repeat']], ['repeat', SubmitType::class, ['label' => ' ']],
]); ]);
$form->handleRequest($request); $form->handleRequest($request);
@ -59,7 +59,7 @@ class Repeat extends Module
} }
} }
$actions[] = $form->createView(); $actions['post_repeat'] = $form->createView();
return Event::next; return Event::next;
} }
} }