]> cat aescling's git repositories - mastodon.git/commitdiff
add login form to landing page if regs are closed
authorOndřej Hruška <ondra@ondrovo.com>
Fri, 29 Sep 2017 14:41:18 +0000 (16:41 +0200)
committerOndřej Hruška <ondra@ondrovo.com>
Fri, 29 Sep 2017 14:41:18 +0000 (16:41 +0200)
app/views/about/show.html.haml

index 737dbbcef9295b46ed7294e23427d4aa57a3b6a0..c0fa944ae067a5a62ac90adb796cade16e8296ad 100644 (file)
                 %p= t('about.closed_registrations')
               - else
                 = @instance_presenter.closed_registrations_message.html_safe
+
+            = simple_form_for(:user, html: { style: 'margin-left: -20px' }, url: session_path(:user)) do |f|
+              = f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }
+              = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
+
+              .actions
+                = f.button :button, t('auth.login'), type: :submit
             = link_to t('about.find_another_instance'), 'https://joinmastodon.org/', class: 'button button-alternative button--block'
 
   .about-short
This page took 0.028761 seconds and 3 git commands to generate.