mailwolt/resources/views/livewire/ui/mail/modal/mailbox-create-modal.blade.php

104 lines
4.3 KiB
PHP

<div class="mw-modal-frame">
<div class="mw-modal-head">
<div class="mw-modal-title-wrap">
<h2 class="mw-modal-title">Neues Postfach</h2>
</div>
<button wire:click="$dispatch('closeModal')" class="mw-modal-close">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M2 2l10 10M12 2L2 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
</button>
</div>
<div class="mw-modal-body">
@if(!$can_create)
<div class="mw-modal-warn">{{ $block_reason }}</div>
@endif
<div class="mw-modal-grid2" style="align-items:start;">
<div class="mw-modal-row">
<label class="mw-modal-label">Domain</label>
<select wire:model.live="domain_id" class="mw-modal-input" autocomplete="off">
@foreach($domains as $d)
<option value="{{ $d['id'] }}">{{ $d['domain'] }}</option>
@endforeach
</select>
<div class="mw-modal-hint">&nbsp;</div>
@error('domain_id')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
<div class="mw-modal-row">
<label class="mw-modal-label">Benutzername</label>
<input type="text" wire:model.live="localpart" placeholder="z. B. office"
autocomplete="off" autocorrect="off" spellcheck="false"
class="mw-modal-input">
<div class="mw-modal-hint">Nur Buchstaben, Zahlen und .-_+"</div>
@error('localpart')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
</div>
<div class="mw-modal-row">
<label class="mw-modal-label">Anzeigename (optional)</label>
<input type="text" wire:model="display_name" placeholder="z. B. Max Mustermann"
autocomplete="off" class="mw-modal-input">
@error('display_name')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
@if($email_preview)
<div class="mw-modal-preview">
<span class="mw-modal-preview-label">Adresse:</span>
<span>{{ $email_preview }}</span>
</div>
@endif
<hr class="mw-modal-sep">
<div class="mw-modal-grid2" style="align-items:start;">
<div class="mw-modal-row">
<label class="mw-modal-label">Passwort</label>
<input type="password" wire:model="password" placeholder="mind. 8 Zeichen"
autocomplete="new-password" class="mw-modal-input">
<div class="mw-modal-hint">Leer lassen, wenn extern gesetzt wird.</div>
@error('password')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
<div class="mw-modal-row">
<label class="mw-modal-label">Quota (MiB)</label>
<input type="number" min="0" wire:model.live="quota_mb"
autocomplete="off" class="mw-modal-input">
<div class="mw-modal-hint">{{ $quota_hint ?: '0 = unbegrenzt' }}</div>
@error('quota_mb')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
</div>
<div class="mw-modal-grid2" style="align-items:center;">
<div class="mw-modal-row">
<label class="mw-modal-label">Mails pro Stunde (optional)</label>
<input type="number" min="1" wire:model="rate_limit_per_hour" placeholder="z. B. 120"
autocomplete="off"
@if($rate_limit_readonly) readonly disabled @endif
class="mw-modal-input">
@if($rate_limit_readonly)
<div class="mw-modal-hint">Von der Domain vorgegeben.</div>
@else
<div class="mw-modal-hint">&nbsp;</div>
@endif
@error('rate_limit_per_hour')<div class="mw-modal-error">{{ $message }}</div>@enderror
</div>
<div>
<label class="mw-modal-check">
<input type="checkbox" wire:model="is_active">
<span class="mw-modal-check-label">Postfach aktivieren</span>
</label>
</div>
</div>
</div>
<div class="mw-modal-foot">
<button type="button" wire:click="$dispatch('closeModal')" class="mw-btn-cancel">Abbrechen</button>
<button type="submit" wire:click="$dispatch('mailbox:create')" @disabled(!$can_create) class="mw-btn-save">
Speichern
</button>
</div>
</div>