Skip to content
GitLab
Menu
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
e13da69e
Commit
e13da69e
authored
Nov 22, 2014
by
nepski
Browse files
light doc and sip feedback
parent
beb410e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Main.php
View file @
e13da69e
...
...
@@ -11,18 +11,26 @@ class Main extends Controller {
$f3
->
set
(
'block_content'
,
'home.html'
);
}
/*
* Feedback page
* Form for a feedback after a call
* GET: show the form
* POST: send the form to the campaign API and show thank you
*/
function
feedbackform
(
$f3
,
$args
)
{
//GET
if
(
$f3
->
get
(
'VERB'
)
==
'GET'
){
$categories
=
Api
::
get_feedback_categories
()[
'categories'
];
$f3
->
set
(
'feedback_categories'
,
$categories
);
$f3
->
set
(
"contact_id"
,
42
);
//create call
//start call
//
TODO:
create call
//
TODO:
start call
$f3
->
set
(
'block_content'
,
'feedbackform.html'
);
}
//POST
elseif
(
$f3
->
get
(
'VERB'
)
==
'POST'
){
$contact_id
=
$f3
->
get
(
'POST.contact_id'
);
$feedback
=
$f3
->
get
(
'POST.feedback'
);
...
...
@@ -34,6 +42,8 @@ class Main extends Controller {
}
}
function
feedbacksip
(
$f3
,
$args
)
{
}
};
app/routes.ini
View file @
e13da69e
...
...
@@ -14,3 +14,4 @@ GET /restapi/campaign/@id/arguments/@lang=RestApi->arguments
GET|POST
@feedback:/
feedback
=
Main->feedbackform
POST
@feedbacksip:/
feedbacksip
=
Main->feedbacksip
\ No newline at end of file
templates/feedbackform.html
View file @
e13da69e
...
...
@@ -4,7 +4,7 @@
<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
/
"
>
<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 }}"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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