Skip to content

Commit

Permalink
Swapped import and create template forms to address wording problems of
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Jun 26, 2012
1 parent 1b621d5 commit 3017dab
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 48 deletions.
46 changes: 32 additions & 14 deletions app/views/templates/_create_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,40 @@
</div>
<% end %>

<div class="field">
<%= label_tag :package %><br />
<%= file_field_tag :package %>
</div>
<hr />
<div class="field">
<%= label_tag :image %><br />
<%= file_field_tag :image %>
</div>
<div class="field">
<%= label_tag :descriptor %><br />
<%= file_field_tag :descriptor %>
</div>
<fieldset>
<div class="clearfix">
<%= f.label :name %>
<div class="input">
<%= f.text_field :name %>
</div>
</div>

<div class="clearfix">
<%= f.label :author %>
<div class="input">
<%= f.text_field :author %>
</div>
</div>

<div class="clearfix">
<%= f.label "Background Image" %>
<div class="input">
<%= f.fields_for :media do |media| %>
<%= media.file_field :file %>
<% end %>
</div>
</div>

<div class="clearfix">
<div class="input">
<%= f.check_box :is_hidden %> <%= f.label :is_hidden, "Hide this template from being shown in lists" %>
</div>
</div>

</fieldset>


<div class="actions">
<div class="submit_bar actions">
<%= f.submit("Import Template") %>
</div>
<% end %>
44 changes: 13 additions & 31 deletions app/views/templates/_import_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,19 @@
</div>
<% end %>

<fieldset>
<div class="clearfix">
<%= f.label :name %>
<div class="input">
<%= f.text_field :name %>
</div>
</div>

<div class="clearfix">
<%= f.label :author %>
<div class="input">
<%= f.text_field :author %>
</div>
</div>

<div class="clearfix">
<%= f.label :is_hidden %>
<div class="input">
<%= f.check_box :is_hidden %>
</div>
</div>

<div class="clearfix">
<%= f.label "Upload Background" %>
<div class="input">
<%= f.fields_for :media do |media| %>
<%= media.file_field :file %>
<% end %>
</div>
</div>
</fieldset>
<div class="field">
<%= label_tag :package %><br />
<%= file_field_tag :package %>
</div>
<hr />
<div class="field">
<%= label_tag :image %><br />
<%= file_field_tag :image %>
</div>
<div class="field">
<%= label_tag :descriptor %><br />
<%= file_field_tag :descriptor %>
</div>


<div class="actions">
Expand Down
3 changes: 0 additions & 3 deletions app/views/templates/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

<section class="C no">
<header id="template-header">
<%= back_button "#", :back %>
<h1><%= @type.capitalize + " Template" %></h1>
</header>
<div class="C-cont">
Expand All @@ -43,8 +42,6 @@
<% end %>

</article>
<aside>
</aside>
<div class="clear"></div>
</div>
</section>

0 comments on commit 3017dab

Please sign in to comment.