Skip to content

Commit

Permalink
Add address field
Browse files Browse the repository at this point in the history
Translating for pt_BR by alexandre-mbm.

Ref.: commit sabas/suosm@4f9277c
  • Loading branch information
sabas authored and alexandre-mbm committed May 13, 2014
1 parent b602d1d commit bda4d57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions index.html
Expand Up @@ -78,10 +78,14 @@ <h2>Coloque seu empreendimento no mapa!</h2>
<label for='category'>Categoria</label>
<input id='category' data-placeholder='Escolha uma categoria...' class='col10' />
</div>
<div class='clearfix col12'>
<label for='categoryalt'>Caso não tenha encontrado uma categoria "perfeita" para seu negócio, detalhe-o no campo abaixo</label>
<div class='col6'>
<label for='categoryalt'>Caso não tenha encontrado uma categoria "perfeita" para<br />seu negócio, detalhe-o ao máximo no campo abaixo</label>
<input id='categoryalt' type='text' placeholder='Descreva aqui tipo de atividade, produtos e/ou serviços' class='col12' />
</div>
<div class='clearfix col6'>
<label for='addressalt'>Por favor, entre o endereço no campo abaixo ou ajude-nos<br />a completá-lo (rua, número da casa, bairro, CEP...)</label>
<input id='addressalt' type='text' placeholder='Rua Praia de Camboinhas, 9171. Ponta Negra. Natal, RN. CEP 59092-030. Brasil' class='col12' />
</div>
<div class='col6'>
<label for='name'>Nome</label>
<input id='name' type='text' placeholder='Papelaria Prátika' />
Expand Down
5 changes: 3 additions & 2 deletions js/site.js
Expand Up @@ -113,7 +113,7 @@ $("#find").submit(function(e) {
function nominatim_callback(data){
if (data.length > 0) {
var chosen_place = data[0];
console.log(chosen_place);
//console.log(chosen_place);

var bounds = new L.LatLngBounds(
[+chosen_place.boundingbox[0], +chosen_place.boundingbox[2]],
Expand All @@ -124,6 +124,7 @@ function nominatim_callback(data){
findme_marker.setLatLng([chosen_place.lat, chosen_place.lon]);
$('#instructions').html('Encontramos! Clique e arraste o marcador para o local do seu negócio, então você estará pronto para <a href="#details">adicionar à nossa lista os detalhes de sua empresa</a>.');
$('.step-2 a').attr('href', '#details');
$('#addressalt').val(chosen_place.display_name);
} else {
$('#instructions').html('<strong>Não conseguimos encontrar o seu endereço.</strong> Tente descrever sua rua ou cidade com menos detalhe.');
}
Expand Down Expand Up @@ -187,7 +188,7 @@ $("#collect-data-done").click(function() {
if ($("#wheel").val()) note_body += "Acessibilidade para cadeirantes: " + $("#wheel").val() + "\n";
if ($("#category").val()) note_body += "Categoria: " + $("#category").val() + "\n";
if ($("#categoryalt").val()) note_body += "Descrição: " + $("#categoryalt").val() + "\n";
if ($("#address").val()) note_body += "Endereço: " + $("#address").val() + "\n";
if ($("#addressalt").val()) note_body += "Endereço: " + $("#addressalt").val() + "\n";
if ($("#payment").val()) note_body += "Modos de pagamento aceitos: " + $("#payment").val() + "\n";
var latlon = findme_marker.getLatLng();
var qwarg = {
Expand Down

1 comment on commit bda4d57

@alexandre-mbm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leverages sabas#12

Please sign in to comment.