<commit_before>{% from "macros/_form.html" import render_form %}

{% set page_title = _("System") %}

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

{% block body %}
<h1>System</h1>

{% endblock %}<commit_msg>system page: working twilio number display & sync, account auth keys<commit_after>{% from "macros/_form.html" import render_form %}

{% set page_title = _("System") %}

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

{% block body %}
<h1>System Settings</h1>

<div class="container" id="system">
    <h2>{{ _('Phone Numbers') }}</h2>
    <table class='table table-bordered table-hover'>
        <thead>
            <tr>
                <th>{{ _('Number') }}</th>
                <th>{{ _('Campaign') }}</th>
                <th>{{ _('Dial In') }}</th>
            </tr>
        </thead>
        {% for p in twilio_numbers %}
        <tr>
            <td>{{ p.number }} </td>
            <td>{{ p.campaign }}</td>
            <td>{{ p.campaign.allow_call_in }}</td>
        </tr>
        {% endfor %}
    </table>

    <form class="form-inline" method="POST" action="{{url_for('admin.twilio_resync')}}">
        <input id="csrf_token" name="csrf_token" type="hidden" value="{{csrf_token()}}">
        <div class="form-group"><button type="submit" class="btn btn-warning">Resync</button></div>
        <a class="btn btn-success" href="https://www.twilio.com/user/account/phone-numbers/search" target="_blank">Buy Another</a>
    </form>
    


    <h2>Default Messages</h2>
    <table class='table table-bordered table-hover'>
        <thead>
            <tr>
                <th>{{ _('Type') }}</th>
                <th>{{ _('Message') }}</th>
            </tr>
        <tr></tr>
    </table>

    <h2>Twilio Account</h2>
    <div class="row">
        <div class="col-sm-6">
            <label class="control-label">Account SID:</label>
            <input type="text" class="form-control" value="{{twilio_auth.0}}" readonly />
        </div>

        <div class="col-sm-6">
            <label class="control-label">Private Key:</label>
            <div class="input-group">
                <input type="password" class="form-control" value="{{twilio_auth.1}}" readonly />
                <span class="input-group-btn">
                    <button class="btn btn-default js-reveal" type="button"><i class="glyphicon glyphicon-eye-open"></i></button>
              </span>
            </div>
        </div>
    </div>

</div>
{% endblock %}

{% block scripts %}
<script type="text/javascript">
    /* TODO, move this to the map app js */
    $(function(){
        $('button.js-reveal').on('click', function(event) {
            var input = $(event.target).parent().siblings('input');
            if (input.prop('type') === 'password') {
                input.prop('type','text');
            } else {
                input.prop('type','password');
            }
        });
    });
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.20075888237323214, 'fraction_numerical': 0.004829251466022766, 'mean_word_length': 2.2044198895027622, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '3385251', 'n_tokens_mistral': 966, 'n_tokens_neox': 901, 'n_words': 185}