Updated language, nicer form

This commit is contained in:
snipe
2026-04-16 13:37:31 +01:00
parent 40ec0627c4
commit 9c610f51af
4 changed files with 21 additions and 6 deletions
+7
View File
@@ -2,6 +2,7 @@
namespace App\Livewire;
use App\Models\Setting;
use Livewire\Attributes\Computed;
use Livewire\Component;
@@ -45,4 +46,10 @@ class CategoryEditForm extends Component
{
return (bool) $this->useDefaultEula;
}
#[Computed]
public function isGlobalSignatureRequired(): bool
{
return (string) Setting::getSettings()->require_accept_signature === '1';
}
}
@@ -9,7 +9,7 @@ return [
'edit' => 'Edit Accessory',
'eula_text' => 'Category EULA',
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
'require_acceptance' => 'Require users to confirm acceptance of item in this category.',
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
'total' => 'Total',
'remaining' => 'Avail',
@@ -17,6 +17,7 @@ return [
'name' => 'Category Name',
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.',
'global_signature_required_notice' => 'User signatures are currently required globally via the admin settings, so signatures will still be required regardless of this category setting if the item is checked out to a user (versus a location, etc).',
'required_eula' => 'This user will be emailed a copy of the EULA',
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
'update' => 'Update Category',
@@ -2,7 +2,7 @@
<!-- EULA text -->
<div class="form-group {{ $errors->has('eula_text') ? 'error' : '' }}">
<label for="eula_text" class="col-md-3 control-label">{{ trans('admin/categories/general.eula_text') }}</label>
<div class="col-md-7">
<div class="col-md-8">
<x-input.textarea
name="eula_text"
wire:model.live.change.live="eulaText"
@@ -20,7 +20,7 @@
<!-- Use default checkbox -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="col-md-8 col-md-offset-3">
@if ($defaultEulaText!='')
<label class="form-control">
<input
@@ -50,7 +50,7 @@
<!-- Require Acceptance -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input
type="checkbox"
@@ -61,12 +61,19 @@
/>
{{ trans('admin/categories/general.require_acceptance') }}
</label>
@if ($this->isGlobalSignatureRequired)
<p class="help-block">
<x-icon type="tip"/>
{{ trans('admin/categories/general.global_signature_required_notice') }}
</p>
@endif
</div>
</div>
@if ($requireAcceptance)
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input
type="checkbox"
@@ -82,7 +89,7 @@
<!-- Email on Checkin -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input
type="checkbox"