mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Add disabled attribute to fields
This commit is contained in:
parent
ea441c240b
commit
8c9eb126a4
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" type="checkbox" :id="id" v-model="checkboxValue" @change="emitChange">
|
||||
<input class="custom-control-input" type="checkbox"
|
||||
:id="id"
|
||||
v-model="checkboxValue"
|
||||
@change="emitChange"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<label class="custom-control-label" :for="id">{{ docfield.label }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,19 +1,12 @@
|
||||
<template>
|
||||
<div class="form-group" v-if="!onlyInput">
|
||||
<label>{{ docfield.label }}</label>
|
||||
<div :class="{'form-group': !onlyInput}">
|
||||
<label v-if="!onlyInput">{{ docfield.label }}</label>
|
||||
<flat-pickr
|
||||
:value="value"
|
||||
class="form-control"
|
||||
@on-change="emitChange">
|
||||
</flat-pickr>
|
||||
</div>
|
||||
<flat-pickr
|
||||
v-else
|
||||
:value="value"
|
||||
class="form-control"
|
||||
@on-change="emitChange"
|
||||
>
|
||||
</flat-pickr>
|
||||
</template>
|
||||
<script>
|
||||
import flatPickr from 'vue-flatpickr-component';
|
||||
|
@ -38,7 +38,8 @@ export default {
|
||||
id: this.id,
|
||||
type: 'file',
|
||||
value: this.value,
|
||||
required: this.docfield.required
|
||||
required: this.docfield.required,
|
||||
disabled: this.disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ export default {
|
||||
id: this.id,
|
||||
type: 'password',
|
||||
value: this.value,
|
||||
required: this.docfield.required
|
||||
required: this.docfield.required,
|
||||
disabled: this.disabled
|
||||
};
|
||||
},
|
||||
}
|
||||
|
@ -9,7 +9,8 @@ export default {
|
||||
getInputAttrs() {
|
||||
return {
|
||||
id: this.id,
|
||||
required: this.docfield.required
|
||||
required: this.docfield.required,
|
||||
disabled: this.disabled
|
||||
};
|
||||
},
|
||||
getInputChildren(h) {
|
||||
|
Loading…
Reference in New Issue
Block a user