/ the form is only used for new records and would require changes if you want to use it for editing. = form_for(@post) do |f| / Display errors - if @post.errors.any? = render partial: 'layouts/errors', locals: { errors: @post.errors } = f.hidden_field :media_type, value: 'image' / Rules title .dnp-warning h4 == t('posts.new.rules.title', rules: link_to(t('posts.new.rules.rules'), '/pages/rules')) / Captcha forced? Let him know and put the relevant tags in the form. - if !current_user && Flipflop.enabled?(:captcha) p strong<> Sorry, but due to spam, anonymous uploaders need to fill this out. | If you're logged in, you can still post anonymously and won't have to deal with captchas! => captcha_tags / Warning to check for dupes p strong | Please check it isn't already here with =< link_to 'reverse search.', search_reverse_path / Render the main upload form = render partial: 'layouts/image_upload', locals: { form: f, field: :file, show_paste_field: true } / About section h4 = t('posts.new.about.title') / Source .field p= f.label :source_url, t('posts.new.about.source.subtitle') => f.url_field :source_url, class: 'input input--wide js-image-input', placeholder: t('posts.new.about.source.placeholder') / Tags .field p label for="image[tag_input]" == t('posts.new.tags.title') = render partial: 'tags/tag_editor', locals: { f: f, name: :tag_input, type: :upload } button.button.button--state-success.button--separate-left.button--bold id="tagsinput-save" type="button" title="This button saves the tags listed above to your browser, allowing you to retrieve them again by clicking the Load button" Save button.button.button--state-warning.button--separate-left.button--bold id="tagsinput-load" type="button" title="This button loads any saved tags from your browser" Load button.button.button--state-danger.button--separate-left.button--bold id="tagsinput-clear" type="button" title="This button will clear the list of tags above" Clear / Quick tag table p = t('posts.new.tags.quick.title') = render partial: 'tags/quick_tag_table', locals: { target: '[name="post[tag_input]"]' } / Description br .field .block .block__header.block__header--js-tabbed = link_to t('posts.attributes.description'), '#', class: 'selected', data: { click_tab: 'write' } = link_to t('posts.attributes.preview'), '#', data: { click_tab: 'preview' } .block__tab.selected data-tab="write" = render partial: 'layouts/textile_toolbar' = f.text_area :description, class: 'input input--wide input--text js-preview-description js-image-input js-toolbar-input', placeholder: t('posts.new.description.placeholder') .block__tab.hidden data-tab="preview" | Loading preview... / Anonymous checkbox - if current_user .field = f.label :anonymous, t(force_anonymous? ? 'booru.post_anonymously_forced' : 'booru.post_anonymously') = f.check_box :anonymous, {class: 'checkbox', disabled: force_anonymous?, checked: force_anonymous?} / Submit button .actions = f.submit class: 'button', autocomplete: 'off', data: { disable_with: 'Please wait...' }