From 454be01a6c1f4bc437c981793e9f5e7e481d9de6 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 28 Aug 2025 06:11:23 +0100 Subject: [PATCH 1/6] Updated translations Signed-off-by: snipe --- resources/lang/en-US/admin/users/general.php | 1 - resources/lang/en-US/general.php | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lang/en-US/admin/users/general.php b/resources/lang/en-US/admin/users/general.php index cecf786ce2..fa0f478d4b 100644 --- a/resources/lang/en-US/admin/users/general.php +++ b/resources/lang/en-US/admin/users/general.php @@ -24,7 +24,6 @@ return [ 'auto_assign_label' => 'Include this user when auto-assigning eligible licenses', 'auto_assign_help' => 'Skip this user in auto assignment of licenses', 'software_user' => 'Software Checked out to :name', - 'send_email_help' => 'You must provide an email address for this user to send them credentials. Emailing credentials can only be done on user creation. Passwords are stored in a one-way hash and cannot be retrieved once saved.', 'view_user' => 'View User :name', 'usercsv' => 'CSV file', 'two_factor_admin_optin_help' => 'Your current admin settings allow selective enforcement of two-factor authentication. ', diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 1d501ee616..39587bad70 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -160,7 +160,7 @@ return [ 'import' => 'Import', 'import_this_file' => 'Map fields and process this file', 'importing' => 'Importing', - 'importing_help' => 'You can import assets, accessories, licenses, components, consumables, and users via CSV file.

The CSV should be comma-delimited and formatted with headers that match the ones in the sample CSVs in the documentation.', + 'importing_help' => 'The CSV should be comma-delimited and formatted with headers that match the ones in the sample CSVs in the documentation.', 'import-history' => 'Import History', 'asset_maintenance' => 'Asset Maintenance', 'asset_maintenance_report' => 'Asset Maintenance Report', @@ -483,7 +483,9 @@ return [ 'update_existing_values' => 'Update Existing Values?', 'auto_incrementing_asset_tags_disabled_so_tags_required' => 'Generating auto-incrementing asset tags is disabled so all rows need to have the "Asset Tag" column populated.', 'auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created' => 'Note: Generating auto-incrementing asset tags is enabled so assets will be created for rows that do not have "Asset Tag" populated. Rows that do have "Asset Tag" populated will be updated with the provided information.', - 'send_welcome_email_to_users' => ' Send Welcome Email for new Users? Note that only users with a valid email address and who are marked as activated in your import file will received a welcome.', + 'send_welcome_email_to_users' => ' Send welcome email to new users', + 'send_welcome_email_help' => 'Only users with a valid email address and who are marked as activated in your import file will received a welcome email where they can reset their password.', + 'send_welcome_email_import_help' => 'Only new users with a valid email address and who are marked as activated in your import file will received a welcome email where they can set their password.', 'send_email' => 'Send Email', 'call' => 'Call number', 'back_before_importing' => 'Backup before importing?', From 1edbfd87df76a5a82d23741fdc712a416d6d3f2d Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 28 Aug 2025 06:11:40 +0100 Subject: [PATCH 2/6] Added welcome email checkbox to user create form Signed-off-by: snipe --- resources/views/users/edit.blade.php | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 595452b583..9cf4eb6a30 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -288,6 +288,23 @@ + + + @if (!$user->id) +
+ +
+ + +

{{ trans('general.send_welcome_email_help') }}

+ +
+
+ @endif + @include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')]) @@ -685,7 +702,28 @@ $(document).ready(function() { + // Set some defaults + $('#email_user_checkbox').prop("disabled", true); + $('#email_user_checkbox').prop("checked", false); + $("#email_user_checkbox").removeAttr('checked'); + // If the email address is longer than 5 characters, enable the "send email" checkbox + $('#email').on('keyup',function(){ + //event.preventDefault(); + + @if (!config('app.lock_passwords')) + + if (this.value.length > 5) { + $('#email_user_checkbox').prop("disabled", false); + $("#email_user_checkbox").parent().removeClass("form-control--disabled"); + } else { + $('#email_user_checkbox').prop("disabled", true); + $('#email_user_checkbox').prop("checked", false); + $("#email_user_checkbox").parent().addClass("form-control--disabled"); + } + + @endif + }); // Check/Uncheck all radio buttons in the group From af695e7dc8af98f508e919da6851d96220a96feb Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 28 Aug 2025 06:11:52 +0100 Subject: [PATCH 3/6] Added help to user importer Signed-off-by: snipe --- resources/views/livewire/importer.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php index 9162b09c72..ba6dfbfdbd 100644 --- a/resources/views/livewire/importer.blade.php +++ b/resources/views/livewire/importer.blade.php @@ -196,6 +196,7 @@ {{ trans('general.send_welcome_email_to_users') }} +

{{ trans('general.send_welcome_email_import_help') }}

@endif