<commit_before>{% extends "/base.html" %}
{% set active_page = "projects" %}
{% import "projects/_helpers.html" as helper %}
{% from "admin/_helpers.html" import render_local_nav %}
{% import "_formhelpers.html" as form_helper %}
{% block content %}
<script src="{{url_for('static', filename='js/vendor/jquery.Jcrop.min.js')}}"></script>
<link rel="stylesheet" href="{{url_for('static', filename='css/jquery.Jcrop.min.css')}}" type="text/css" />
{{ render_local_nav(current_user, "tasks", project.short_name) }}
<div class="container-padded hidden-container" style="display:none;">
    <div class="container container-padded">
        <div class="row">
            <div class="col-sm-9 col-sm-offset-3">
                {% include "_flash_messages.html" %}
              <h1><strong>{{project.name}}</strong>: {{_('Project Details')}}</h1>
              <hr>
              <!-- Update form for project thumbnail -->
              <form method="post" class="form-horizontal upload-img-form padding-top-xs" action="{{ url_for('update_project.update', short_name=project.short_name) }}" enctype="multipart/form-data">
                  <fieldset>
                      <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
                        <div class="col-xs-12 text-center">
                            <div class="center-block img-overlay-container">
                                 {{ helper.render_project_thumbnail(project, upload_method, style="max-height:200px;", class="img-thumbnail") }}
                                <div class="img-overlay edit-profile-image">
                                        <i class="fa fa-pencil-square-o fa-3x"></i>
                                        <span>Edit</span>
                                </div>
                            </div>
                        </div>
                      {{ form_helper.render_field(upload_form.avatar, onchange="loadPreview()", class="form-control hidden") }}
                      {{ upload_form.x1 }}
                      {{ upload_form.y1 }}
                      {{ upload_form.x2 }}
                      {{ upload_form.y2 }}
                      <div id="modal" class="modal fade">
                        <div class="modal-dialog img-dialog">
                            <div class="modal-content">
                                <div class="modal-body">
                                    <img id="uploadPreview">
                                </div>
                                
                                <div class="modal-footer">
                                    <div class="form-actions text-center">
                                        <button type="submit" id="upload-btn" name='btn' value="Upload" class="btn btn-primary btn-lg" >{{ _('Upload') }}</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                  </fieldset>
              </form>
            {{ helper.render_loading("Loading, please wait...") }}
              <!-- Update form for project data-->
            <form class="visible-form" method="post" action="{{ url_for('update_project.update', short_name = project.short_name) }}" enctype="multipart/form-data">
              <fieldset>
                {{ form.hidden_tag() }}
                
                {{ form_helper.render_field(form.name, class="form-control", placeholder=_('Name'), visible='true', required="required", autofocus="autofocus") }}
                {{ form_helper.render_field(form.short_name, class="form-control", placeholder=_('Short name or slug for the project'), visible='true', label_text=_('Project slug:')) }}
                {{ form_helper.render_field(form.description, class="form-control", placeholder=_('Short description'), visible='true', required="required", pattern=".{0,255}", title="Must be a maximum of 255 characters") }}
                {{ form_helper.render_field(form.long_description, rows="13", placeholder=_('Long description:
                        
            Describe the purpose of the project and what it aims to achieve.
            Explain how the project works and how volunteers can help.
            Highlight the reasons why volunteer contributions are essential.
                        
You can use Markdown to format your description.'), class="form-control", required="required") }}
                {{ form_helper.render_field(form.category_id, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.allow_anonymous_contributors, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.password, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.webhook, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.flickr_link, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.image_set, class="form-control", visible='true') }}
                {{ form_helper.render_field_horizontal(form.hidden) }}
                <div role="group" class="pull-right">
                    <a href="{{url_for('project.tasks', short_name=project.short_name)}}" class="btn btn-default">{{_('Cancel')}}</a>
                  <button type="submit" name="btn" value="Save the changes" class="btn btn-danger">{{_('Save')}}</button>
                </div>
              </fieldset>
            </form>
          </div>
        </div>
    </div>
</div>
<script>
    $("i[rel='tooltip']").tooltip();
    $(function() {
        $('#flickr_link').attr('value', '{{project.info.flickr_link | safe}}');
    });
</script>
<script src="{{url_for('static', filename='js/image_crop.js')}}" type="text/javascript"></script>
{{ helper.broken_image() }}
{% endblock %}
<commit_msg>Accept .zip files for upload only<commit_after>{% extends "/base.html" %}
{% set active_page = "projects" %}
{% import "projects/_helpers.html" as helper %}
{% from "admin/_helpers.html" import render_local_nav %}
{% import "_formhelpers.html" as form_helper %}
{% block content %}
<script src="{{url_for('static', filename='js/vendor/jquery.Jcrop.min.js')}}"></script>
<link rel="stylesheet" href="{{url_for('static', filename='css/jquery.Jcrop.min.css')}}" type="text/css" />
{{ render_local_nav(current_user, "tasks", project.short_name) }}
<div class="container-padded hidden-container" style="display:none;">
    <div class="container container-padded">
        <div class="row">
            <div class="col-sm-9 col-sm-offset-3">
                {% include "_flash_messages.html" %}
              <h1><strong>{{project.name}}</strong>: {{_('Project Details')}}</h1>
              <hr>
              <!-- Update form for project thumbnail -->
              <form method="post" class="form-horizontal upload-img-form padding-top-xs" action="{{ url_for('update_project.update', short_name=project.short_name) }}" enctype="multipart/form-data">
                  <fieldset>
                      <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
                        <div class="col-xs-12 text-center">
                            <div class="center-block img-overlay-container">
                                 {{ helper.render_project_thumbnail(project, upload_method, style="max-height:200px;", class="img-thumbnail") }}
                                <div class="img-overlay edit-profile-image">
                                        <i class="fa fa-pencil-square-o fa-3x"></i>
                                        <span>Edit</span>
                                </div>
                            </div>
                        </div>
                      {{ form_helper.render_field(upload_form.avatar, onchange="loadPreview()", class="form-control hidden") }}
                      {{ upload_form.x1 }}
                      {{ upload_form.y1 }}
                      {{ upload_form.x2 }}
                      {{ upload_form.y2 }}
                      <div id="modal" class="modal fade">
                        <div class="modal-dialog img-dialog">
                            <div class="modal-content">
                                <div class="modal-body">
                                    <img id="uploadPreview">
                                </div>
                                
                                <div class="modal-footer">
                                    <div class="form-actions text-center">
                                        <button type="submit" id="upload-btn" name='btn' value="Upload" class="btn btn-primary btn-lg" >{{ _('Upload') }}</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                  </fieldset>
              </form>
            {{ helper.render_loading("Loading, please wait...") }}
              <!-- Update form for project data-->
            <form class="visible-form" method="post" action="{{ url_for('update_project.update', short_name = project.short_name) }}" enctype="multipart/form-data">
              <fieldset>
                {{ form.hidden_tag() }}
                
                {{ form_helper.render_field(form.name, class="form-control", placeholder=_('Name'), visible='true', required="required", autofocus="autofocus") }}
                {{ form_helper.render_field(form.short_name, class="form-control", placeholder=_('Short name or slug for the project'), visible='true', label_text=_('Project slug:')) }}
                {{ form_helper.render_field(form.description, class="form-control", placeholder=_('Short description'), visible='true', required="required", pattern=".{0,255}", title="Must be a maximum of 255 characters") }}
                {{ form_helper.render_field(form.long_description, rows="13", placeholder=_('Long description:
                        
            Describe the purpose of the project and what it aims to achieve.
            Explain how the project works and how volunteers can help.
            Highlight the reasons why volunteer contributions are essential.
                        
You can use Markdown to format your description.'), class="form-control", required="required") }}
                {{ form_helper.render_field(form.category_id, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.allow_anonymous_contributors, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.password, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.webhook, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.flickr_link, class="form-control", visible='true') }}
                {{ form_helper.render_field(form.image_set, class="form-control", visible='true',  accept=".zip") }}
                {{ form_helper.render_field_horizontal(form.hidden) }}
                <div role="group" class="pull-right">
                    <a href="{{url_for('project.tasks', short_name=project.short_name)}}" class="btn btn-default">{{_('Cancel')}}</a>
                  <button type="submit" name="btn" value="Save the changes" class="btn btn-danger">{{_('Save')}}</button>
                </div>
              </fieldset>
            </form>
          </div>
        </div>
    </div>
</div>
<script>
    $("i[rel='tooltip']").tooltip();
    $(function() {
        $('#flickr_link').attr('value', '{{project.info.flickr_link | safe}}');
    });
</script>
<script src="{{url_for('static', filename='js/image_crop.js')}}" type="text/javascript"></script>
{{ helper.broken_image() }}
{% endblock %}

{'fraction_non_alphanumeric': 0.1559012512681772, 'fraction_numerical': 0.0038890767669935745, 'mean_word_length': 1.9192991115498519, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '947093', 'n_tokens_mistral': 3145, 'n_tokens_neox': 2997, 'n_words': 572}