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
333843c0
Commit
333843c0
authored
Feb 04, 2019
by
Okhin
Browse files
Expanding parameters for feedbackform
parent
c8c11cd6
Pipeline
#2422
passed with stages
in 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Main.php
View file @
333843c0
...
...
@@ -63,14 +63,20 @@ class Main extends Controller {
function
call
(
$f3
,
$args
)
{
//GET
if
(
$f3
->
get
(
'VERB'
)
==
'GET'
)
{
$f3
->
set
(
'contact'
,
Api
::
get_contact
(
$args
[
'id'
]));
$categories
=
Api
::
get_feedback_categories
();
$f3
->
set
(
'feedback_categories'
,
$categories
);
$f3
->
set
(
'contact_id'
,
$args
[
'id'
]);
$f3
->
set
(
'block_content'
,
'feedbackform.html'
);
$f3
->
set
(
"contact_id"
,
$contact_id
);
$arguments
=
Api
::
get_arguments
();
$f3
->
set
(
'arguments'
,
$arguments
);
$f3
->
set
(
'block_content'
,
'feedbackform.html'
);
}
//POST
elseif
(
$f3
->
get
(
'VERB'
)
==
'POST'
){
// To get the callee, we have the callee_id in the form. Using that
// to load the callee and retrieve its number.
$contact
=
Api
::
get_contact
(
$args
[
'id'
]);
$contact
=
Api
::
get_contact
(
$args
[
'
contact_
id'
]);
$f3
->
set
(
'contact'
,
$contact
);
$call_id
=
str_replace
(
'.'
,
'-'
,
uniqid
(
''
,
true
));
}
...
...
templates/feedbackform.html
View file @
333843c0
<!-- Let's split this page in two -->
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"col m6 s12"
>
...
...
Write
Preview
Markdown
is supported
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