<commit_before><form name="multiUploadForm">
    <div id="uploader">
        <p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
    </div>
</form>

<div id="browser-uploader-switcher">
    You are using the multi-file uploader. Problems? Try the <a href="{{ path('admin_institution_gallery_add', { 'institutionId': institution.id, 'multiUpload': 0}) }}">browser uploader</a> instead.
</div>

<style type="text/css">@import url({{ asset('bundles/media/js/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css') }});</style>
<script type="text/javascript" src="{{ asset('bundles/media/js/plupload/js/plupload.full.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/media/js/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js') }}"></script>
<script type="text/javascript">
$(function() {
    $("#uploader").plupload({
        runtimes : 'html5',
        url : '{{ path(routes.media_upload, {'institutionId': institution.id}) }}' + '?isLogo=false',
        max_file_size : '10mb',
        unique_names : true,
        filters : [
            {title : "Image files", extensions : "jpg,gif,png"},
            {title : "Zip files", extensions : "zip"},
            {title : "Pdf files", extensions : "pdf"},
            {title : "Video files", extensions : "avi,mov,flv"}
        ]
    });

    // Client side form validation
    $('form[name=multiUploadForm]').submit(function(e) {
        var uploader = $('#uploader').plupload('getUploader');

        // Files in queue upload them first
        if (uploader.files.length > 0) {
            // When all files are uploaded submit form
            uploader.bind('StateChanged', function() {
                if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
                    $(this).submit();
                }
            });

            uploader.start();
        } else
            alert('You must at least upload one file.');

        return false;
    });
});
</script><commit_msg>Fixes #59. Updated institution media upload.<commit_after><form name="multiUploadForm">
    <div id="uploader">
        <p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
    </div>
</form>

<div id="browser-uploader-switcher">
    You are using the multi-file uploader. Problems? Try the <a href="{{ path('admin_institution_gallery_add', { 'institutionId': institution.id, 'multiUpload': 0}) }}">browser uploader</a> instead.
</div>

<style type="text/css">@import url({{ asset('bundles/media/js/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css') }});</style>
<script type="text/javascript" src="{{ asset('bundles/media/js/plupload/js/plupload.full.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/media/js/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js') }}"></script>
<script type="text/javascript">
$(function() {
    $("#uploader").plupload({
        runtimes : 'html5',
        url : '{{ path(routes.media_upload, {'institutionId': institution.id}) }}' + '?isLogo=false',
        max_file_size : '10mb',
        unique_names : true,
        filters : [
            {title : "Image files", extensions : "jpg,gif,png"},
            {title : "Zip files", extensions : "zip"},
            {title : "Pdf files", extensions : "pdf"},
            {title : "Video files", extensions : "avi,mov,flv"}
        ]
    });

    // Client side form validation
    $('form[name=multiUploadForm]').submit(function(e) {
        var uploader = $('#uploader').plupload('getUploader');

        // Files in queue upload them first
        if (uploader.files.length > 0) {
            // When all files are uploaded submit form
            uploader.bind('StateChanged', function() {
                if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
                    $(this).submit();
                }
            });

            uploader.start();
        } else
            alert('You must at least upload one file.');

        return false;
    });

    $('#uploader_start').click(function(){
    	$('form[name=multiUploadForm]').submit();
    });
});
</script>
{'fraction_non_alphanumeric': 0.17668097281831188, 'fraction_numerical': 0.0033381020505484026, 'mean_word_length': 2.8171064604185623, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, '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': '4827524', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1247, 'n_words': 272}