Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2022-11-17 21:29:14 +00:00
commit efc892cf5e
6 changed files with 13 additions and 12 deletions

View file

@ -22,7 +22,7 @@ class CheckoutLicenseToAllUsers extends Command
*
* @var string
*/
protected $description = 'Command description';
protected $description = 'Checks out licenses to all users';
/**
* Create a new command instance.

View file

@ -85,6 +85,7 @@ class ActionlogsTransformer
'id' => (int) $actionlog->item->id,
'name' => ($actionlog->itemType()=='user') ? e($actionlog->item->getFullNameAttribute()) : e($actionlog->item->getDisplayNameAttribute()),
'type' => e($actionlog->itemType()),
'serial' =>e($actionlog->item->serial) ? e($actionlog->item->serial) : null
] : null,
'location' => ($actionlog->location) ? [
'id' => (int) $actionlog->location->id,

View file

@ -48,7 +48,11 @@ class CustomField extends Model
*
* @var array
*/
protected $rules = [];
protected $rules = [
'name' => 'required|unique:custom_fields',
'element' => 'required|in:text,listbox,textarea,checkbox,radio',
'field_encrypted' => 'nullable|boolean',
];
/**
* The attributes that are mass assignable.
@ -357,15 +361,9 @@ class CustomField extends Model
public function validationRules($regex_format = null)
{
return [
'name' => 'required|unique:custom_fields',
'element' => [
'required',
Rule::in(['text', 'listbox', 'textarea', 'checkbox', 'radio']),
],
'format' => [
Rule::in(array_merge(array_keys(self::PREDEFINED_FORMATS), self::PREDEFINED_FORMATS, [$regex_format])),
],
'field_encrypted' => 'nullable|boolean',
]
];
}

View file

@ -3,8 +3,8 @@
{{ trans('mail.the_following_item') }}
@if ($item->getImageUrl())
<center><img src="{{ app\Models\Setting::getSettings()->show_images_in_email =='1' && $item->getImageUrl() }}" alt="Asset" style="max-width: 570px;"></center>
@if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl())
<center><img src="{{ $item->getImageUrl() }}" alt="Asset" style="max-width: 570px;"></center>
@endif
@component('mail::table')

View file

@ -49,6 +49,7 @@
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
<th class="col-sm-2" data-field="file" data-visible="false" data-formatter="fileUploadNameFormatter">{{ trans('general.file_name') }}</th>
<th class="col-sm-1" data-field="type" data-formatter="itemTypeFormatter">{{ trans('general.type') }}</th>
<th class="col-sm-3" data-field="item.serial" data-visible="false">{{ trans('admin/hardware/table.serial') }}</th>
<th class="col-sm-3" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
<th class="col-sm-2" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.to') }}</th>
<th class="col-sm-1" data-field="note">{{ trans('general.notes') }}</th>

View file

@ -935,6 +935,7 @@
@if ($snipeSettings->require_accept_signature=='1')
<th class="col-md-3" data-field="signature_file" data-visible="false" data-formatter="imageFormatter">{{ trans('general.signature') }}</th>
@endif
<th class="col-sm-3" data-field="item.serial" data-visible="false">{{ trans('admin/hardware/table.serial') }}</th>
<th class="col-sm-3" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
<th class="col-sm-2" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.target') }}</th>
</tr>