Skip to content
Snippets Groups Projects
Commit 3f2727e7 authored by abdu's avatar abdu
Browse files

fix sign-up input fields "disabled" attribute not working properly, update some texts

parent 659e21e0
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,15 @@ export default {
return this.user.userName === '' || this.user.password === ''
},
checkPasswordSame(){
console.log("pw length: " + this.repeatedPassword.length + "\n not same? " + (this.repeatedPassword !== this.user.password))
if(this.repeatedPassword.length > 1 && this.repeatedPassword !== this.user.password){
return true
let pw = this.user.password
let pw_repeated = this.repeatedPassword
if(pw.length > 0 || pw_repeated > 0){
return this.user.password.length === this.repeatedPassword.length
}
return false
return null
}
},
methods: {
......@@ -104,9 +107,9 @@ export default {
<!-- sign-up modal -->
<b-modal class="signup-modal" :ok-disabled="checkEmptyFieldsSignup" @ok="signUp" hide-header id="signup-modal">
<b-input v-model="user.userName" class="mb-4 mt-4" id="signup-username" type="text" placeholder="enter username"></b-input>
<b-input v-model="user.password" class="mb-4" id="signup-password" type="password" placeholder="enter password"></b-input>
<b-input :state="checkPasswordSame" v-model="repeatedPassword" class="mb-4" id="signup-repeat-password" type="password" placeholder="repeat password"></b-input>
<b-input required v-model="user.userName" class="mb-4 mt-4" id="signup-username" type="text" placeholder="enter username"></b-input>
<b-input required v-model="user.password" class="mb-4" id="signup-password" type="password" placeholder="enter password"></b-input>
<b-input required :state="checkPasswordSame" v-model="repeatedPassword" class="mb-4" id="signup-repeat-password" type="password" placeholder="repeat password"></b-input>
</b-modal>
<!-- sign-in modal -->
......
......@@ -160,7 +160,7 @@ export default {
<b-row>
<b-col>
<b-button class="mb-4" variant="primary" @click="showAddModal = true">
Hinzufügen
Add new ToDo
</b-button>
</b-col>
<b-col>
......@@ -217,12 +217,12 @@ export default {
<p>{{this.todoIdForDeleteModal}}</p>
</b-modal>
<b-modal v-model="showAddModal" title="Neuen Namen hinzufügen" @ok="addTodo" hide-header id="showAddModal">
<b-form-group label="Titel">
<b-form-input v-model="todo.title" placeholder="Name eingeben"></b-form-input>
<b-modal v-model="showAddModal" title="add title" @ok="addTodo" hide-header id="showAddModal">
<b-form-group label="Title">
<b-form-input required v-model="todo.title" placeholder="todo title"></b-form-input>
</b-form-group>
<b-form-group label="Beschreibung">
<b-form-input v-model="todo.description" placeholder="Beschreibung eingeben"></b-form-input>
<b-form-group label="Description">
<b-form-input v-model="todo.description" placeholder="todo description"></b-form-input>
</b-form-group>
</b-modal>
</b-card-body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment