Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/AclInput.vue
<template> | <template> | ||||
<div class="list-input acl-input" :id="id"> | <div class="list-input acl-input" :id="id"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
<select class="form-select mod mod-user" @change="changeMod" v-model="mod"> | <select v-if="!useronly" class="form-select mod mod-user" @change="changeMod" v-model="mod"> | ||||
<option value="user">{{ $t('form.user') }}</option> | <option value="user">{{ $t('form.user') }}</option> | ||||
<option value="anyone">{{ $t('form.anyone') }}</option> | <option value="anyone">{{ $t('form.anyone') }}</option> | ||||
</select> | </select> | ||||
<input :id="id + '-input'" type="text" class="form-control main-input" :placeholder="$t('form.email')" @keydown="keyDown"> | <input :id="id + '-input'" type="text" class="form-control main-input" :placeholder="$t('form.email')" @keydown="keyDown"> | ||||
<select class="form-select acl" v-model="perm"> | <select class="form-select acl" v-model="perm"> | ||||
<option v-for="t in types" :key="t" :value="t">{{ $t('form.acl-' + t) }}</option> | <option v-for="t in types" :key="t" :value="t">{{ $t('form.acl-' + t) }}</option> | ||||
</select> | </select> | ||||
<a href="#" class="btn btn-outline-secondary" @click.prevent="addItem"> | <a href="#" class="btn btn-outline-secondary" @click.prevent="addItem"> | ||||
Show All 11 Lines | <div class="list-input acl-input" :id="id"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
export default { | export default { | ||||
props: { | props: { | ||||
list: { type: Array, default: () => [] }, | list: { type: Array, default: () => [] }, | ||||
id: { type: String, default: '' } | id: { type: String, default: '' }, | ||||
useronly: { type: Boolean, default: false } | |||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
mod: 'user', | mod: 'user', | ||||
perm: 'read-only', | perm: 'read-only', | ||||
types: [ 'read-only', 'read-write', 'full' ] | types: [ 'read-only', 'read-write', 'full' ] | ||||
} | } | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |