Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
fix empty bookings
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Jun 4, 2018
1 parent c68de15 commit f4cf469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Action/BookingPlanAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function generate(IsotopeProduct $product, array $config = [])
*/
public function handleSubmit(IsotopeProduct $product, array $config = [])
{
if (!isset($_POST[$this->getName()])) {
if (empty($_POST[$this->getName()])) {
Message::addError(System::getContainer()->get('translator')->trans('huh.isotope.collection.booking.error.emptySelection'));

return false;
}

Expand Down
1 change: 1 addition & 0 deletions src/Resources/translations/messages.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ huh:
booking:
error:
overbooked: 'Der gewünschte Zeitraum für das Produkt %product% kann leider nicht mehr gebucht werden, da es keine freien Kapazitäten mehr gibt.'
emptySelection: 'Es wurden keine Buchungsdaten ausgewählt.'

0 comments on commit f4cf469

Please sign in to comment.