<commit_before>{% from "macros/_form.html" import render_field, render_label, render_button %}
{% set label_width = 'col-sm-2' %}
{% set control_width = 'col-sm-6 col-xs-12' %}
{% macro render_field_default(field, offset='', control_class=control_width, group_class='', field_class='') %}
    {%if offset%}{% set control_class = control_width+' '+offset %}{%endif%}
    {{ render_field(field, class_={'label': label_width,
                                   'control': control_class,
                                   'group': group_class,
                                   'field': field_class}
                    ) }}
{% endmacro %}

{% extends "layouts/base_admin.html" %}

{% block body %}
<h3>Launch Campaign</h3>

<form class="form-horizontal" id="launch" method="POST" action="" >
    {{ form.hidden_tag() }}
    <fieldset class="border">
        <legend>Confirm Details</legend>

        <table class="table table-bordered">
            <tr><td>Name</td><td>{{campaign.name}}</td></tr>
            <tr><td>Type</td><td>{{campaign.campaign_type_display()}}</td></tr>
            <tr><td>Targets</td><td>{{campaign.target_set_display()|safe}}</td></tr>
            <tr><td>Segment By</td><td>{{campaign.segment_by}}</td></tr>
            <tr><td>Order</td><td>{{campaign.target_ordering}}</td></tr>
            {% if campaign.call_maximum %}
            <tr><td>Call Maximum</td><td></td></tr>
            {% endif %}
            <tr><td>Allow Call In</td><td>{{campaign.allow_call_in}}</td></tr>
            <tr><td>Phone Numbers</td><td>{% for num in campaign.phone_number_set %}{{num}}{%if not loop.last%},{%endif%}{%endfor%}</td></tr>

        </table>

        <div class="form-group {{form.test_call_number.id}} ">
            <label class="control-label col-sm-2 " for="{{form.test_call_number.id}}">{{form.test_call_number.label}}</label>

            <div class="controls col-sm-3">
                <input class="form-control " id="{{form.test_call_number.id}}" name="{{form.test_call_number.id}}" type="text" value="">
                                
                <span class="help-block"></span>
            </div>

            <div class="col-sm-3">
                <button type="button" class="btn btn-primary">Test Call</button>
            </div>
        </div>
    </fieldset>

    <fieldset class="border">
        <legend>Embed</legend>

        {{ render_field_default(form.display_script) }}
        {{ render_field_default(form.embed_code, field_class='readonly') }}
<commit_msg>campaign field renamed<commit_after>{% from "macros/_form.html" import render_field, render_label, render_button %}
{% set label_width = 'col-sm-2' %}
{% set control_width = 'col-sm-6 col-xs-12' %}
{% macro render_field_default(field, offset='', control_class=control_width, group_class='', field_class='') %}
    {%if offset%}{% set control_class = control_width+' '+offset %}{%endif%}
    {{ render_field(field, class_={'label': label_width,
                                   'control': control_class,
                                   'group': group_class,
                                   'field': field_class}
                    ) }}
{% endmacro %}

{% extends "layouts/base_admin.html" %}

{% block body %}
<h3>Launch Campaign</h3>

<form class="form-horizontal" id="launch" method="POST" action="" >
    {{ form.hidden_tag() }}
    <fieldset class="border">
        <legend>Confirm Details</legend>

        <table class="table table-bordered">
            <tr><td>Name</td><td>{{campaign.name}}</td></tr>
            <tr><td>Type</td><td>{{campaign.campaign_type_display()}}</td></tr>
            <tr><td>Targets</td><td>{{campaign.targets_display()|safe}}</td></tr>
            <tr><td>Segment By</td><td>{{campaign.segment_by}}</td></tr>
            <tr><td>Order</td><td>{{campaign.target_ordering}}</td></tr>
            {% if campaign.call_maximum %}
            <tr><td>Call Maximum</td><td></td></tr>
            {% endif %}
            <tr><td>Allow Call In</td><td>{{campaign.allow_call_in}}</td></tr>
            <tr><td>Phone Numbers</td><td>{% for num in campaign.phone_number_set %}{{num}}{%if not loop.last%},{%endif%}{%endfor%}</td></tr>

        </table>

        <div class="form-group {{form.test_call_number.id}} ">
            <label class="control-label col-sm-2 " for="{{form.test_call_number.id}}">{{form.test_call_number.label}}</label>

            <div class="controls col-sm-3">
                <input class="form-control " id="{{form.test_call_number.id}}" name="{{form.test_call_number.id}}" type="text" value="">
                                
                <span class="help-block"></span>
            </div>

            <div class="col-sm-3">
                <button type="button" class="btn btn-primary">Test Call</button>
            </div>
        </div>
    </fieldset>

    <fieldset class="border">
        <legend>Embed</legend>

        {{ render_field_default(form.display_script) }}
        {{ render_field_default(form.embed_code, field_class='readonly') }}

{'fraction_non_alphanumeric': 0.1935612082670906, 'fraction_numerical': 0.003577106518282989, 'mean_word_length': 2.52697967764541, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7648002', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1516, 'n_words': 232}