Skip to content

A free open source IT asset/license management system

Updated language, nicer form

snipe9c610f51af0b
diff --git a/app/Livewire/CategoryEditForm.php b/app/Livewire/CategoryEditForm.php
index d50dab556d..4b574ed0c4 100644
--- a/app/Livewire/CategoryEditForm.php
+++ b/app/Livewire/CategoryEditForm.php
@@ -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';
+ }
}
diff --git a/resources/lang/en-US/admin/accessories/general.php b/resources/lang/en-US/admin/accessories/general.php
index f433c499f8..7d4653f06b 100644
--- a/resources/lang/en-US/admin/accessories/general.php
+++ b/resources/lang/en-US/admin/accessories/general.php
@@ -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',
diff --git a/resources/lang/en-US/admin/categories/general.php b/resources/lang/en-US/admin/categories/general.php
index c54da9242d..fb5e17bc66 100644
--- a/resources/lang/en-US/admin/categories/general.php
+++ b/resources/lang/en-US/admin/categories/general.php
@@ -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',
diff --git a/resources/views/livewire/category-edit-form.blade.php b/resources/views/livewire/category-edit-form.blade.php
index 1415f3b937..0c3da202f9 100644
--- a/resources/views/livewire/category-edit-form.blade.php
+++ b/resources/views/livewire/category-edit-form.blade.php
@@ -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"