Commit bc0ca37e authored by okhin's avatar okhin

New feedback form

parent d716b7c3
<!-- Let's split this page in two --> <!-- Let's split this page in two -->
<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>
<div class="row"> <div class="row">
<div class="col s6"> <div class="container">
<div class="col m6 s12">
<include href="argumentation.html">
</div> </div>
<div class="col s6"> <div class="col m6 s12">
<div class="card"> <div class="card horizontal sticky-action">
<div class="card-image"> <div class="card-image">
<img src="<check if="{{ @contact.photo == '' }}">/static/img/placeholder.jpg<false>{{ @contact.photo }}</false></check>"> <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> <p>{{ _("Phone number") }}: <a href="tel:{{ @contact.phone }}">{{ @contact.phone }}</a></p>
</div> </div>
<div class="card-content"> <div class="card-content">
<p>{{ _("Phone number") }}: <a href="tel:{{ @contact.phone }}">{{ @contact.phone }}</a></p> <span class="card-title grey-text text-darken-4">{{ @contact.first_name }} {{ @contact.last_name }}</span>
<repeat group="{{ @group_types }}" value="{{ @group_type }}"> <div class="groups">
<ul class="groups">{{ @group_type.name }}
<repeat group="{{ @contact.groups }}" value="{{ @group }}"> <repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == @group_type }}"> <check if="{{ @group.type == 'country' }}">
<li class="chip"> <span class="chip">
<check if="{{ @group.media }} != ''"> <img src="{{ 'http://www.europarl.europa.eu/ep_framework/img/flag/flag_icon_' . str_replace('/', '', strtolower(@group.name)) . '.gif'}}">
<img src="{{ @group.media }}" alt="{{ @group.type }}"> {{ @group.name }}
</span>
</check> </check>
</repeat>
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == 'group' }}">
<span class="chip">
<img src="{{ 'http://www.europarl.europa.eu/ep_framework/img/group/group_iconsmall_' . str_replace('/', '', strtolower(@group.name)) . '.png'}}">
{{ @group.name }} {{ @group.name }}
</li> </span>
</check>
</repeat> </repeat>
</ul> </div>
<div class="groups">
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type == 'committee'}}">
<span class="chip blue white-text committee">
{{ @group.name }}
</span>
</check>
</repeat> </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>
<div class="card-action"> </div>
</div>
<h4>{{ _("Feedback Form") }}</h4> <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> <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/" > <form class="form" method="post" action="/feedback/" >
...@@ -47,7 +67,6 @@ ...@@ -47,7 +67,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<!-- Let's include a script --> <!-- Let's include a script -->
<script type="text/javascript"> <script type="text/javascript">
...@@ -69,15 +88,9 @@ ...@@ -69,15 +88,9 @@
var date2 = new Date(b[1]); var date2 = new Date(b[1]);
return date2 - date1; return date2 - date1;
})[0]; })[0];
$('.step_text').removeClass('bold'); $('.step_text').hide();
$('.step_text').removeClass('text-darken-4');
$('.step-text').addClass('light');
$('.step-text').addClass('text-lighten-2');
if (call_state[0].startsWith('Created:Init')) { if (call_state[0].startsWith('Created:Init')) {
$('#step_init').addClass('bold'); $('#step_init').show();
$('#step_init').addClass('text-darken-4');
$('#step_init').removeClass('light');
$('#step_init').removeClass('text-lighten-2');
}; };
if (call_state[0].startsWith('Ringing:')) { if (call_state[0].startsWith('Ringing:')) {
...@@ -85,15 +98,9 @@ ...@@ -85,15 +98,9 @@
caller = normalize_phone(response['data']['caller']); caller = normalize_phone(response['data']['caller']);
callee = normalize_phone(response['data']['callee']); callee = normalize_phone(response['data']['callee']);
if ( phone === caller) { if ( phone === caller) {
$('#step_caller').addClass('bold'); $('#step_caller').show();
$('#step_caller').addClass('text-darken-4');
$('#step_caller').removeClass('light');
$('#step_caller').removeClass('text-lighten-2');
} else { } else {
$('#step_callee').addClass('bold'); $('#step_callee').show();
$('#step_callee').addClass('text-darken-4');
$('#step_callee').removeClass('light');
$('#step_callee').removeClass('text-lighten-2');
}; };
}; };
......
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