Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-front
Commits
8f444e4f
Commit
8f444e4f
authored
Nov 22, 2014
by
nepski
Browse files
use API
parent
0fff81d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Main.php
View file @
8f444e4f
...
...
@@ -10,13 +10,21 @@ class Main extends Controller {
function
feedbackform
(
$f3
,
$args
)
{
if
(
$f3
->
get
(
'VERB'
)
==
'GET'
){
$f3
->
set
(
'feedback_categories'
,
Api
::
get_feedback_categories
());
$f3
->
set
(
"contact_id"
,
42
);
//create call
//start call
//end call
$f3
->
set
(
'block_content'
,
'feedbackform.html'
);
}
elseif
(
$f3
->
get
(
'VERB'
)
==
'POST'
){
$contact_id
=
$f3
->
get
(
'POST.contact_id'
);
$feedback
=
$f3
->
get
(
'POST.feedback'
);
//send feedback to campaign
$f3
->
set
(
'post_feedback_result'
,
Api
::
post_feedback
(
$contact_id
,
$feedback
));
$f3
->
set
(
'block_content'
,
'thankyou.html'
);
}
}
...
...
templates/feedbackform.html
View file @
8f444e4f
...
...
@@ -5,11 +5,17 @@
<p>
{{ _("Please tell us what happened if you was able to talk to someone. Your feedback is important to us.") }}
</p>
<form
method=
"post"
action=
"/feedback/"
>
<input
type=
"text"
id=
"contact_id"
name=
"contact_id"
hidden=
"hidden"
value=
"{{ @contact_id }}"
/>
<repeat
group=
"feedback_categories"
value=
"feedback_category"
>
<p>
<input
type=
"radio"
group=
"feedback_category"
value=
"{{ trim(@feedback_category }}"
/>
{{ trim(@feedback_category }}
</p>
</repeat>
<p>
<textarea
id=
"feedback"
name=
"feedback"
></textarea>
</p>
<input
type=
"submit"
name=
"go"
value=
"{{ _("
Send
my
feedback
")
}}"
/>
<input
type=
"submit"
name=
"go"
value=
"{{ _("
Send
my
feedback
")
}}"
/>
</form>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment