mangroveorg/datawinners

View on GitHub
datawinners/templates/project/sms_tester_form.html

Summary

Maintainability
Test Coverage
{% load i18n %}
{% load user_tags %}
<div class="sms_tester_form none">
    {% if is_quota_reached %}
        <div class="warning-message-box clear-both overflow_hidden">
            {% if user|in_group:"NGO Admins," %}
                <p>{% trans "You have reached your limit of 1000 free Submissions. Subscribe to a monthly subscription to continue submitting data for your questionnaires." %}</p>
                <a class="float_left margin_10 padding_top_10" href="https://www.datawinners.com/{{ active_language }}/pricing/" target="blank">{% trans "Learn More" %}</a>
                <a class="button margin_10 float_left" target="blank"
               href="{% url default_upgrade %}">{% trans "Subscribe Now" %}</a>
            {% else %}
                <p>{% trans "You have reached your limit of 1000 free Submissions. Subscribe to a monthly subscription by contacting your Project Manager or DW Support at <a href='mailto:support@datawinners.com'>support@datawinners.com</a>." %}</p>
            {% endif %}
        </div>
    {% endif %}
    <table class="no_border">
        <tr>
            <td width="55%">
                <h4>1. {% trans "View the SMS Questionnaire" %}</h4>
            </td>
            <td width="45%">
                <h4>2. {% trans "Send your Answers" %}</h4>
            </td>
        </tr>
    </table>
    <table class="no_border">
        <tr>
            <td width="55%">
                <div class="questionnaire_preview1">
                </div>
            </td>

            <td width="45%" class="padding_top_null">
                <div class="content italic padding_bottom_10">
                    {% trans "Use the phone below or your own mobile phone to send in your test answers." %}
                </div>
                <ol style="list-style-type: upper-alpha;margin-left: 26px">
                    <li><strong>{%  trans "Use Your Own Mobile Phone" %}</strong>
                        <p>{% trans "Send your SMS to"%} <strong id="org_number"></strong></p>
                    </li>
                    <br/>
                    <li><strong>{% trans "Use our online phone" %}</strong></li>

                </ol>
                <div class="mobile_container">
                    <div class="mobile_image">
                        <div class="margin_left_20 mobile_block">
                            <input id='from_msisdn' type='hidden' value="{{ from_number }}">
                            <input id='to_msisdn' type='hidden' value="{{ to_number }}">

                            <div class="mobile">
                                <textarea placeholder='{% trans "Type your answers here" %}' name="message" cols="30" rows="4" id="id_message"></textarea>
                            </div>
                        </div>

                    </div>
                    <div class="info">
                        <div class="padding_bottom_10">
                            <h5>{% trans 'Tips' %}</h5>
                            <ul>
                                <li>
                                    - {% trans 'Start your SMS with the Questionnaire Code' %} "<span
                                        class="questionnaire-code">{{ questionnaire_code }}</span>"
                                </li>
                                <li>
                                    - {% trans 'Leave a space between answers in your SMS' %}
                                </li>
                                <li>
                                    - {% trans 'If you are reporting on a specific Subject, you must use the Subject’s Unique ID' %}
                                </li>
                            </ul>
                            {% if not project.is_outgoing_sms_replies_enabled %}
                                <div id="outgoing_sms_disabled_help_text">
                                    <h5>{% trans 'DataWinners Automatic Reply SMS' %}</h5>
                                    <div>{% trans 'Automatic reply messages turned off for this questionnaire.' %}</div>
                                    <div>{% trans 'To reactivate them go to '%}
                                        <a href="{{ project_links.questionnaire_language_selection_link }}">{% trans 'Automatic Reply SMS.' %}</a>
                                    </div>
                                </div>
                            {% endif %}
                        </div>
                        <div id="response_info">
                            <h5>{% trans 'DataWinners Automatic Reply SMS' %}</h5>
                            <h5>"{% trans "Error" %}"</h5>
                            {% trans 'Refer to the Example SMS Answer and re-type your SMS' %}
                            <h5>"{% trans "Thank you" %}"</h5>
                            {% trans 'Congratulations ! Go to ' %} <a id="submission_log_link"
                                                                      href="{{ project_links.submission_log_link }}">{% trans 'Submission Log' %}</a> {% trans 'to see the data you submitted' %}
                        </div>
                    </div>
                </div>
                <div class="clear-both padding_top_20 clear_and_submit">
                    {% if is_quota_reached %}
                        <input id="send_sms" type="button" class="float_right disabled_yellow_submit_button"
                               value="{% trans 'Send SMS' %}" disabled="disabled"/>
                        <a id="clear_sms"
                           class="padding_left_right_10 size_1_em float_right margin_top_5">{% trans 'Clear' %}</a>
                        <div class="can-not-submit">
                        <a class="can-not-submit-link-quest help_icon">{% trans "Why canʼt I submit?" %}</a>
                        <div class="tooltip">
                            <p>
                                {% trans "You have reached your 1000 free Submissions. Subscribe to a monthly subscription to continue submitting data for your Questionnaires." %}
                            </p>
                        </div>
                    {% else %}
                        <input id="send_sms" type="button" class="button float_right margin_top_5"
                               value="{% trans 'Send SMS' %}"/>
                        <a id="clear_sms"
                           class="padding_top_10 padding_left_right_10 size_1_em float_right">{% trans 'Clear' %}</a>
                    {% endif %}

                </div>
            </td>
        </tr>
    </table>
</div>