<commit_before>{% extends '::ojsbase.html.twig' %}

{% block breadcrumb %}
    {% set list = [
    {'link': path('dashboard'), 'title': 'dashboard'|trans},
    { 'link': path('user'), 'title': 'user.manager'|trans},
    { 'title': 'user.new'|trans},

    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    {% stylesheets '@upload_css' output="c/upload.css" filter="cssrewrite" %}
    <link rel="stylesheet" href="{{ asset_url }}"/>
    {% endstylesheets %}

{% endblock %}


{% block body -%}
    <div class="large-12 columns">
        <div class="panel">
            <h1>{{ "user.new"|trans }}</h1>

            <div class="record_actions">
                {{ form_start(form, { 'attr': { 'enctype' :'multipart/form-data'} }) }}
                {% for label, flashes in app.session.flashbag.all %}
                    {% for flash in flashes %}
                        <div class="alert alert-{{ label }}">
                            {{ flash }}
                        </div>
                    {% endfor %}
                {% endfor %}

                {{ form_errors(form) }}
                {{ form_widget(form) }}

                <div class="form-group">
                    <label class="control-label" for="fileupload_avatar">{{ "Avatar"|trans }}</label>
                    <div id="preview_image_avatar"  style="width:200px">
                        {% if entity.avatar %}
                            <img src="{{ ('/uploads/avatarfiles/'~imagePath(entity.avatar))|imagine_filter("wide_200")}}"
                                 data-src="holder.js/960x200/random/text:{{entity.username}}" alt="" />
                            {% set imageoptions=getImageOptions(entity,'avatar',"wide_200") %}
                            <input id="avatar_height" name="avatar[height]" type="hidden" value="{{ imageoptions.height }}"/>
                            <input id="avatar_width"  name="avatar[width]" type="hidden" value="{{ imageoptions.width }}"/>
                            <input id="avatar_x"  name="avatar[x]" type="hidden" value="{{ imageoptions.x }}"/>
                            <input id="avatar_y"  name="avatar[y]" type="hidden" value="{{ imageoptions.y }}"/>
                        {% endif %}

                    </div>
    <span class="btn btn-success fileinput-button form-control">
                <i class="fa fa-plus"></i>
                <span>{{ "select.image.file"|trans }}</span>
                <input id="fileupload_avatar" type="file" data-url="{{ oneup_uploader_endpoint('avatarfiles') }}">
            </span>

                    <div id="user_avatar_upload_progress" style="display: none" class="label label-info">

                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label" for="fileupload">{{ "Header Image"|trans }}</label>

    <span class="btn btn-success fileinput-button form-control">
                <i class="fa fa-plus"></i>
                <span>{{ "select.image.file"|trans }}</span>
                <input id="fileupload" type="file" data-url="{{ oneup_uploader_endpoint('userfiles') }}">
            </span>

                    <div id="user_header_upload_progress" style="display: none" class="label label-info">

                    </div>
                </div>
                <button type="submit" id="ojs_userbundle_user_submit" class="btn btn-primary">
                    {{ "c"|trans }}<commit_msg>no header image in user page<commit_after>{% extends '::ojsbase.html.twig' %}

{% block breadcrumb %}
    {% set list = [
    {'link': path('dashboard'), 'title': 'dashboard'|trans},
    { 'link': path('user'), 'title': 'user.manager'|trans},
    { 'title': 'user.new'|trans},

    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    {% stylesheets '@upload_css' output="c/upload.css" filter="cssrewrite" %}
    <link rel="stylesheet" href="{{ asset_url }}"/>
    {% endstylesheets %}

{% endblock %}


{% block body -%}
    <div class="large-12 columns">
        <div class="panel">
            <h1>{{ "user.new"|trans }}</h1>

            <div class="record_actions">
                {{ form_start(form, { 'attr': { 'enctype' :'multipart/form-data'} }) }}
                {% for label, flashes in app.session.flashbag.all %}
                    {% for flash in flashes %}
                        <div class="alert alert-{{ label }}">
                            {{ flash }}
                        </div>
                    {% endfor %}
                {% endfor %}

                {{ form_errors(form) }}
                {{ form_widget(form) }}

                <div class="form-group">
                    <label class="control-label" for="fileupload_avatar">{{ "Avatar"|trans }}</label>
                    <div id="preview_image_avatar"  style="width:200px">
                        {% if entity.avatar %}
                            <img src="{{ ('/uploads/avatarfiles/'~imagePath(entity.avatar))|imagine_filter("wide_200")}}"
                                 data-src="holder.js/960x200/random/text:{{entity.username}}" alt="" />
                            {% set imageoptions=getImageOptions(entity,'avatar',"wide_200") %}
                            <input id="avatar_height" name="avatar[height]" type="hidden" value="{{ imageoptions.height }}"/>
                            <input id="avatar_width"  name="avatar[width]" type="hidden" value="{{ imageoptions.width }}"/>
                            <input id="avatar_x"  name="avatar[x]" type="hidden" value="{{ imageoptions.x }}"/>
                            <input id="avatar_y"  name="avatar[y]" type="hidden" value="{{ imageoptions.y }}"/>
                        {% endif %}

                    </div>
    <span class="btn btn-success fileinput-button form-control">
                <i class="fa fa-plus"></i>
                <span>{{ "select.image.file"|trans }}</span>
                <input id="fileupload_avatar" type="file" data-url="{{ oneup_uploader_endpoint('avatarfiles') }}">
            </span>

                    <div id="user_avatar_upload_progress" style="display: none" class="label label-info">

                    </div>
                </div>
                <button type="submit" id="ojs_userbundle_user_submit" class="btn btn-primary">
                    {{ "c"|trans }}
{'fraction_non_alphanumeric': 0.17508206972018134, 'fraction_numerical': 0.005940284508363296, 'mean_word_length': 1.817261118450022, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 74, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1085559', 'n_tokens_mistral': 1937, 'n_tokens_neox': 1746, 'n_words': 324}