diff --git a/app/javascript/src/styles/specific/uploads.scss b/app/javascript/src/styles/specific/uploads.scss
index 8920f9c19..b28bf46a0 100644
--- a/app/javascript/src/styles/specific/uploads.scss
+++ b/app/javascript/src/styles/specific/uploads.scss
@@ -2,7 +2,6 @@ div#c-uploads {
div#a-new {
.artist-commentary {
margin-top: 1em;
- margin-left: 1em;
}
div#upload-guide-notice {
@@ -15,31 +14,33 @@ div#c-uploads {
div#related-posts-by-source, div#iqdb-similar {
display: inline-block;
-
- .hint {
- white-space: nowrap;
- max-width: 100%;
- }
}
- label[for="upload_as_pending"] {
+ div.upload_source {
+ display: inline-block;
+ }
+
+ div.upload_rating .radio label {
+ font-weight: normal;
display: inline;
- }
+ margin-right: 2em;
- fieldset.ratings {
- label {
- display: inline;
+ input {
+ margin-right: 0.5em;
}
}
- textarea {
- margin-bottom: 0.25em;
+ textarea#upload_tag_string {
width: 100%;
}
div.field_with_errors {
display: inline;
}
+
+ #related-tags-container {
+ margin-top: 1em;
+ }
}
div#a-index {
diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb
index 7a0fcf36f..a35a0527a 100644
--- a/app/views/uploads/new.html.erb
+++ b/app/views/uploads/new.html.erb
@@ -17,77 +17,38 @@
- <%= form_for(@upload, :html => {:multipart => true, :class => "simple_form", :id => "form"}) do |f| %>
- <%= f.hidden_field :md5_confirmation %>
- <%= f.hidden_field :referer_url, value: params[:ref] %>
+ <%= simple_form_for(@upload, html: { id: "form" }) do |f| %>
+ <%= f.input :md5_confirmation, as: :hidden %>
+ <%= f.input :referer_url, as: :hidden, input_html: { value: params[:ref] } %>
<% if CurrentUser.can_upload_free? %>
-
-
-
+ <%= f.input :as_pending, as: :boolean, label: "Upload for approval", input_html: { checked: params[:as_pending].present? } %>
<% end %>
-
- <%= f.label :file %>
- <%= f.file_field :file, :size => 50 %>
-
+ <%= f.input :file, as: :file, size: 50, wrapper_html: { class: "fallback" } %>
-
- <%= f.label :source %>
- <%= f.text_field :source, :size => 50, :value => params[:url] %>
- <%= button_tag "Similar", :id => "similar-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub" %>
-
You can enter a URL to have <%= Danbooru.config.app_name %> automatically download and process it
+
+ <%= f.input :source, as: :string, placeholder: "Enter the URL to upload here", input_html: { size: 50, value: params[:url] } %>
+ <%= tag.button "Similar", id: "similar-button" %>
-
- <%= f.label :rating %>
+ <%= f.input :rating, collection: [["Explicit", "e"], ["Questionable", "q"], ["Safe", "s"]], as: :radio_buttons, selected: params[:rating] %>
-
-
-
-
- <%= f.label :parent_id, "Parent ID" %>
- <%= f.text_field :parent_id, :value => params[:parent_id] %>
-
-
-
+
@@ -102,15 +63,11 @@
-
- <%= f.text_area :tag_string, :size => "60x5", :spellcheck => false, :"data-autocomplete" => "tag-edit", :"data-shortcut" => "e", :value => params[:tag_string] %>
-
+ <%= f.input :tag_string, label: false, input_html: { size: "60x5", "data-autocomplete": "tag-edit", "data-shortcut": "e", spellcheck: false, value: params[:tag_string] } %>
<%= render "related_tags/buttons" %>
-
- <%= submit_tag "Submit", :id => "submit-button", :class => "large ui-button ui-widget ui-corner-all", data: { disable_with: false } %>
-
+ <%= f.submit "Submit", id: "submit-button", data: { disable_with: false } %>
<%= render "related_tags/container" %>
<% end %>