mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Add location to account.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
{# only correct way to do active checkbox #}
|
||||
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
|
||||
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
|
||||
{{ ExpandedForm.location('location') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,6 +77,43 @@
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<!-- location script -->
|
||||
<script type="text/javascript">
|
||||
// pre-set latitude:
|
||||
{% if old('tag_position_latitude') %}
|
||||
var tag_position_latitude = "{{ old('tag_position_latitude') }}";
|
||||
{% else %}
|
||||
var tag_position_latitude = "52.3167";
|
||||
{% endif %}
|
||||
|
||||
// pre-set longitude
|
||||
{% if old('tag_position_longitude') %}
|
||||
var tag_position_longitude = "{{ old('tag_position_longitude') }}";
|
||||
{% else %}
|
||||
var tag_position_longitude = "5.5500";
|
||||
{% endif %}
|
||||
|
||||
// pre-set zoom level
|
||||
{% if old('tag_position_zoomlevel') %}
|
||||
var tag_position_zoomlevel = "{{ old('tag_position_zoomlevel') }}";
|
||||
{% else %}
|
||||
var tag_position_zoomlevel = "6";
|
||||
{% endif %}
|
||||
|
||||
// must draw a tag?
|
||||
{% if old('tag_position_latitude') and old('tag_position_longitude') and old('tag_position_zoomlevel') %}
|
||||
var tag_position_set_tag = true;
|
||||
{% else %}
|
||||
var tag_position_set_tag = false;
|
||||
{% endif %}
|
||||
|
||||
// token for Mapbox:
|
||||
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
|
||||
|
||||
</script>
|
||||
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/accounts/create.js?v={{ FF_VERSION }}"></script>
|
||||
@@ -85,4 +122,5 @@
|
||||
{% block styles %}
|
||||
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
|
||||
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}"/>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user