<commit_before>{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block extrascript %}
<!-- bootstrap-select -->
<script src="/static/node_modules/bootstrap-select/js/bootstrap-select.js"></script>
<script type="text/javascript">
    function slugify(e) {
        return e.toString().toLowerCase().replace(/\s+/g, "-").replace(/\-\-+/g, "-").replace(/\./g, "-").replace(/^-+/, "")
        //.replace(/[^\w\-]+/g, "").replace(/-+$/, "")
    }
    function showPackageSlug() {
        $("#id_package_name").val(slugify($("#id_package_name").val()))
    }
</script>
{% endblock %}
{% block pagecontent %}
<div class="col-md-2"></div>
<div class="col-md-8">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Register a new package
                <a class="pull-right" href="{% url 'settings-packages' %}">
                    <i class="pficon-close"></i>
                </a>
            </h3>
        </div>
        <div class="panel-body">
            {% for message in messages %}
            {% if 'success' in message.tags %}
            <div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">
                    <span class="pficon pficon-close"></span>
                </button>
                <span class="pficon pficon-ok"></span>
                {{ message }}
            </div>
            {% endif %} {% if 'error' in message.tags %}
            <div class="alert alert-danger alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">
                    <span class="pficon pficon-close"></span>
                </button>
                <span class="pficon pficon-error-circle-o"></span>
                {{ message }}
            </div>
            {% endif %}
            {% endfor %}
            <div style="padding-left:0.5em; padding-right:0.5em">
                {% crispy form %}
            </div>
        </div>
    </div>
</div>

<script>
    // Initialize Boostrap-select
    $('.selectpicker').selectpicker();
</script>
{% endblock %}<commit_msg>[UI] Use form_base.html for new package form<commit_after>{% extends "form_base.html" %}
{% block extrascript %}
<script src="/static/node_modules/bootstrap-select/js/bootstrap-select.js"></script>
<script type="text/javascript">
    function slugify(e) {
        return e.toString().toLowerCase().replace(/\s+/g, "-").replace(/\-\-+/g, "-").replace(/\./g, "-").replace(/^-+/, "")
        //.replace(/[^\w\-]+/g, "").replace(/-+$/, "")
    }
    function showPackageSlug() {
        $("#id_package_name").val(slugify($("#id_package_name").val()))
    }
</script>
{% endblock %}
{% block formtitle %}
Add a new package
{% endblock %}
{% block formreturnurl %}
{% url 'settings-packages' %}
{% endblock %}
{% block formscript %}
<script>
  $(function () {
    $('.selectpicker').selectpicker();
  });
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.21171770972037285, 'fraction_numerical': 0.002663115845539281, 'mean_word_length': 2.2346609257265877, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, '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': '4759839', 'n_tokens_mistral': 965, 'n_tokens_neox': 894, 'n_words': 168}