<commit_before>{% extends "BprsStyleBundle::layout.html.twig" %}

{% block nav_head%}
    {% include 'BprsStyleBundle::menu.html.twig' with {'selected': 'oktolab_media', 'dropdown': ''} %}
{% endblock %}

{% block body_main %}
    <div class="page-header">
        <h1>{{ 'oktolab_media.new_episode_header'|trans }}</h1>
        <a href="{{ path('oktolab_series_show', {'series': form.vars.value.series.uniqID}) }}" class="btn btn-default">{{ 'okto_media.new_episode_for_series_cancel'|trans|raw }}</a>
    </div>

    {{ form_start(form) }}
        {{ form_errors(form) }}
        {{ form_row(form.name) }}
        {{ form_row(form.description) }}
        {% include "BprsAssetBundle::singleUpload.html.twig" with {'widget': form.video, 'adapter': 'video'} %}
        {% include "BprsAssetBundle::singleUpload.html.twig" with {'widget': form.posterframe, 'adapter': 'posterframe'} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.firstRanAt} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.onlineStart} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.onlineEnd} %}
        {% include "OktoMediaBundle::Tag/widget.html.twig" with {'widget': form.tags} %}
    {{ form_end(form) }}

{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script src="{{ asset('bundles/bprsstyle/js/moment/moment.min.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/moment/de.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/datetimepicker.min.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/typeahead.js') }}"></script>
    <script type="text/javascript">
        $(document).ready( function(){
            $('#oktolab_mediabundle_series_episode_onlineStart_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_onlineStart_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $('#oktolab_mediabundle_series_episode_onlineEnd_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_onlineEnd_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $('#oktolab_mediabundle_series_episode_firstRanAt_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_firstRanAt_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $(".character500").characterCounter({
                counterCssClass: 'help-block',
                limit: 600
            });

            // tags
            var addInput = function(list, text) {
                var tag = "<span class='label label-default remove'>"+text+"</span>";
                tag = $(tag);
                prototype = list.attr('data-prototype');
                var length = list.find(':input').length;
                prototype = prototype.replace(/__name__/g, length);
                prototype = $(prototype);
                prototype.attr({value: text, type: 'hidden'});
                tag.append(prototype);
                list.append(tag);
            };

            var tags = new Bloodhound({
                datumTokenizer: Bloodhound.tokenizers.whitespace,
                queryTokenizer: Bloodhound.tokenizers.whitespace,
                prefetch:   $('.tag-input').attr('data-url')
            });

            $('.tag-input').typeahead(null, {
                name: 'tags',
                source: tags
            }).bind('typeahead:select', function(ev, suggestion) {
                var list = $(this).parents('.form-group').children('.tags');
                addInput(list, suggestion);
                $('.tag-input').typeahead('val', '');
            });

            $('.tag-input').keydown(function(e){
                if(e.keyCode == 13) {
                    e.preventDefault();
                    var list = $(this).parents('.form-group').children('.tags');
                    var text = $(this).val();
                    addInput(list, text);
                    $('.tag-input').typeahead('val', '');
                }
            });
            // end tags
        });
        $(document).on('click', '.remove', function(e){
            $(this).remove();
        });
    </script>
    {% include "BprsAssetBundle::singleUpload.js.twig" %}
    <script src="{{ asset('bundles/bprsstyle/js/charactercounter.js')}}"></script>
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link href="{{ asset('bundles/bprsstyle/css/datetimepicker.min.css') }}" rel="stylesheet" />
    {% include "BprsAssetBundle::singleUpload.css.twig" %}
{% endblock %}
<commit_msg>fixed adapter config for new series episodes<commit_after>{% extends "BprsStyleBundle::layout.html.twig" %}

{% block nav_head%}
    {% include 'BprsStyleBundle::menu.html.twig' with {'selected': 'oktolab_media', 'dropdown': ''} %}
{% endblock %}

{% block body_main %}
    <div class="page-header">
        <h1>{{ 'oktolab_media.new_episode_header'|trans }}</h1>
        <a href="{{ path('oktolab_series_show', {'series': form.vars.value.series.uniqID}) }}" class="btn btn-default">{{ 'okto_media.new_episode_for_series_cancel'|trans|raw }}</a>
    </div>

    {{ form_start(form) }}
        {{ form_errors(form) }}
        {{ form_row(form.name) }}
        {{ form_row(form.description) }}
        {% include "BprsAssetBundle::singleUpload.html.twig" with {'widget': form.video, 'adapter': 'cache'} %}
        {% include "BprsAssetBundle::singleUpload.html.twig" with {'widget': form.posterframe, 'adapter': 'posterframe'} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.firstRanAt} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.onlineStart} %}
        {% include "BprsStyleBundle::datetimepicker.html.twig" with {'widget': form.onlineEnd} %}
        {% include "OktoMediaBundle::Tag/widget.html.twig" with {'widget': form.tags} %}
    {{ form_end(form) }}

{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script src="{{ asset('bundles/bprsstyle/js/moment/moment.min.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/moment/de.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/datetimepicker.min.js') }}"></script>
    <script src="{{ asset('bundles/bprsstyle/js/typeahead.js') }}"></script>
    <script type="text/javascript">
        $(document).ready( function(){
            $('#oktolab_mediabundle_series_episode_onlineStart_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_onlineStart_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $('#oktolab_mediabundle_series_episode_onlineEnd_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_onlineEnd_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $('#oktolab_mediabundle_series_episode_firstRanAt_picker').datetimepicker({
                locale: 'de',
                // format: "DD.MM.YYYY hh:mm",
                date: moment($('#oktolab_mediabundle_series_episode_firstRanAt_picker').children(':input').val()),
                useCurrent: true,
                calendarWeeks: true,
                allowInputToggle: true,
                showTodayButton: true
            });

            $(".character500").characterCounter({
                counterCssClass: 'help-block',
                limit: 600
            });

            // tags
            var addInput = function(list, text) {
                var tag = "<span class='label label-default remove'>"+text+"</span>";
                tag = $(tag);
                prototype = list.attr('data-prototype');
                var length = list.find(':input').length;
                prototype = prototype.replace(/__name__/g, length);
                prototype = $(prototype);
                prototype.attr({value: text, type: 'hidden'});
                tag.append(prototype);
                list.append(tag);
            };

            var tags = new Bloodhound({
                datumTokenizer: Bloodhound.tokenizers.whitespace,
                queryTokenizer: Bloodhound.tokenizers.whitespace,
                prefetch:   $('.tag-input').attr('data-url')
            });

            $('.tag-input').typeahead(null, {
                name: 'tags',
                source: tags
            }).bind('typeahead:select', function(ev, suggestion) {
                var list = $(this).parents('.form-group').children('.tags');
                addInput(list, suggestion);
                $('.tag-input').typeahead('val', '');
            });

            $('.tag-input').keydown(function(e){
                if(e.keyCode == 13) {
                    e.preventDefault();
                    var list = $(this).parents('.form-group').children('.tags');
                    var text = $(this).val();
                    addInput(list, text);
                    $('.tag-input').typeahead('val', '');
                }
            });
            // end tags
        });
        $(document).on('click', '.remove', function(e){
            $(this).remove();
        });
    </script>
    {% include "BprsAssetBundle::singleUpload.js.twig" %}
    <script src="{{ asset('bundles/bprsstyle/js/charactercounter.js')}}"></script>
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link href="{{ asset('bundles/bprsstyle/css/datetimepicker.min.css') }}" rel="stylesheet" />
    {% include "BprsAssetBundle::singleUpload.css.twig" %}
{% endblock %}

{'fraction_non_alphanumeric': 0.16743054905995697, 'fraction_numerical': 0.0018707323917313628, 'mean_word_length': 2.156775907883082, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3006324', 'n_tokens_mistral': 3229, 'n_tokens_neox': 3002, 'n_words': 474}