From 7798532f1bae1031266db7490da2bcd38924c186 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 28 Jul 2014 22:37:33 -0500 Subject: [PATCH] Fix universe edit html for submission --- app/views/locations/_form.html.erb | 2 +- app/views/locations/edit.html.erb | 37 ++++++++-- app/views/universes/_form.html.erb | 112 ++++++++++++++--------------- 3 files changed, 88 insertions(+), 63 deletions(-) diff --git a/app/views/locations/_form.html.erb b/app/views/locations/_form.html.erb index 4d698472..a5490c31 100644 --- a/app/views/locations/_form.html.erb +++ b/app/views/locations/_form.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/locations/edit.html.erb b/app/views/locations/edit.html.erb index 2c070786..7b5593b9 100644 --- a/app/views/locations/edit.html.erb +++ b/app/views/locations/edit.html.erb @@ -1,8 +1,37 @@ <%- model_class = @location.class -%> -
- <%= render :partial => 'tabs' %> -
- <%= render :partial => 'edit_form' %> +
+
+
+

Facets

+ <%= render :partial => 'tabs' %> +
+ +
+

Danger-zone

+
+ <%= link_to 'Delete location forever', character_path, + :class => 'btn btn-danger', + :method => :delete, + :confirm => 'Are you sure? This action cannot be undone!' %> +
+
+
+ +
+
+

Editing <%= @location.name %>

+ <%= form_for @location, + :url => character_edit_process_path, + :html => { :class => 'form-horizontal' } do |form| %> +
+ <%= render :partial => 'form', :locals => { :f => form } %> +
+
+ <%= form.submit nil, :class => 'btn btn-primary' %> + <%= link_to 'Cancel', character_list_path, :class => 'btn' %> +
+ <% end %> +
diff --git a/app/views/universes/_form.html.erb b/app/views/universes/_form.html.erb index 26ddaa9e..ff81addd 100644 --- a/app/views/universes/_form.html.erb +++ b/app/views/universes/_form.html.erb @@ -1,66 +1,62 @@ -<%= form_for @universe, :url => universe_create_process_path, :html => { :class => 'form-horizontal' } do |f| %> -