From 50264410f541c8f9f3416bd0027fc199cb96e424 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Wed, 7 Nov 2018 16:56:12 +0100
Subject: Add login form back in.

---
 src/components/login_form/login_form.vue | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

(limited to 'src/components/login_form/login_form.vue')

diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue
index db389716..8a5174d7 100644
--- a/src/components/login_form/login_form.vue
+++ b/src/components/login_form/login_form.vue
@@ -5,7 +5,24 @@
       {{$t('login.login')}}
     </div>
     <div class="panel-body">
-      <form v-on:submit.prevent='oAuthLogin'  class="login-form">
+      <form v-if="loginMethod == 'password'" v-on:submit.prevent='submit(user)' class='login-form'>
+        <div class='form-group'>
+          <label for='username'>{{$t('login.username')}}</label>
+          <input :disabled="loggingIn" v-model='user.username' class='form-control' id='username' v-bind:placeholder="$t('login.placeholder')">
+        </div>
+        <div class='form-group'>
+          <label for='password'>{{$t('login.password')}}</label>
+          <input :disabled="loggingIn" v-model='user.password' class='form-control' id='password' type='password'>
+        </div>
+        <div class='form-group'>
+          <div class='login-bottom'>
+            <div><router-link :to="{name: 'registration'}" v-if='registrationOpen' class='register'>{{$t('login.register')}}</router-link></div>
+            <button :disabled="loggingIn" type='submit' class='btn btn-default'>{{$t('login.login')}}</button>
+          </div>
+        </div>
+      </form>
+
+      <form v-if="loginMethod == 'token'" v-on:submit.prevent='oAuthLogin'  class="login-form">
         <div class='form-group'>
           <div class='login-bottom'>
             <div><router-link :to="{name: 'registration'}" v-if='registrationOpen' class='register'>{{$t('login.register')}}</router-link></div>
-- 
cgit v1.2.3-70-g09d2

