fix: copy invitation
This commit is contained in:
parent
52d84c5e9e
commit
1ff1664b6c
@ -22,19 +22,20 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<input value="{{ $value }}" {{ $attributes->merge(['class' => $defaultClass . ' pl-10']) }} @required($required)
|
<input value="{{ $value }}" {{ $attributes->merge(['class' => $defaultClass . ' pl-10']) }}
|
||||||
wire:model={{ $id }} wire:dirty.class.remove='text-white' wire:dirty.class="input-warning"
|
@required($required) @if ($id !== 'null') wire:model={{ $id }} @endif
|
||||||
wire:loading.attr="disabled" type="{{ $type }}" @readonly($readonly) @disabled($disabled)
|
wire:dirty.class.remove='text-white' wire:dirty.class="input-warning" wire:loading.attr="disabled"
|
||||||
id="{{ $id }}" name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"
|
type="{{ $type }}" @readonly($readonly) @disabled($disabled) id="{{ $id }}"
|
||||||
|
name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"
|
||||||
aria-placeholder="{{ $attributes->get('placeholder') }}">
|
aria-placeholder="{{ $attributes->get('placeholder') }}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<input @if($value) value="{{ $value }}" @endif {{ $attributes->merge(['class' => $defaultClass]) }} @required($required)
|
<input @if ($value) value="{{ $value }}" @endif
|
||||||
@readonly($readonly) wire:model={{ $id }} wire:dirty.class.remove='text-white'
|
{{ $attributes->merge(['class' => $defaultClass]) }} @required($required) @readonly($readonly)
|
||||||
wire:dirty.class="input-warning" wire:loading.attr="disabled" type="{{ $type }}"
|
@if ($id !== 'null') wire:model={{ $id }} @endif wire:dirty.class.remove='text-white' wire:dirty.class="input-warning"
|
||||||
@disabled($disabled) id="{{ $id }}" name="{{ $name }}"
|
wire:loading.attr="disabled" type="{{ $type }}" @disabled($disabled)
|
||||||
placeholder="{{ $attributes->get('placeholder') }}">
|
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}">
|
||||||
@endif
|
@endif
|
||||||
@if (!$label && $helper)
|
@if (!$label && $helper)
|
||||||
<x-helper :helper="$helper" />
|
<x-helper :helper="$helper" />
|
||||||
|
@ -18,8 +18,12 @@
|
|||||||
<td>{{ $invite->email }}</td>
|
<td>{{ $invite->email }}</td>
|
||||||
<td>{{ $invite->via }}</td>
|
<td>{{ $invite->via }}</td>
|
||||||
<td>{{ $invite->role }}</td>
|
<td>{{ $invite->role }}</td>
|
||||||
<td x-on:click="copyToClipboard('{{ $invite->link }}')">
|
<td class="flex gap-2" x-data="checkProtocol">
|
||||||
<x-forms.button>Copy Invitation Link</x-forms.button>
|
<template x-if="isHttps">
|
||||||
|
<x-forms.button x-on:click="copyToClipboard('{{ $invite->link }}')">Copy Invitation
|
||||||
|
Link</x-forms.button>
|
||||||
|
</template>
|
||||||
|
<x-forms.input id="null" type="password" value="{{ $invite->link }}" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<x-forms.button wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
|
<x-forms.button wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
|
||||||
@ -31,6 +35,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@script
|
||||||
|
<script>
|
||||||
|
Alpine.data('checkProtocol', () => {
|
||||||
|
return {
|
||||||
|
isHttps: window.location.protocol === 'https:'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endscript
|
||||||
|
Loading…
x
Reference in New Issue
Block a user