mirror of https://github.com/dani/vroom.git
Add a feedback form
Add a link to the feedback page in the public toolbar, and the goodby page Should fix #14
This commit is contained in:
parent
46d9ddb85d
commit
3aa3415a0e
|
@ -14,6 +14,7 @@ realm => 'example.com',
|
|||
# Web & contact
|
||||
baseUrl => 'https://vroom.example.com/',
|
||||
emailFrom => 'vroom@example.com',
|
||||
feedbackRecipient => 'admin@example.com',
|
||||
# Templates to use for web pages
|
||||
template => 'default',
|
||||
# Used to sign cookies
|
||||
|
|
|
@ -17,6 +17,14 @@ our %Lexicon = (
|
|||
"click on <a href='%s'>this link</a>",
|
||||
"HAVE_A_NICE_MEETING" => "Have a nice meeting :-)",
|
||||
"EMAIL_SIGN" => "VROOM! And video conferencing becomes free, simple and safe",
|
||||
"FEEDBACK" => "Feedback",
|
||||
"YOUR_MAIL_OPTIONAL" => "Your email address (optional)",
|
||||
"COMMENT" => "Comment",
|
||||
"SUBMIT" => "Submit",
|
||||
"FEEDBACK_FROM_VROOM" => "VROOM feedback",
|
||||
"FROM" => "From",
|
||||
"GIVE_US_YOUR_FEEDBACK" => "Give us your feedback",
|
||||
"YOUR_FEEDBACK_HELPS_US" => "Your feedback (good or bad) can help us improve this application",
|
||||
"ROOM_LOCKED" => "This room is now locked",
|
||||
"ROOM_UNLOCKED" => "This room is now unlocked",
|
||||
"ONE_OF_THE_PEERS" => "one of the peers",
|
||||
|
|
|
@ -18,6 +18,14 @@ our %Lexicon = (
|
|||
"une webcam. Quand vous êtes prêt, cliquez sur <a href='%s'>ce lien</a>",
|
||||
"HAVE_A_NICE_MEETING" => "Bonne réunion :-)",
|
||||
"EMAIL_SIGN" => "VROOM! Et la visio conférence devient libre, simple et sûr",
|
||||
"FEEDBACK" => "Retour d'expérience",
|
||||
"YOUR_MAIL_OPTIONAL" => "Votre adresse email (optionnelle)",
|
||||
"COMMENT" => "Commentaire",
|
||||
"SUBMIT" => "Envoyer",
|
||||
"FEEDBACK_FROM_VROOM" => "Retour d'expérience de VROOM",
|
||||
"FROM" => "De la part de",
|
||||
"GIVE_US_YOUR_FEEDBACK" => "Parlez-nous de votre expérience",
|
||||
"YOUR_FEEDBACK_HELPS_US" => "Votre retour d'expérience (bonne ou mauvaise) peut nous aider à améliorer cette application",
|
||||
"INVITE_SENT_TO_s" => "Une invitation a été envoyée à %s",
|
||||
"ROOM_LOCKED" => "Ce salon est maintenant verrouillé",
|
||||
"ROOM_UNLOCKED" => "Ce salon est maintenant déverrouillé",
|
||||
|
|
|
@ -69,6 +69,10 @@
|
|||
max-width: 500px;
|
||||
margin: auto;
|
||||
}
|
||||
#feedbackFormContainer {
|
||||
max-width: 700px;
|
||||
margin: auto;
|
||||
}
|
||||
#chatBox {
|
||||
max-height:300px;
|
||||
resize:none;
|
||||
|
|
|
@ -68,6 +68,7 @@ our $config = plugin Config => {
|
|||
realm => 'vroom',
|
||||
baseUrl => 'https://vroom.example.com/',
|
||||
emailFrom => 'vroom@example.com',
|
||||
feedbackRecipient => 'admin@example.com',
|
||||
template => 'default',
|
||||
inactivityTimeout => 3600,
|
||||
logLevel => 'info',
|
||||
|
@ -226,6 +227,25 @@ get '/about' => sub {
|
|||
|
||||
get '/help' => 'help';
|
||||
|
||||
get '/feedback' => 'feedback';
|
||||
post '/feedback' => sub {
|
||||
my $self = shift;
|
||||
my $email = $self->param('email') || '';
|
||||
my $comment = $self->param('comment');
|
||||
$self->email(
|
||||
header => [
|
||||
Subject => encode("MIME-Header", $self->l("FEEDBACK_FROM_VROOM")),
|
||||
To => $config->{feedbackRecipient}
|
||||
],
|
||||
data => [
|
||||
template => 'feedback',
|
||||
email => $email,
|
||||
comment => $comment
|
||||
],
|
||||
);
|
||||
$self->redirect_to($self->url_for('/'));
|
||||
};
|
||||
|
||||
get '/goodby/(:room)' => sub {
|
||||
my $self = shift;
|
||||
my $room = $self->stash('room');
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<html>
|
||||
<p>
|
||||
<%=l 'FROM' %>: <%= $email %>
|
||||
</p>
|
||||
<p>
|
||||
<%=l 'COMMENT' %>: <%= $comment %>
|
||||
</p>
|
||||
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
|
||||
—
|
||||
<br>
|
||||
<%=l 'EMAIL_SIGN' %>
|
||||
</p>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
% title $self->l('FEEDBACK');
|
||||
%= include 'header'
|
||||
%= include 'public_toolbar'
|
||||
<div class="container-fluid">
|
||||
<div id="feedbackFormContainer" class="well">
|
||||
|
||||
<form role="form" action="<%=url_for('/feedback')%>" method="post">
|
||||
<legend><center><%=l 'GIVE_US_YOUR_FEEDBACK' %></center></legend>
|
||||
<center><%=l 'YOUR_FEEDBACK_HELPS_US' %></center>
|
||||
<br>
|
||||
<div class="form-group">
|
||||
<label for="email"><%=l 'YOUR_MAIL_OPTIONAL' %></label>
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="me@example.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment"><%=l 'COMMENT' %></label>
|
||||
<textarea id="comment" name="comment" class="form-control" rows="10"></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default"><%=l 'SUBMIT' %></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
%= include 'footer'
|
|
@ -6,7 +6,10 @@
|
|||
<div class="jumbotron">
|
||||
<h1><%=l 'THANKS_SEE_YOU_SOON' %></h1>
|
||||
<p><%=l 'THANKS_FOR_USING' %></p>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" href="<%= $self->url_for('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a></p>
|
||||
<div class='btn-group'>
|
||||
<a class="btn btn-primary btn-lg" role="button" href="<%= $self->url_for('/') %>"><%=l 'BACK_TO_MAIN_MENU' %></a>
|
||||
<a class="btn btn-default btn-lg" role="button" href="<%= $self->url_for('/feedback') %>"><%=l 'GIVE_US_YOUR_FEEDBACK' %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
%=include 'footer'
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<li>
|
||||
<a href="<%= $self->url_for('/about') %>"><%=l 'ABOUT' %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%= $self->url_for('/feedback') %>"><%=l 'FEEDBACK' %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue