<br>
<form method="post" id="filescreenuploader" {{ form_enctype(context.form) }}>
    <fieldset>
        <p><strong>{{ __('general.phrase.upload-file-to-directory') }}</strong> {{ macro.typepopover() }}</p>
        {{ form_widget(context.form) }}
        <div>
            <button type="submit" class="btn btn-primary" disabled>
                <i class="fa fa-fw fa-upload"></i>
                <span>{{ __('general.phrase.upload-file') }}</span>
            </button>
        </div>
    </fieldset>
</form>

<script>
    $(function() {
        $('input[type=file]').addClass('btn-secondary').bootstrapFileInput();

        $('input:file').change(
            function(){
                if ($(this).val()) {
                    $('button:submit').removeAttr('disabled');
                }
            }
        );

    });

</script>

<br>
{{ form_start(context.form) }}
    <fieldset>
        <p><strong>{{ __('general.phrase.upload-file-to-directory') }}</strong> {{ macro.typepopover() }}</p>
        {{ form_widget(context.form) }}
        <div>
            <button type="submit" class="btn btn-primary" disabled>
                <i class="fa fa-fw fa-upload"></i>
                <span>{{ __('general.phrase.upload-file') }}</span>
            </button>
        </div>
    </fieldset>
{{ form_end(context.form) }}

<script>
    $(function() {
        $('input[type=file]').addClass('btn-secondary').bootstrapFileInput();

        $('input:file').change(
            function(){
                if ($(this).val()) {
                    $('button:submit').removeAttr('disabled');
                }
            }
        );

    });
</script>

Switch to {{ form_start() }}
Switch to {{ form_start() }}
