Last active
December 10, 2015 19:58
-
-
Save quidproquo/4484447 to your computer and use it in GitHub Desktop.
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
<div class="row"> | |
<div class="span12"> | |
<h2>Registration</h2> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="span6"> | |
<div style="border: 0px #ddd solid;"> | |
<%= simple_form_for resource, | |
as: resource_name, | |
url: registration_path(resource_name), | |
#method: 'post', | |
html: {class: ''} do |f| | |
%> | |
<%= f.error_notification %> | |
<% | |
# debugger | |
# true | |
%> | |
<div class="form-inputs"> | |
<%= f.input :first_name, autofocus: true %> | |
<%= f.input :last_name %> | |
<%= f.input :location, | |
required: true, | |
alt: 'This is a test', | |
hint: '*The more specific your location, the easier it is to find great stuff', | |
input_html: { | |
alt: 'this is a test', | |
class: 'input-xlarge' | |
} | |
%> | |
<%= f.input :email, required: true %> | |
<%= f.input :password, required: true %> | |
<%= f.input :password_confirmation %> | |
</div> | |
<div class="form-actions"> | |
<%= f.button :submit, 'Submit' %> | |
</div> | |
<% end %> | |
</div> | |
</div> | |
<div class="span6"> | |
<div id="map_container" style="border: 1px #ddd solid; height: 400px;"> | |
</div> | |
</div> | |
</div> | |
<% content_for :scripts do %> | |
<script> | |
$(function() { | |
locationInputEl = $('#user_location'); | |
window.regMapView = new MommyNearest.Views.Maps.RegistrationMapView({ | |
center: { | |
lat: <%= resource.latitude ? resource.latitude : 40.7143528 %>, | |
lng: <%= resource.longitude ? resource.longitude : -74.0059731 %> | |
}, | |
locationInputEl: locationInputEl | |
}); | |
$('#map_container').append(window.regMapView.el); | |
window.regMapView.render(); | |
}); | |
</script> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment