-
Notifications
You must be signed in to change notification settings - Fork 26
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 #220 from eddie-ruva/features/fixing_map
[#218] Fixes map interaction
- Loading branch information
Showing
8 changed files
with
65 additions
and
95 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,41 +1,45 @@ | ||
= form_for @service_request, html: {class: "form-horizontal", role: 'form'} do |f| | ||
|
||
.form-group | ||
= f.label :service_id, t('form.labels.service'), class: 'col-lg-3 control-label' | ||
.col-lg-9 | ||
= f.select :service_id, Service.all.collect {|p| [ p.name, p.id ] }, { include_blank: true }, { class: 'js-load_service_fields form-control' } | ||
= errors_on_resource_for_field(@service_request, :service_id) | ||
|
||
%div#service_fields_container | ||
= render @service_request.service.service_fields if @service_request.service? | ||
|
||
.form-group | ||
= f.label :address, t('form.labels.address'), class: 'col-lg-3 control-label' | ||
.col-lg-9 | ||
= f.text_area :address, id: 'address', rows: '5', class: 'form-control' | ||
|
||
.form-group | ||
= f.label :description, t('form.labels.description'), class: 'col-lg-3 control-label' | ||
.col-lg-9 | ||
= f.text_area :description, class: 'form-control', rows: '5' | ||
= errors_on_resource_for_field(@service_request, :description) | ||
|
||
.form-group | ||
= f.label :media, t('form.labels.image'), class: 'col-lg-3 control-label' | ||
.col-lg-9 | ||
= f.file_field :media, class: 'js-image-preview' | ||
.image_preview | ||
|
||
.form-group | ||
.col-lg-offset-3.col-lg-9 | ||
.checkbox | ||
= f.label :anonymous do | ||
= f.check_box :anonymous | ||
= t('.anonymise') | ||
|
||
= f.hidden_field :lat, id: 'lat' | ||
= f.hidden_field :lng, id: 'lng' | ||
|
||
.form-group | ||
.col-lg-offset-3.col-lg-9 | ||
= f.submit t('save'), class: "btn btn-primary" | ||
.form-group | ||
= f.label :service_id, t('form.labels.service'), class: 'col-md-2 control-label' | ||
.col-md-10 | ||
= f.select :service_id, Service.all.collect {|p| [ p.name, p.id ] }, { prompt: t('.prompt_service') }, { class: 'js-load_service_fields form-control' } | ||
= errors_on_resource_for_field(@service_request, :service_id) | ||
|
||
%div#service_fields_container | ||
= render @service_request.service.service_fields if @service_request.service? | ||
|
||
.form-group | ||
= f.label :address, t('form.labels.address'), class: 'col-md-2 control-label' | ||
.col-md-10 | ||
= f.text_area :address, id: 'address', rows: '5', class: 'form-control', placeholder: t('.address_placeholder') | ||
|
||
.form-group | ||
= f.label :lat, 'Ubicación en mapa', class: 'col-md-2 control-label' | ||
.col-md-10 | ||
= f.hidden_field :lat, id: 'lat' | ||
= f.hidden_field :lng, id: 'lng' | ||
.help-block= t('.map_help') | ||
#new-report-map{'data-map-constraints' => current_map_constrainsts} | ||
|
||
.form-group | ||
= f.label :description, t('form.labels.description'), class: 'col-md-2 control-label' | ||
.col-md-10 | ||
= f.text_area :description, class: 'form-control', rows: '5', placeholder: t('.description_placeholder') | ||
= errors_on_resource_for_field(@service_request, :description) | ||
|
||
.form-group | ||
= f.label :media, t('form.labels.image'), class: 'col-md-2 control-label' | ||
.col-md-10 | ||
= f.file_field :media, class: 'js-image-preview' | ||
.image_preview | ||
|
||
.form-group | ||
.col-md-offset-2.col-md-10 | ||
.checkbox | ||
= f.label :anonymous do | ||
= f.check_box :anonymous | ||
= t('.anonymise') | ||
|
||
|
||
.form-group | ||
.col-md-offset-2.col-md-10 | ||
= f.submit t('save'), class: "btn btn-primary" |
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,7 +1,7 @@ | ||
%h1= t('.header') | ||
.page-header.l-page-header-no-margin | ||
%h1= t('.header') | ||
|
||
.row | ||
.col-md-6 | ||
= render 'form' | ||
.col-md-6 | ||
#new-report-map{'data-map-constraints' => current_map_constrainsts} | ||
.col-md-12 | ||
= form_for @service_request, html: {class: "form-horizontal", role: 'form'} do |f| | ||
= render 'form', f: f |
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