Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
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
TimeOut
TimeOutAdmin
Commits
4404870f
Commit
4404870f
authored
6 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.techware.co.in/timeout/timeOut
into jansa
parents
2b60ed7b
4a965bdf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
20 deletions
+36
-20
Venue.php
application/controllers/Venue.php
+6
-4
Venue_model.php
application/models/Venue_model.php
+4
-2
venueAddForm.php
application/views/Venue/venueAddForm.php
+18
-14
custom-script.js
assets/js/custom-script.js
+8
-0
No files found.
application/controllers/Venue.php
View file @
4404870f
...
...
@@ -118,12 +118,14 @@ class Venue extends CI_Controller {
$_POST
[
'location_lat'
]
=
$locData
[
'lat'
];
$_POST
[
'location_lng'
]
=
$locData
[
'lng'
];
$locality
=
''
;
if
(
isset
(
$_POST
[
'locality'
])
&&
!
empty
(
$_POST
[
'locality'
])){
$locality
=
$_POST
[
'locality'
];
$locality
=
array
();
if
(
isset
(
$_POST
[
'locality'
])
&&
!
empty
(
$_POST
[
'locality'
])
&&
isset
(
$_POST
[
'locality_ar'
])
&&
!
empty
(
$_POST
[
'locality_ar'
])){
$locality
[
'locality'
]
=
$_POST
[
'locality'
];
$locality
[
'locality_ar'
]
=
$_POST
[
'locality_ar'
];
}
unset
(
$_POST
[
'locality'
],
$_POST
[
'locality_type'
],
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_POST
[
'seat_price'
],
$_POST
[
'seat_capacity'
]);
$_POST
[
'seat_price'
],
$_POST
[
'seat_capacity'
]
,
$_POST
[
'locality_ar'
]
);
$status
=
$this
->
Venue_model
->
createVenue
(
$_POST
,
$locality
);
if
(
$status
==
1
){
...
...
This diff is collapsed.
Click to expand it.
application/models/Venue_model.php
View file @
4404870f
...
...
@@ -22,13 +22,15 @@ class Venue_model extends CI_Model {
return
0
;
}
public
function
createVenue
(
$venueData
=
array
(),
$locality
=
''
){
public
function
createVenue
(
$venueData
=
array
(),
$locality
=
array
()
){
if
(
empty
(
$venueData
)){
return
0
;
}
if
(
!
empty
(
$locality
)){
$status
=
$this
->
db
->
insert
(
'locality'
,
array
(
'locality'
=>
$locality
,
'region_id'
=>
$venueData
[
'region_id'
]));
array
(
'locality'
=>
$locality
[
'locality'
],
'locality_ar'
=>
$locality
[
'locality_ar'
],
'region_id'
=>
$venueData
[
'region_id'
]));
if
(
$status
){
$venueData
[
'locality_id'
]
=
$this
->
db
->
insert_id
();
...
...
This diff is collapsed.
Click to expand it.
application/views/Venue/venueAddForm.php
View file @
4404870f
...
...
@@ -82,19 +82,6 @@
<textarea
type=
"text"
class=
"ip_reg_form_input form-control reset-form-custom required"
placeholder=
"Venue Details"
name=
"venue_details"
data-parsley-trigger=
"change"
data-parsley-minlength=
"1"
required=
""
style=
"height:106px;"
>
<?=
(
isset
(
$venue_data
->
venue_details
))
?
$venue_data
->
venue_details
:
''
?>
</textarea>
<span
class=
"glyphicon form-control-feedback"
></span>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<label>
Venue Address
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
required
name=
"location"
placeholder=
"Venue Address"
value=
"
<?=
(
isset
(
$venue_data
->
location
))
?
$venue_data
->
location
:
''
?>
"
>
</div>
<input
type=
"hidden"
id=
"gooLocLat"
value=
"
<?=
(
isset
(
$venue_data
->
location_lat
)
&&
!
empty
(
$venue_data
->
location_lat
))
?
$venue_data
->
location_lat
:
''
?>
"
/>
<input
type=
"hidden"
id=
"gooLocLng"
value=
"
<?=
(
isset
(
$venue_data
->
location_lng
)
&&
!
empty
(
$venue_data
->
location_lng
))
?
$venue_data
->
location_lng
:
''
?>
"
/>
<input
type=
"hidden"
id=
"gooLocZoom"
value=
"
<?=
(
isset
(
$venue_data
->
location
))
?
15
:
0
?>
"
/>
<div
id=
"locPointerMap"
style=
"height: 352px;"
></div>
<?php
if
(
!
isset
(
$venue_id
)
||
empty
(
$venue_id
)){
?>
<div
class=
"form-group"
style=
"padding-top: 5px;"
>
<label
id=
"localityLabel"
>
Venue Locality
</label>
...
...
@@ -109,7 +96,14 @@
</div>
</div>
<div
id=
"addNew"
class=
"form-group"
>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
name=
"locality"
placeholder=
"Locality"
>
<div
style=
"width:49%;display:inline-block;"
>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
name=
"locality"
placeholder=
"Locality (English)"
>
</div>
<div
style=
"width:49%;display:inline-block;"
>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
name=
"locality_ar"
placeholder=
"Locality (Arabic)"
>
</div>
</div>
<div
id=
"useExist"
class=
"form-group hide"
>
<select
name=
"locality_id"
class=
"form-control"
placeholder=
"Select Locality"
></select>
...
...
@@ -117,6 +111,16 @@
</div>
<?php
}
?>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<label>
Venue Address
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
required
name=
"location"
placeholder=
"Venue Address"
value=
"
<?=
(
isset
(
$venue_data
->
location
))
?
$venue_data
->
location
:
''
?>
"
>
</div>
<input
type=
"hidden"
id=
"gooLocLat"
value=
"
<?=
(
isset
(
$venue_data
->
location_lat
)
&&
!
empty
(
$venue_data
->
location_lat
))
?
$venue_data
->
location_lat
:
''
?>
"
/>
<input
type=
"hidden"
id=
"gooLocLng"
value=
"
<?=
(
isset
(
$venue_data
->
location_lng
)
&&
!
empty
(
$venue_data
->
location_lng
))
?
$venue_data
->
location_lng
:
''
?>
"
/>
<input
type=
"hidden"
id=
"gooLocZoom"
value=
"
<?=
(
isset
(
$venue_data
->
location
))
?
15
:
0
?>
"
/>
<div
id=
"locPointerMap"
style=
"height: 352px;"
></div>
</div>
<input
id=
"has_layout"
type=
"hidden"
name=
"has_layout"
value=
'0'
>
<div
class=
"col-md-12"
id=
"layoutCntr"
class=
"hide"
>
<!-- Layout Container -->
...
...
This diff is collapsed.
Click to expand it.
assets/js/custom-script.js
View file @
4404870f
...
...
@@ -758,10 +758,14 @@ jQuery('[name="locality_type"]').on('click',function(event) {
jQuery
(
'[id="addNew"]'
).
addClass
(
'hide'
);
jQuery
(
'[name="locality"]'
).
prop
(
"disabled"
,
true
);
jQuery
(
'[name="locality"]'
).
removeClass
(
"required"
);
jQuery
(
'[name="locality_ar"]'
).
prop
(
"disabled"
,
true
);
jQuery
(
'[name="locality_ar"]'
).
removeClass
(
"required"
);
}
else
{
jQuery
(
'[id="addNew"]'
).
removeClass
(
'hide'
);
jQuery
(
'[name="locality"]'
).
prop
(
"disabled"
,
false
);
jQuery
(
'[name="locality"]'
).
addClass
(
"required"
);
jQuery
(
'[name="locality_ar"]'
).
prop
(
"disabled"
,
false
);
jQuery
(
'[name="locality_ar"]'
).
addClass
(
"required"
);
jQuery
(
'[id="useExist"]'
).
addClass
(
'hide'
);
jQuery
(
'[name="locality_id"]'
).
prop
(
"disabled"
,
true
);
...
...
@@ -794,6 +798,8 @@ jQuery('[name="region_id"]').on('change',function(){
jQuery
(
'[id="addNew"]'
).
removeClass
(
'hide'
);
jQuery
(
'[name="locality"]'
).
prop
(
"disabled"
,
false
);
jQuery
(
'[name="locality"]'
).
addClass
(
"required"
);
jQuery
(
'[name="locality_ar"]'
).
prop
(
"disabled"
,
false
);
jQuery
(
'[name="locality_ar"]'
).
addClass
(
"required"
);
jQuery
(
'[id="useExist"]'
).
addClass
(
'hide'
);
jQuery
(
'[name="locality_id"]'
).
prop
(
"disabled"
,
true
);
...
...
@@ -804,6 +810,8 @@ jQuery('[name="region_id"]').on('change',function(){
jQuery
(
'[id="addNew"]'
).
addClass
(
'hide'
);
jQuery
(
'[name="locality"]'
).
prop
(
"disabled"
,
true
);
jQuery
(
'[name="locality"]'
).
removeClass
(
"required"
);
jQuery
(
'[name="locality_ar"]'
).
prop
(
"disabled"
,
true
);
jQuery
(
'[name="locality_ar"]'
).
removeClass
(
"required"
);
jQuery
(
'[id="useExist"]'
).
removeClass
(
'hide'
);
jQuery
(
'[name="locality_id"]'
).
prop
(
"disabled"
,
false
);
...
...
This diff is collapsed.
Click to expand it.
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