Commit 64300cef authored by okhin's avatar okhin 🚴

New feedback form

parent d716b7c3
Pipeline #881 passed with stage
in 1 second
<!-- Let's split this page in two -->
<div class="row">
<div class="col s6">
<div class="row green accent-4">
<div class="col s12">
<h4 id="step_init" class="step_text bold center white-text">{{ _("0. Initialising the call") }}</h5>
<h4 id="step_caller" class="step_text bold center white-text">{{ _("1. Calling you") }}</h5>
<h4 id="step_wait" class="step_text bold center white-text">{{ _("2. When ready, please dial 1 on your phone") }}</h3>
<h4 id="step_callee" class="step_text bold center white-text">{{ _("3. Calling ")}}{{ @contact.full_name }}</h5>
<h4 id="step_connected" class="step_text bold center white-text">{{ _("4. Connected to ") }}{{ @contact.full_name }}</h5>
</div>
<div class="col s6">
<div class="card">
<div class="card-image">
<img src="<check if="{{ @contact.photo == '' }}">/static/img/placeholder.jpg<false>{{ @contact.photo }}</false></check>">
<span class="card-title">{{ @contact.first_name }} {{ @contact.last_name }}</span>
</div>
<div class="card-content">
<p>{{ _("Phone number") }}: <a href="tel:{{ @contact.phone }}">{{ @contact.phone }}</a></p>
<repeat group="{{ @group_types }}" value="{{ @group_type }}">
<ul class="groups">{{ @group_type.name }}
</div>
<div class="row">
<div class="container">
<div class="col m6 s12">
<include href="argumentation.html">
</div>
<div class="col m6 s12">
<div class="card horizontal sticky-action">
<div class="card-image">
<img src="<check if="{{ @contact.photo == '' }}">/static/img/placeholder.jpg<false>{{ @contact.photo }}</false></check>">
<p>{{ _("Phone number") }}: <a href="tel:{{ @contact.phone }}">{{ @contact.phone }}</a></p>
</div>
<div class="card-content">
<span class="card-title grey-text text-darken-4">{{ @contact.first_name }} {{ @contact.last_name }}</span>
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == @group_type }}">
<li class="chip">
<check if="{{ @group.media }} != ''">
<img src="{{ @group.media }}" alt="{{ @group.type }}">
</check>
{{ @group.name }}
</li>
<check if="{{ @group.type == 'country' }}">
<img src="{{ 'http://www.europarl.europa.eu/ep_framework/img/flag/flag_icon_' . str_replace('/', '', strtolower(@group.name)) . '.gif'}}">
</check>
</repeat>
</ul>
</repeat>
<h5 id="step_init" class="light text-lighten-2">{{ _("0. Initialising the call") }}</h5>
<h5 id="step_caller" class="light text-lighten-2">{{ _("1. Calling you") }}</h5>
<h5 id="step_wait" class="light text-lighten-2">{{ _("2. When ready, please dial 1 on your phone") }}</h3>
<h5 id="step_callee" class="light text-lighten-2">{{ _("3. Calling ")}}{{ @contact.full_name }}</h5>
<h5 id="step_connected" class="light text-lighten-2">{{ _("4. Connected to ") }}{{ @contact.full_name }}</h5>
</div>
<div class="card-action">
<h4>{{ _("Feedback Form") }}</h4>
<p class="small">{{ _("Please tell us what happened if you were able to talk to someone. Your feedback is important to us.") }}</p>
<form class="form" method="post" action="/feedback/" >
<input type="hidden" id="contact_id" name="contact_id" value="{{ @contact_id }}" />
<select name="feedback_category" id="feedback_category" class="input-field">
<repeat group="{{ @feedback_categories }}" value="{{ @feedback_category }}">
<option value="{{ @feedback_category.id }}">{{ @feedback_category.name }}</option>
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == 'group' }}">
<img src="{{ 'http://www.europarl.europa.eu/ep_framework/img/group/group_iconsmall_' . str_replace('/', '', strtolower(@group.name)) . '.png'}}">
</check>
</repeat>
</select>
<div class="input-field">
<textarea class="materialize-textarea" id="feedback" name="feedback"></textarea>
</div>
<input type="submit" class="btn btn-primary" name="go" value="{{ _("Send my feedback") }}" />
</form>
<ul class="groups">
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == 'committee'}}">
<li class="chip blue white-text committee">
{{ @group.name }}
</li>
</ul>
</check>
</repeat>
</div>
</div>
<h4>{{ _("Feedback Form") }}</h4>
<p class="small">{{ _("Please tell us what happened if you were able to talk to someone. Your feedback is important to us.") }}</p>
<form class="form" method="post" action="/feedback/" >
<input type="hidden" id="contact_id" name="contact_id" value="{{ @contact_id }}" />
<select name="feedback_category" id="feedback_category" class="input-field">
<repeat group="{{ @feedback_categories }}" value="{{ @feedback_category }}">
<option value="{{ @feedback_category.id }}">{{ @feedback_category.name }}</option>
</repeat>
</select>
<div class="input-field">
<textarea class="materialize-textarea" id="feedback" name="feedback"></textarea>
</div>
<input type="submit" class="btn btn-primary" name="go" value="{{ _("Send my feedback") }}" />
</form>
</div>
</div>
</div>
......@@ -69,15 +80,9 @@
var date2 = new Date(b[1]);
return date2 - date1;
})[0];
$('.step_text').removeClass('bold');
$('.step_text').removeClass('text-darken-4');
$('.step-text').addClass('light');
$('.step-text').addClass('text-lighten-2');
$('.step_text').hide();
if (call_state[0].startsWith('Created:Init')) {
$('#step_init').addClass('bold');
$('#step_init').addClass('text-darken-4');
$('#step_init').removeClass('light');
$('#step_init').removeClass('text-lighten-2');
$('#step_init').show();
};
if (call_state[0].startsWith('Ringing:')) {
......@@ -85,15 +90,9 @@
caller = normalize_phone(response['data']['caller']);
callee = normalize_phone(response['data']['callee']);
if ( phone === caller) {
$('#step_caller').addClass('bold');
$('#step_caller').addClass('text-darken-4');
$('#step_caller').removeClass('light');
$('#step_caller').removeClass('text-lighten-2');
$('#step_caller').show();
} else {
$('#step_callee').addClass('bold');
$('#step_callee').addClass('text-darken-4');
$('#step_callee').removeClass('light');
$('#step_callee').removeClass('text-lighten-2');
$('#step_callee').show();
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment