Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test-project
Overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Junaid Rahman pv
test-project
Commits
233d0921
Commit
233d0921
authored
Sep 06, 2016
by
Junaid Rahman pv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified map widget(PlacePicker),added asset file
parent
e2370618
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
4 deletions
+48
-4
.env.dist
.env.dist
+2
-0
.env.docker.dist
.env.docker.dist
+2
-0
_form.php
backend/modules/business/views/business/_form.php
+1
-1
MapAsset.php
common/widgets/PlacePicker/MapAsset.php
+41
-0
PlacePicker.php
common/widgets/PlacePicker/PlacePicker.php
+2
-3
No files found.
.env.dist
View file @
233d0921
...
...
@@ -45,3 +45,5 @@ FACEBOOK_CLIENT_SECRET = your-client-secret
GLIDE_SIGN_KEY = <generated_key>
GLIDE_MAX_IMAGE_SIZE = 4000000
GOOGLE_API_KEY = AIzaSyBcXUZ8SohRQzKnY4iYaa5_B2ix0b_OY9g
.env.docker.dist
View file @
233d0921
...
...
@@ -37,3 +37,5 @@ GITHUB_CLIENT_SECRET = your-client-secret
GLIDE_SIGN_KEY = <generated_key>
GLIDE_MAX_IMAGE_SIZE = 4000000
GOOGLE_API_KEY = AIzaSyBcXUZ8SohRQzKnY4iYaa5_B2ix0b_OY9g
backend/modules/business/views/business/_form.php
View file @
233d0921
...
...
@@ -2,7 +2,7 @@
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
use
common\widgets\PlacePicker
;
use
common\widgets\PlacePicker
\PlacePicker
;
/* @var $this yii\web\View */
/* @var $model common\models\Business */
...
...
common/widgets/PlacePicker/MapAsset.php
0 → 100644
View file @
233d0921
<?php
/**
* Author: Junaid Rahman <junaid.entero@gmail.com>
*/
namespace
common\widgets\PlacePicker
;
use
yii\web\AssetBundle
;
use
yii\web\View
;
class
MapAsset
extends
AssetBundle
{
public
$css
=
[
];
public
$js
=
[
'http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'
];
public
$depends
=
[
'yii\web\JqueryAsset'
,
];
public
$key
=
[
];
public
$jsOptions
=
[
[
'position'
=>
View
::
POS_HEAD
]
];
public
function
init
()
{
$this
->
sourcePath
=
__DIR__
.
"/assets"
;
parent
::
init
();
$this
->
js
=
[
'https://maps.googleapis.com/maps/api/js?key=AIzaSyBcXUZ8SohRQzKnY4iYaa5_B2ix0b_OY9g&libraries=places'
,
];
}
}
common/widgets/PlacePicker.php
→
common/widgets/PlacePicker
/PlacePicker
.php
View file @
233d0921
<?php
namespace
common\widgets
;
namespace
common\widgets
\PlacePicker
;
use
yii\widgets\InputWidget
;
use
yii\helpers\Html
;
...
...
@@ -12,6 +12,7 @@ class PlacePicker extends InputWidget
public
function
init
()
{
MapAsset
::
register
(
$this
->
view
);
parent
::
init
();
$this
->
registerScript
();
}
...
...
@@ -20,8 +21,6 @@ class PlacePicker extends InputWidget
{
echo
Html
::
tag
(
'br'
);
echo
Html
::
jsFile
(
'http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'
);
echo
Html
::
jsFile
(
'http://maps.google.com/maps/api/js?key=AIzaSyBcXUZ8SohRQzKnY4iYaa5_B2ix0b_OY9g&libraries=places®ion=uk&language=en&sensor=true'
);
echo
Html
::
textInput
(
'Address'
,
''
,
[
'id'
=>
'searchTextField'
,
'class'
=>
'form-control'
,
'style'
=>
'width:90%;'
]);
echo
Html
::
tag
(
'br'
);
...
...
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