diff app/views/pastes/_form.html.erb @ 379:2ad092e60975

[mq]: new-design
author nanaya <me@myconan.net>
date Sun, 07 Jun 2015 02:35:12 +0900
parents 5ca896a5ddef
children 2ddd61aca2c8
line wrap: on
line diff
--- a/app/views/pastes/_form.html.erb	Sat Jun 06 22:36:32 2015 +0900
+++ b/app/views/pastes/_form.html.erb	Sun Jun 07 02:35:12 2015 +0900
@@ -1,21 +1,35 @@
 <%= form_for @paste do |f| %>
-  <div class="form-group">
-    <%= f.text_area :paste, :rows => 10, :class => "form-control" %>
+  <%= render "shared/filter_spam" %>
+  <div id="paste-form">
+    <%= f.text_area :paste, :rows => 10, :autofocus => true %>
   </div>
 
-  <div class="form-group">
-    <%= f.label :key, "Deletion key", class: "control-label" %>
-    <div class="row"><div class="col-sm-3">
-      <%= f.text_field :key, :class => "form-control" %>
-    </div></div>
+  <div id="paste-control">
+    <div class="inputs left">
+
+      <div class="vertical-flex">
+        <%= f.label :key, "Deletion key", :class => "form-label" %>
+        <%= f.text_field :key %>
+      </div>
+
+      <div class="vertical-flex">
+        <div class="form-label">Privacy</div>
+        <label class="radio">
+          <%= f.radio_button :is_private, "0" %>
+          <span>Public</span>
+        </label>
+
+        <label class="radio">
+          <%= f.radio_button :is_private, "1" %>
+          <span>Private</span>
+        </label>
+      </div>
+    </div>
+
+    <div class="inputs right">
+      <%= f.button %>
+
+      <%= button_tag "Clear", :type => "button", :id => "reset_paste" %>
+    </div>
   </div>
-  <%= render 'shared/filter_spam' %>
-  <div class="checkbox">
-    <%= f.label :is_private do %>
-      <%= f.check_box :is_private %>
-      Private
-    <% end %>
-  </div>
-  <%= f.button :class => 'btn btn-primary' %>
-  <%= link_to 'Clear', root_path, :class => 'btn btn-danger', :id => 'reset_paste' %>
 <% end %>