Use InputGroup in impersonate and password reset dialogs

This commit is contained in:
Johannes Zellner
2025-02-16 16:25:44 +01:00
parent dc98c2c1fe
commit 270d27be73
3 changed files with 15 additions and 11 deletions
-2
View File
@@ -50,8 +50,6 @@ async function onSubmit() {
defineExpose({
async open(g = null) {
console.log(g)
group.value = g;
name.value = g ? g.name : '';
@@ -1,7 +1,7 @@
<script setup>
import { ref, useTemplateRef } from 'vue';
import { Dialog, TextInput, FormGroup, Button } from 'pankow';
import { Dialog, TextInput, FormGroup, Button, InputGroup } from 'pankow';
import { copyToClipboard } from 'pankow/utils';
import UsersModel from '../models/UsersModel.js';
@@ -74,9 +74,11 @@ defineExpose({
<fieldset :disabled="busy">
<FormGroup>
<label for="passwordInput">{{ $t('users.setGhostDialog.password') }}</label>
<TextInput id="passwordInput" v-model="password" />
<Button tool v-if="success" @click="onCopyPassword()" icon="fa fa-clipboard" />
<Button tool v-else @click="onGeneratePassword()" v-tooltip="$t('users.setGhostDialog.generatePassword')" icon="fa fa-key" />
<InputGroup>
<TextInput id="passwordInput" v-model="password" style="flex-grow: 1;"/>
<Button tool v-if="success" @click="onCopyPassword()" icon="fa fa-clipboard" />
<Button tool v-else @click="onGeneratePassword()" v-tooltip="$t('users.setGhostDialog.generatePassword')" icon="fa fa-key" />
</InputGroup>
</FormGroup>
</fieldset>
</form>
@@ -5,7 +5,7 @@ const i18n = useI18n();
const t = i18n.t;
import { ref, useTemplateRef } from 'vue';
import { Dialog, TextInput, FormGroup, Button } from 'pankow';
import { Dialog, TextInput, FormGroup, Button, InputGroup } from 'pankow';
import { copyToClipboard } from 'pankow/utils';
import UsersModel from '../models/UsersModel.js';
@@ -62,8 +62,10 @@ defineExpose({
>
<FormGroup>
<label class="control-label">{{ $t('users.passwordResetDialog.descriptionLink') }}</label>
<TextInput id="passwordResetLinkInput" v-model="resetLink" readonly/>
<Button tool @click="onCopyLink()" icon="fa fa-clipboard" />
<InputGroup>
<TextInput id="passwordResetLinkInput" style="flex-grow: 1;" v-model="resetLink" readonly/>
<Button tool @click="onCopyLink()" icon="fa fa-clipboard" />
</InputGroup>
</FormGroup>
<br/>
@@ -75,8 +77,10 @@ defineExpose({
<FormGroup>
<label for="emailInput">{{ $t('users.passwordResetDialog.descriptionEmail') }}</label>
<TextInput id="emailInput" v-model="email" :disabled="busy" />
<Button @click="onSend()" :disabled="busy" :loading="busy">{{ $t('users.passwordResetDialog.sendAction') }}</Button>
<InputGroup>
<TextInput id="emailInput" style="flex-grow: 1;" v-model="email" :disabled="busy" />
<Button @click="onSend()" :disabled="busy" :loading="busy">{{ $t('users.passwordResetDialog.sendAction') }}</Button>
</InputGroup>
</FormGroup>
</fieldset>
</form>