aboutsummaryrefslogtreecommitdiff
path: root/app/views/resources/edit.html.erb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-06 21:59:13 +0200
committerhellekin <hellekin@cepheide.org>2020-10-06 21:59:13 +0200
commitcf6b277ca3f22e575b059a8d8029163ddcee86db (patch)
tree960074763696f58860f2a57d009c3dba90fe1e6a /app/views/resources/edit.html.erb
parent8c7c0501e49871765d6ac971e4027dac0ea20407 (diff)
downloadincommon-map-cf6b277ca3f22e575b059a8d8029163ddcee86db.tar.gz
Fix form, add flash
Diffstat (limited to 'app/views/resources/edit.html.erb')
-rw-r--r--app/views/resources/edit.html.erb15
1 files changed, 12 insertions, 3 deletions
diff --git a/app/views/resources/edit.html.erb b/app/views/resources/edit.html.erb
index 7e9799f..fa61a0a 100644
--- a/app/views/resources/edit.html.erb
+++ b/app/views/resources/edit.html.erb
@@ -1,6 +1,15 @@
-<%= form_with model: @resource do |f| %>
- <%= f.label :name, "Name of this Resource" %>
- <%= f.text_field :name %>
+<%= form_with model: @resource, local: true do |f| %>
+ <%= f.label :name %>
+ <%= f.text_field :name, value: @resource.name %>
+
+
+ <%= tag.legend "Geographic Position" %>
+ <%= f.label :longitude %>
+ <%= f.text_field :longitude, value: @resource.lon %>
+ <%= f.label :latitude %>
+ <%= f.text_field :latitude, value: @resource.lat %>
+
+
<%= f.submit 'Save' %>
<% end %>