Compare commits

...

56 Commits

Author SHA1 Message Date
snipe cc73b984cb Merge remote-tracking branch 'origin/develop' 2025-03-04 21:13:43 +00:00
snipe 77c978d29a Merge pull request #16416 from Godmartinz/expiring-asset-email-test
fix Expiring alert tests
2025-03-04 21:11:52 +00:00
Godfrey M 437b3cd865 fix conflicts 2025-03-04 13:08:53 -08:00
Godfrey M 3641016271 remove commented code 2025-03-04 13:08:03 -08:00
Godfrey Martinez cc127c8e1e Merge branch 'develop' into expiring-asset-email-test 2025-03-04 13:06:36 -08:00
Godfrey M 4bac509341 fix Expiring alert tests 2025-03-04 12:58:04 -08:00
snipe f4f6dcb885 Updated test
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:48:59 +00:00
snipe d89f38bbfb Set defaults on save
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:33 +00:00
snipe 9351cc2252 Set default to 0
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:22 +00:00
snipe a31a732d38 Nicer UI for invert flag
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:15 +00:00
snipe 1be420b0e9 Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:37:45 +00:00
snipe 548ef97c32 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-03-04 19:57:33 +00:00
snipe 2b0127ab0c Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:56:58 +00:00
snipe ed8a486726 Merge remote-tracking branch 'origin/develop' 2025-03-04 19:54:08 +00:00
snipe 8791640908 Add @Fiala06 as a contributor 2025-03-04 19:53:25 +00:00
snipe 1ab0911fc8 Merge remote-tracking branch 'origin/develop' 2025-03-04 19:52:16 +00:00
snipe 1dacd25e6d Check for purchase_cost before adding the “each”
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:50:11 +00:00
snipe bdbaea7294 Merge remote-tracking branch 'origin/develop' 2025-03-04 19:43:28 +00:00
snipe 45317c0959 Merge pull request #16415 from snipe/nicer_error_message_on_model_not_found
Nicer model name formatting on RMB model not found
2025-03-04 19:42:45 +00:00
snipe 63e4c42445 Added strtolower
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:33:17 +00:00
snipe d4e227f003 Whitespace
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:29:09 +00:00
snipe bbabbe1b87 Nicer model name formatting on RMB model not found
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:21:46 +00:00
snipe 5cfd1f6fb2 Merge remote-tracking branch 'origin/develop' 2025-03-04 17:16:26 +00:00
snipe 16b97c18e0 Shim route for asset maintenances redirect on RMB not found
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:16:16 +00:00
snipe 5eda67381f Merge remote-tracking branch 'origin/develop' 2025-03-04 17:07:13 +00:00
snipe fa72696a35 Removed redundent text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:06:56 +00:00
snipe 2c8b8bfaf2 Merge remote-tracking branch 'origin/develop' 2025-03-04 17:05:55 +00:00
snipe 9467ec2571 Nicer env text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:05:45 +00:00
snipe 8f3159751a Merge remote-tracking branch 'origin/develop' 2025-03-04 17:01:07 +00:00
snipe ac3f61c96a Fixed extra escape character
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:00:44 +00:00
snipe 4b05e55b29 Merge remote-tracking branch 'origin/develop' 2025-03-04 15:56:05 +00:00
snipe d2e0a23994 Merge pull request #16412 from snipe/#16150_fixed_regression_in_branding_page
Fixed regression from #16150
2025-03-04 15:55:24 +00:00
snipe ccea55308b Fixed regression from #16150
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:53:30 +00:00
snipe 3d3c13fcd0 Merge remote-tracking branch 'origin/develop' 2025-03-04 15:38:58 +00:00
snipe acaa3a28e7 Merge pull request #16410 from snipe/#16407_component_checkout_and_notes_fix
Fixed #16407 - weird layout on components for non super user
2025-03-04 15:38:20 +00:00
snipe c4722898b7 Fixed #16407 - weird layout on components for non super user
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:37:25 +00:00
snipe 88e1d8a8cf Merge remote-tracking branch 'origin/develop' 2025-03-04 15:28:53 +00:00
snipe e19003aea5 Merge pull request #16409 from snipe/#16386_user_dropdown_fields_not_populating_on_edit
Fixed #16386 - some fields not populating with user data on edit
2025-03-04 15:28:11 +00:00
snipe a09a9d3cd6 Added item to payload
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:26:25 +00:00
snipe e007db34e2 Merge remote-tracking branch 'origin/develop' 2025-03-03 22:12:26 +00:00
snipe f9f06d2c02 Merge remote-tracking branch 'origin/develop' 2025-02-27 19:08:45 +00:00
snipe 234f7d00c8 Merge remote-tracking branch 'origin/develop' 2025-02-27 16:18:18 +00:00
snipe 9924553da5 Merge remote-tracking branch 'origin/develop' 2025-02-27 15:45:57 +00:00
snipe df38d7e3ed Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-02-27 12:22:30 +00:00
snipe 44dd061619 Merge remote-tracking branch 'origin/develop' 2025-02-26 20:55:57 +00:00
snipe 7603a932b1 Merge remote-tracking branch 'origin/develop' 2025-02-26 20:29:42 +00:00
snipe 138e7acc13 Merge remote-tracking branch 'origin/develop' 2025-02-26 12:47:54 +00:00
snipe e863d3e7e5 Merge remote-tracking branch 'origin/develop' 2025-02-26 12:02:00 +00:00
snipe c8e401f5ed Merge remote-tracking branch 'origin/develop' 2025-02-26 11:59:53 +00:00
snipe 3ba20a8e28 Merge remote-tracking branch 'origin/develop' 2025-02-26 11:39:10 +00:00
snipe ebae63752f Merge remote-tracking branch 'origin/develop' 2025-02-26 10:25:18 +00:00
snipe 8bc73901cf Merge remote-tracking branch 'origin/develop' 2025-02-26 08:25:35 +00:00
snipe b4f70d9244 Merge remote-tracking branch 'origin/develop' 2025-02-26 07:16:59 +00:00
snipe 21e9f2bba3 Merge remote-tracking branch 'origin/develop' 2025-02-26 07:11:22 +00:00
snipe 881f4e3d6a Merge remote-tracking branch 'origin/develop' 2025-02-25 14:43:57 +00:00
snipe b141945add Updated branch
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 12:18:52 +00:00
16 changed files with 68 additions and 44 deletions
+9
View File
@@ -3298,6 +3298,15 @@
"contributions": [
"code"
]
},
{
"login": "Fiala06",
"name": "Fiala06",
"avatar_url": "https://avatars.githubusercontent.com/u/5183146?v=4",
"profile": "https://github.com/Fiala06",
"contributions": [
"code"
]
}
]
}
+1 -1
View File
@@ -53,7 +53,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") | [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") |
| [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") | [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") |
| [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") | [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") |
| [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") | [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") |
| [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") | [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
@@ -42,7 +42,7 @@ class SendExpirationAlerts extends Command
public function handle()
{
$settings = Setting::getSettings();
$threshold = $settings->alert_interval;
$alert_interval = $settings->alert_interval;
if (($settings->alert_email != '') && ($settings->alerts_enabled == 1)) {
@@ -51,18 +51,18 @@ class SendExpirationAlerts extends Command
->map(fn($item) => trim($item)) // Trim each email
->all();
// Expiring Assets
$assets = Asset::getExpiringWarrantee($threshold);
$assets = Asset::getExpiringWarrantee($alert_interval);
if ($assets->count() > 0) {
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $threshold));
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
}
// Expiring licenses
$licenses = License::getExpiringLicenses($threshold);
$licenses = License::getExpiringLicenses($alert_interval);
if ($licenses->count() > 0) {
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $threshold));
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
}
} else {
if ($settings->alert_email == '') {
+5 -1
View File
@@ -125,7 +125,9 @@ class Handler extends ExceptionHandler
// This is traaaaash but it handles models that are not found while using route model binding :(
// The only alternative is to set that at *each* route, which is crazypants
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
$model_name = last(explode('\\', $e->getModel()));
// This gets the MVC model name from the exception and formats in a way that's less fugly
$model_name = strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))));
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
// Sigh.
@@ -137,6 +139,8 @@ class Handler extends ExceptionHandler
$route = 'models.index';
} elseif ($route == 'predefinedkits.index') {
$route = 'kits.index';
} elseif ($route == 'assetmaintenances.index') {
$route = 'maintenances.index';
}
return redirect()
+2 -2
View File
@@ -850,8 +850,8 @@ class SettingsController extends Controller
$setting->ldap_fname_field = $request->input('ldap_fname_field');
$setting->ldap_auth_filter_query = $request->input('ldap_auth_filter_query');
$setting->ldap_version = $request->input('ldap_version', 3);
$setting->ldap_active_flag = $request->input('ldap_active_flag');
$setting->ldap_invert_active_flag = $request->input('ldap_invert_active_flag');
$setting->ldap_active_flag = $request->input('ldap_active_flag', 0);
$setting->ldap_invert_active_flag = $request->input('ldap_invert_active_flag', 0);
$setting->ldap_emp_num = $request->input('ldap_emp_num');
$setting->ldap_email = $request->input('ldap_email');
$setting->ldap_manager = $request->input('ldap_manager');
@@ -198,10 +198,9 @@ class UsersController extends Controller
$userPermissions = Helper::selectedPermissionsArray($permissions, $user->permissions);
$permissions = $this->filterDisplayable($permissions);
return view('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'));
return view('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))->with('item', $user);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
/**
@@ -456,10 +455,10 @@ class UsersController extends Controller
->with('user', $user)
->with('groups', Group::pluck('name', 'id'))
->with('userGroups', $userGroups)
->with('clone_user', $user_to_clone);
->with('clone_user', $user_to_clone)
->with('item', $user);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
+1 -1
View File
@@ -785,7 +785,7 @@ class Asset extends Depreciable
->whereNotNull('warranty_months')
->whereNotNull('purchase_date')
->whereNull('deleted_at')
->whereRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) <= DATE(NOW() + INTERVAL '
->whereRaw('DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) <= DATE_ADD(NOW(), INTERVAL '
. $days
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()')
->orderByRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH)')
+6 -6
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v8.0.2',
'full_app_version' => 'v8.0.2 - build 17048-g44dd06161',
'build_version' => '17048',
'app_version' => 'v8.0.3',
'full_app_version' => 'v8.0.3 - build 17154-ged8a48672',
'build_version' => '17154',
'prerelease_version' => '',
'hash_version' => 'g44dd06161',
'full_hash' => 'v8.0.2-54-g44dd06161',
'branch' => 'develop',
'hash_version' => 'ged8a48672',
'full_hash' => 'v8.0.3-99-ged8a48672',
'branch' => 'master',
);
@@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('settings', function (Blueprint $table) {
$table->boolean('ldap_invert_active_flag')->default(false);
$table->boolean('ldap_invert_active_flag')->default(0);
});
}
+2 -2
View File
@@ -199,7 +199,7 @@
<div class="col-md-12">
{!! nl2br(Helper::parseEscapedMarkedownInline($component->notes)) !!}
</div>
</div>
@endif
@can('update', $component)
@@ -211,7 +211,7 @@
</div>
@endcan
@can('checkout', Component::class)
@can('checkout', $component)
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
<a href="{{ route('components.checkout.show', $component->id) }}" class="btn btn-sm bg-maroon btn-social btn-block hidden-print">
<x-icon type="checkout" />
+5 -1
View File
@@ -1211,7 +1211,11 @@
<a href="{{ route('components.show', $component->id) }}">{{ $component->name }}</a>
</td>
<td>{{ $component->pivot->assigned_qty }}</td>
<td>{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }} </td>
<td>
@if ($component->purchase_cost!='')
{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }}
@endif
</td>
<td>{{ $component->serial }}</td>
<td>
<a href="{{ route('components.checkin.show', $component->pivot->id) }}" class="btn btn-sm bg-purple hidden-print" data-tooltip="true">{{ trans('general.checkin') }}</a>
+5 -7
View File
@@ -78,13 +78,11 @@
<label for="brand">{{ trans('admin/settings/general.web_brand') }}</label>
</div>
<div class="col-md-9">
<select name="brand" id="brand" class="form-control select2 minimumResultsForSearch" style="width: 150px;">
@foreach($optionTypes as $value => $label)
<option value="{{ $value }}" {{ old('brand', $setting->brand) == $value ? 'selected' : '' }}>
{{ $label }}
</option>
@endforeach
</select>
{!! Form::select('brand', [
'1'=> trans('admin/settings/general.logo_option_types.text'),
'2'=> trans('admin/settings/general.logo_option_types.logo'),
'3'=> trans('admin/settings/general.logo_option_types.logo_and_text')], old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
</div>
</div>
+14 -5
View File
@@ -171,7 +171,9 @@
<!-- LDAP Client-Side TLS key -->
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('ldap_client_tls_key', trans('admin/settings/general.ldap_client_tls_key')) }}
<label for="ldap_client_tls_key">
{{ trans('admin/settings/general.ldap_client_tls_key') }}
</label>
</div>
<div class="col-md-8">
<x-input.textarea
@@ -557,27 +559,34 @@
<!-- LDAP invert active flag -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('ldap_invert_active_flag', trans('admin/settings/general.ldap_invert_active_flag')) }}
<label for="ldap_invert_active_flag">
{{ trans('admin/settings/general.ldap_invert_active_flag') }}
</label>
</div>
<div class="col-md-8">
<label class="form-control">
<input type="checkbox" name="ldap_invert_active_flag" value="1" id="ldap_invert_active_flag" @checked(old('ldap_invert_active_flag', $setting->ldap_invert_active_flag)) />
<p class="help-block">{!! trans('admin/settings/general.ldap_invert_active_flag_help') !!}</p>
{{ trans('general.yes') }}
</label>
@error('ldap_invert_active_flag')
<span class="alert-msg">
<span class="alert-msg">
<x-icon type="x" />
{{ $message }}
</span>
@enderror
<p class="help-block">
{!! trans('admin/settings/general.ldap_invert_active_flag_help') !!}
</p>
@if (config('app.lock_passwords')===true)
<p class="text-warning">
<x-icon type="locked" />
{{ trans('general.feature_disabled') }}
{!! trans('general.feature_disabled') !!}
</p>
@endif
</div>
</div>
<!-- LDAP emp number -->
@@ -26,20 +26,21 @@ class ExpiringAlertsNotificationTest extends TestCase
$alert_email = Setting::first()->alert_email;
$expiringAsset = Asset::factory()->create([
'purchase_date' => now()->subMonths(11)->format('Y-m-d'),
'purchase_date' => now()->subDays(350)->format('Y-m-d'),
'warranty_months' => 12,
'archived' => 0,
'deleted_at' => null,
]);
$expiredAsset = Asset::factory()->create([
'purchase_date' => now()->subMonths(13)->format('Y-m-d'),
'purchase_date' => now()->subDays(370)->format('Y-m-d'),
'warranty_months' => 12,
'archived' => 0,
'deleted_at' => null,
]);
$notExpiringAsset = Asset::factory()->create([
'purchase_date' => now()->subMonths(10)->format('Y-m-d'),
'purchase_date' => now()->subDays(330)->format('Y-m-d'),
'warranty_months' => 12,
'archived' => 0,
'deleted_at' => null,
@@ -28,6 +28,7 @@ class LdapSettingsTest extends TestCase
'ldap_basedn' => 'uid=',
'ldap_fname_field' => 'SomeFirstnameField',
'ldap_server' => 'ldaps://ldap.example.com',
'ldap_invert_active_flag' => 0,
]))
->assertStatus(302)
->assertValid('ldap_enabled')
+2 -3
View File
@@ -151,8 +151,7 @@ if ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') || (!function_exists('posix_get
echo "\e[95m--------------------------------------------------------\n";
echo "STEP 1: Checking .env file: \n";
echo "- Your .env is located at ".getcwd()."/.env \n";
echo "--------------------------------------------------------\e[39m\\n\n";
echo "--------------------------------------------------------\e[39m\n\n";
// Check the .env looks ok
@@ -163,7 +162,7 @@ if (! $env){
exit(1);
}
$env_good = '';
$env_good = $success_icon.' Your .env file is located at '.getcwd()."/.env \n";
$env_bad = '';
// Loop through each line of the .env