Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elloha
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
elloha
Commits
c66488f1
Commit
c66488f1
authored
Dec 11, 2018
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a test surcharge template
parent
7f483b05
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
EllohaExtension.php
src/EllohaExtension.php
+4
-0
ResaType.php
src/Form/ResaType.php
+5
-4
elloha.js
web/js/elloha.js
+1
-0
No files found.
src/EllohaExtension.php
View file @
c66488f1
...
...
@@ -99,6 +99,10 @@ class EllohaExtension extends SimpleExtension
{
$session
=
$this
->
getContainer
()[
'session'
];
$formData
=
(
$session
->
has
(
'searchData'
))
?
$session
->
get
(
'searchData'
)
:
[];
$formData
[
'StartDate'
]
=
isset
(
$formData
[
'StartDate'
])
?
\DateTime
::
createFromFormat
(
'd/m/Y'
,
$formData
[
'StartDate'
])
:
new
\DateTime
();
$formData
[
'EndDate'
]
=
isset
(
$formData
[
'EndDate'
])
?
\DateTime
::
createFromFormat
(
'd/m/Y'
,
$formData
[
'EndDate'
])
:
new
\DateTime
();
$form
=
$this
->
getContainer
()[
'form.factory'
]
->
createBuilder
(
ResaType
::
class
,
$formData
,
[
'resaTypes'
=>
$this
->
_getResaTypesForOptions
(),
])
->
getForm
();
...
...
src/Form/ResaType.php
View file @
c66488f1
...
...
@@ -6,6 +6,7 @@ namespace Bolt\Extension\Appolo\Elloha\Form;
use
Symfony\Component\Form\AbstractType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\DateTimeType
;
use
Symfony\Component\Form\Extension\Core\Type\DateType
;
use
Symfony\Component\Form\FormBuilderInterface
;
use
Symfony\Component\OptionsResolver\OptionsResolver
;
...
...
@@ -31,20 +32,20 @@ class ResaType extends AbstractType
])
->
add
(
'StartDate'
,
DateType
::
class
,
DateT
imeT
ype
::
class
,
[
'widget'
=>
'single_text'
,
'label'
=>
false
,
'format'
=>
'd
/m/Y
'
,
'format'
=>
'd
d/MM/yyyy
'
,
'required'
=>
false
,
])
->
add
(
'EndDate'
,
DateType
::
class
,
DateT
imeT
ype
::
class
,
[
'widget'
=>
'single_text'
,
'label'
=>
false
,
'format'
=>
'd
/m/Y
'
,
'format'
=>
'd
d/MM/yyyy
'
,
'required'
=>
false
])
->
add
(
...
...
web/js/elloha.js
View file @
c66488f1
$
(
document
).
ready
(
function
()
{
setAdultNumber
();
/**
* Set min adultNumber at 1
*/
...
...
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