<commit_before><!DOCTYPE html>
<html>
<head>
    <title>New article</title>
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruiantwitterbootstrap/css/bootstrapv2.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruiantwitterbootstrap/css/bootstrapv2-responsive.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruianuploadify/js/swfobject.js') }}">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="offset2 span8">
                
                {% include 'RuianTwitterBootstrapBundle:Alert:bootstrap_v2.html.twig' %}

                {% form_theme form_view 'RuianTwitterBootstrapBundle:Form:bootstrap_v2.html.twig' %}
                <form novalidate class="form-horizontal well" method="post" action="{{ path('JgalenskiDemoBundle_new') }}">
                    <div class="control-group">
                    {{ form_label(form_view.picture_tmp) }}
                    <div class="controls">
                        {{ form_widget(form_view.picture_tmp.file, {'attr' : {'data-path' : path('JgalenskiDemoBundle_upload'), 'data-folder' : '/uploads/article/picture/'}})}}
                    </div>
                    </div>

                    {{ form_widget(form_view) }}
                    <div id="avatar-preview">
                    </div>
                    <div class="well">
                        <input type="submit" value="Save" class="btn" />
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="{{ asset('bundles/jgalenskidemo/js/jquery.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruiantwitterbootstrap/js/bootstrapv2.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruianuploadify/js/swfobject.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruianuploadify/js/jquery.uploadify.v2.1.4.js') }}"></script>
    <script type="text/javascript">
    $('#jgalenski_demobundle_articletype_picture_tmp_file').uploadify({
        'uploader'  : '/bundles/ruianuploadify/swf/uploadify.swf',
        'script'    : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-path'),
        'folder'    : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-folder'),
        'scriptData'   : {
            '_uploadify' : true,
            '_session' : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-session'),
        },
        'cancelImg' : '/bundles/ruianuploadify/images/cancel.png',
        'auto'      : true,
        'onComplete'  : function(event, ID, fileObj, response, data) {
            response = jQuery.parseJSON(response);
            $('#avatar-preview').html("<img src='"+response.folder+response.file+"' />");
            $('#jgalenski_demobundle_articletype_picture_file').attr('val', response.folder+response.file);<commit_msg>Add uploadify example [ci skip]<commit_after><!DOCTYPE html>
<html>
<head>
    <title>New article</title>
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruiantwitterbootstrap/css/bootstrapv2.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruiantwitterbootstrap/css/bootstrapv2-responsive.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('bundles/ruianuploadify/js/swfobject.js') }}">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="offset2 span8">
                
                {% include 'RuianTwitterBootstrapBundle:Alert:bootstrap_v2.html.twig' %}

                {% form_theme form_view 'RuianTwitterBootstrapBundle:Form:bootstrap_v2.html.twig' %}
                <form novalidate class="form-horizontal well" method="post" action="{{ path('JgalenskiDemoBundle_new') }}">
                    <div class="control-group">
                    {{ form_label(form_view.picture_tmp) }}
                    <div class="controls">
                        {{ form_widget(form_view.picture_tmp.file, {'attr' : {'data-path' : path('JgalenskiDemoBundle_upload'), 'data-folder' : '/uploads/article/picture/'}})}}
                    </div>
                    </div>

                    {{ form_widget(form_view) }}
                    <div id="avatar-preview">

                    </div>
                    <div class="well">
                        <input type="submit" value="Save" class="btn" />
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="{{ asset('bundles/jgalenskidemo/js/jquery.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruiantwitterbootstrap/js/bootstrapv2.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruianuploadify/js/swfobject.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/ruianuploadify/js/jquery.uploadify.v2.1.4.js') }}"></script>
    <script type="text/javascript">
    $('#jgalenski_demobundle_articletype_picture_tmp_file').uploadify({
        'uploader'  : '/bundles/ruianuploadify/swf/uploadify.swf',
        'script'    : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-path'),
        'folder'    : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-folder'),
        'scriptData'   : {
            '_uploadify' : true,
            '_session' : $('#jgalenski_demobundle_articletype_picture_tmp_file').attr('data-session'),
        },
        'cancelImg' : '/bundles/ruianuploadify/images/cancel.png',
        'auto'      : true,
        'onComplete'  : function(event, ID, fileObj, response, data) {
            response = jQuery.parseJSON(response);
            $('#avatar-preview').html("<img src='"+response.folder+response.file+"' />");
            $('#jgalenski_demobundle_articletype_picture').attr('val', response.folder+response.file);
{'fraction_non_alphanumeric': 0.17061769616026712, 'fraction_numerical': 0.00333889816360601, 'mean_word_length': 2.702719406674907, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, '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': '677174', 'n_tokens_mistral': 1858, 'n_tokens_neox': 1774, 'n_words': 243}