{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {% extends ea.templatePath('layout') %} {% trans_default_domain ea.i18n.translationDomain %} {% block head_stylesheets %} {{parent()}} {% endblock %} {% block body_class 'page-content' %} {# deprecated 'The "page_title" block is deprecated, use "content_title" instead.' #} {% block page_title %} {% endblock %} {# deprecated 'The "page_content" block is deprecated, use "main" instead.' #} {% block page_content %} {% endblock %} {% block content_title %}{{ block('page_title') }}{% endblock %} {% block main %} {{form_start(form,{attr:{"data-turbo-frame":"target-shipment"}}) }}

Working with file-input

This example let's you select an image from your local filesystem. QuaggaJS then tries to decode the barcode using the preferred method (Code128 or EAN). There is no server interaction needed as the file is simply accessed through the File API.

This also works great on a wide range of mobile-phones where the camera access through getUserMedia is still very limited.

{{form_row(form.barcode) }} {{form_row(form.validate) }}

Scan elements

{{form_end(form,{attr:{"data-turbo-frame":"target-shipment"}}) }} {% endblock %} {% block body_javascript %} {{parent()}} {% endblock %}