<commit_before>{% extends "project/base.html" %}
{% set page_title = _("Edit DESCRIPTION.en_us.html") %}

{% block body %}
<h5>{{ project.clone }} <a class="pull-right" href="{{ url_for('project.bump', project_id = project.id )}}" data-confirm="Are you sure you want to pull from the upstream git repository?"><button class="btn btn-small" type="button"><i class="icon-chevron-up"></i> Pull from upstream</button></a></h5>
<h2>{{ page_title }}</h2>

{% from 'project/macros.html' import nav with context%}
{{ nav('description') }}

<form class="form-horizontal" action="{{ url_for('project.description_save', project_id = project.id)}}" method="POST">

<div id="editor"></div>
<textarea name="description">{{ description }}</textarea>

<div>
<button type="submit" class="btn">Submit</button>
</div>
</form>

{% endblock %}


{% block extrajs %}

    <script src="{{ url_for('static', filename='ace/ace-builds-master/src-noconflict/ace.js') }}" type="text/javascript" charset="utf-8"></script>
    <script>
        var editor = ace.edit("editor");
        editor.setTheme("ace/theme/solarized_light");
        editor.getSession().setMode("ace/mode/html");

        // var textarea = $('textarea[name="metadata"]');
        var textarea = $('textarea[name="description"]').hide();
        editor.getSession().setUseWrapMode(true);
        editor.getSession().setValue(textarea.val());
        editor.getSession().on('change', function(){
          textarea.val(editor.getSession().getValue());
        });

    </script>


</div>
{% endblock %}
<commit_msg>Place description save button on right<commit_after>{% extends "project/base.html" %}
{% set page_title = _("Edit DESCRIPTION.en_us.html") %}

{% block body %}
<h5>{{ project.clone }} <a class="pull-right" href="{{ url_for('project.bump', project_id = project.id )}}" data-confirm="Are you sure you want to pull from the upstream git repository?"><button class="btn btn-small" type="button"><i class="icon-chevron-up"></i> Pull from upstream</button></a></h5>
<h2>{{ page_title }}</h2>

{% from 'project/macros.html' import nav with context%}
{{ nav('description') }}

<form class="form-horizontal" action="{{ url_for('project.description_save', project_id = project.id)}}" method="POST">

<div id="editor"></div>
<textarea name="description">{{ description }}</textarea>

<div>
<p style="margin-top:0.5em"><button type="submit" class="btn btn-primary pull-right">Save</button></p>
</div>
</form>

{% endblock %}


{% block extrajs %}

    <script src="{{ url_for('static', filename='ace/ace-builds-master/src-noconflict/ace.js') }}" type="text/javascript" charset="utf-8"></script>
    <script>
        var editor = ace.edit("editor");
        editor.setTheme("ace/theme/solarized_light");
        editor.getSession().setMode("ace/mode/html");

        // var textarea = $('textarea[name="metadata"]');
        var textarea = $('textarea[name="description"]').hide();
        editor.getSession().setUseWrapMode(true);
        editor.getSession().setValue(textarea.val());
        editor.getSession().on('change', function(){
          textarea.val(editor.getSession().getValue());
        });

    </script>


</div>
{% endblock %}

{'fraction_non_alphanumeric': 0.20859473023839398, 'fraction_numerical': 0.0037641154328732747, 'mean_word_length': 4.4419795221843, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '5924465', 'n_tokens_mistral': 1042, 'n_tokens_neox': 975, 'n_words': 196}