-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from studioespresso/feature/google
Feature/google
- Loading branch information
Showing
7 changed files
with
159 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Code Quality | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace studioespresso\easyaddressfield\models; | ||
|
||
use craft\base\Model; | ||
|
||
/** | ||
* Class EasyAddressFieldSettingsModel | ||
* | ||
* @package \studioespresso\easyaddressfield\models | ||
*/ | ||
class EasyAddressFieldSettingsModel extends Model | ||
{ | ||
public string $geoCodingService = 'nomanatim'; | ||
public ?string $googleApiKey = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% import "_includes/forms" as forms %} | ||
|
||
{{ forms.selectField({ | ||
label: 'Geocoding service'|t, | ||
instructions: 'The geocoding service used, defaults to Nomanatim', | ||
id: 'geoCodingService', | ||
name: 'geoCodingService', | ||
value: settings['geoCodingService'], | ||
options: services, | ||
errors: settings.getErrors('geoCodingService'), | ||
}) }} | ||
|
||
|
||
|
||
{{ forms.autosuggestField({ | ||
label: 'Google API Key for geocoding requests'|t, | ||
instructions: 'Only needed if you are using the geocoding functions in your templates'|t, | ||
id: 'googleApiKey', | ||
name: 'googleApiKey', | ||
value: settings['googleApiKey'], | ||
errors: settings.getErrors('googleApiKey'), | ||
suggestEnvVars: true, | ||
suggestAliases: true, | ||
}) }} | ||
|