Skip to content

Commit

Permalink
Allow packet editor to remove all used by items
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Jul 21, 2021
1 parent 2d70fc2 commit f6a5288
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/Packet/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ public function &run(Router &$router, View &$view, array &$args)
self::assignDefault($model->form_fields, 'research', $model->packet->isInResearch());
self::assignDefault($model->form_fields, 'markdown', $model->packet->isMarkdown());
self::assignDefault($model->form_fields, 'published', $model->packet->isPublished());
self::assignDefault($model->form_fields, 'used_by', Product::getProductsFromIds($model->packet->getUsedBy()));

if ($router->getRequestMethod() == 'GET')
{
self::assignDefault($model->form_fields, 'used_by', Product::getProductsFromIds($model->packet->getUsedBy()));
}

if ($router->getRequestMethod() == 'POST')
{
Expand Down

0 comments on commit f6a5288

Please sign in to comment.