Compare commits

..

136 Commits

Author SHA1 Message Date
snipe
6f233bc218 Get more of the select2 ajax lists working 2025-11-03 15:38:43 +00:00
snipe
448f4b94af Remove classes 2025-11-03 14:03:31 +00:00
snipe
7c58fb93a9 Fixed test 2025-11-01 02:53:47 +00:00
snipe
80e4e4a40e Updated more form fields 2025-11-01 02:45:59 +00:00
snipe
7161d56ae2 Prod assets for some reason 2025-10-31 19:07:17 +00:00
snipe
1e85c7b575 Put the form-control-static back since it didn’t cut down the number of files :( 2025-10-31 19:05:36 +00:00
snipe
03130f0947 Try to undo the asset stuff for the PR 2025-10-31 19:03:50 +00:00
snipe
4812e25e5c Added name awareness in child elements 2025-10-31 19:03:19 +00:00
snipe
e6c49da11c Use new blade for textarea 2025-10-31 19:02:54 +00:00
snipe
6f3ee1914a Updated maintenances screen 2025-10-31 19:02:39 +00:00
snipe
9232ee781e Updated validation JS for select2 2025-10-31 19:02:25 +00:00
snipe
3d675d375c Re-add the form static so it’s less noisy for this PR 2025-10-31 19:02:02 +00:00
snipe
d2edc77197 Debugging - remove later 2025-10-31 19:01:42 +00:00
snipe
53716cbe90 Still not working (pre-selecting the ID of the asset) 2025-10-31 19:00:55 +00:00
snipe
8ce3fe0df0 Pass name to input 2025-10-31 16:21:41 +00:00
snipe
affee0a990 Handle unfilled data 2025-10-31 16:21:22 +00:00
snipe
6d5f515f48 Make select2 ajax a little more flexible 2025-10-31 12:23:08 +00:00
snipe
d96844498f This doesn’t actually work yet 2025-10-31 12:22:56 +00:00
snipe
08609d4f56 Moar refactorings 2025-10-30 22:26:21 +00:00
snipe
be344c440f Different approach - rely on nested slots 2025-10-30 21:30:10 +00:00
snipe
96cc2c9ee9 Move form into its own component 2025-10-30 16:35:15 +00:00
snipe
fb1a89442c Removed p-static class 2025-10-30 14:10:06 +00:00
snipe
359e0197bf Start building out the box+form stuff 2025-10-30 14:02:33 +00:00
snipe
6dbb836a01 Merge pull request #18125 from grokability/form-row-again
Added form row component
2025-10-29 16:33:15 +00:00
snipe
3426afe5a8 Account for input styles 2025-10-29 16:15:22 +00:00
snipe
4bbf923eb6 Smaller default row for textarea 2025-10-29 16:11:56 +00:00
snipe
e2c3480194 Apply form rows to manufacturers 2025-10-29 16:11:47 +00:00
snipe
73159076f6 Better handle input groups in js validator 2025-10-29 16:11:37 +00:00
snipe
90d040573d Added regular link icon 2025-10-29 16:07:16 +00:00
snipe
155481a442 Merge pull request #18120 from grokability/small-form-fixes-settings
Fixed form label alignments in settings section
2025-10-29 11:16:59 +00:00
snipe
2f31bfc5fe Fixed some HTML labels in settings 2025-10-29 11:13:07 +00:00
snipe
8d0c88dc74 Merge pull request #18116 from akemidx/auditwarningthreshold
Fixed #17329 Audit Warning Threshold could be negative
2025-10-28 20:44:58 +00:00
snipe
07256fd833 Merge pull request #18044 from mohammad-ahmadi1/ISSUE-17004-fix-db-dump-ssl-issue
fix: update mysqldump options to use --ssl-mode=DISABLED for modern versions
2025-10-28 20:37:08 +00:00
snipe
776cd43a58 Change text string for item (versus asset) 2025-10-28 20:36:05 +00:00
akemidx
acb5309aab min = 0 2025-10-28 16:32:21 -04:00
snipe
c68f81db3c Merge pull request #18113 from Godmartinz/customfieldvalue-in-importer-fix
Adds #17433  `is_null` check to import handler for custom fields
2025-10-28 20:27:22 +00:00
snipe
ac8e341b37 Merge pull request #18115 from marcusmoore/fixes/rb-20449-remove-admin-from-acceptance-email
Fixed #18112 - fix consumable and license acceptances
2025-10-28 20:26:59 +00:00
snipe
36122b3966 Added BACKUP_TIME_LIMIT to env example 2025-10-28 20:26:23 +00:00
akemidx
79bcf472f0 greater than or equal to zero 2025-10-28 16:13:33 -04:00
Marcus Moore
55d86da846 Remove references to administrator in acceptance notification 2025-10-28 13:07:00 -07:00
Godfrey M
e4f8c1ba3f fix custom field value conditional check 2025-10-28 12:24:35 -07:00
Godfrey M
c36236b7dc add is_null acheck to import hanlder for custom fields 2025-10-28 11:37:38 -07:00
snipe
63994333d0 Merge pull request #18111 from grokability/#16914-better-ldap-sync-phrasing
Fixed #16914: better ldap sync phrasing
2025-10-28 15:51:10 +00:00
snipe
da4c7d8934 One more tweak 2025-10-28 15:47:56 +00:00
snipe
186721eca0 Added breadcrumbs 2025-10-28 15:42:59 +00:00
snipe
f53d939c86 Better explanation for location sync, nicer look 2025-10-28 15:42:53 +00:00
snipe
23e6909708 Merge pull request #18110 from grokability/#18107-normalize-to-strings
Fixed #18107: normalize "to" strings
2025-10-28 15:03:16 +00:00
snipe
cf421fe1c1 Added user-specific “to” 2025-10-28 15:02:15 +00:00
snipe
4d80e806e4 Use “-“ instead of “to” string, added placeholders 2025-10-28 15:02:03 +00:00
snipe
60a7b7f7ff Merge pull request #18109 from grokability/audit-improvements
Limit the upcoming audit email to 30 records, added optional --with-output
2025-10-28 14:31:55 +00:00
snipe
90263eab06 Added note for —with-option flag 2025-10-28 14:20:40 +00:00
snipe
9d8f251fc4 Limit the email to 30 records, added optional --with-output 2025-10-28 14:15:15 +00:00
snipe
2b4986571c Merge pull request #18108 from uberbrady/fix_ldap_tests
Fixed - LDAP test needs to be fixed to match new behavior
2025-10-28 12:49:11 +00:00
Brady Wetherington
890d13bd52 LDAP test needs to be fixed to match new behavior 2025-10-28 12:30:30 +00:00
snipe
e698e71137 Merge pull request #18100 from marcusmoore/fixes/20318-license-seat-display-name
Added null safe operator in case of missing license
2025-10-28 09:29:25 +00:00
snipe
d064a5530a Merge remote-tracking branch 'origin/master' into develop 2025-10-28 02:10:07 +00:00
snipe
ab4fbf6c19 Merge pull request #18105 from grokability/ldap-fast-find-and-bind
Possible fix for 504 gateway timeout on unreachable LDAP server
2025-10-28 02:09:41 +00:00
snipe
728afa8361 Possible fix for 504 gateway timeout on unreachable LDAP server 2025-10-27 23:45:12 +00:00
snipe
b77019c16e Merge remote-tracking branch 'origin/develop' 2025-10-27 19:32:28 +00:00
snipe
6703448b80 Merge pull request #18102 from marcusmoore/fixes/rb-20434-undefined-permissions-variable
Fixed issue when viewing user that does not have permissions set
2025-10-27 19:31:54 +00:00
Marcus Moore
776ba19a1f Define default permissions array 2025-10-27 12:28:55 -07:00
Marcus Moore
1f499e0d44 Add null safe operator in case of missing license 2025-10-27 10:47:55 -07:00
snipe
0a6eb61103 Merge remote-tracking branch 'origin/develop' 2025-10-27 13:20:18 +00:00
snipe
32a2eed5ec Fixed #18075 - make require_serial boolean in API transformer 2025-10-27 13:19:37 +00:00
snipe
40a70d39d0 Merge remote-tracking branch 'origin/develop' 2025-10-27 12:42:40 +00:00
snipe
5697054e98 Merge pull request #18099 from grokability/fix-cjk-for-acceptance-translated-strings
Fixed #18097 - check for CJK in field labels as well as content
2025-10-27 12:41:59 +00:00
snipe
def5969e1c Fixed #18097 - check for CJK in field labels as well as content 2025-10-27 12:34:30 +00:00
snipe
78a418630d Merge remote-tracking branch 'origin/develop' 2025-10-27 12:21:25 +00:00
snipe
6d76e7b2d4 Added dumb pverride for reports :( 2025-10-27 12:21:16 +00:00
snipe
f052c8b44c Merge pull request #18076 from uberbrady/move_traits_into_directories
Moved Traits into its directory and modify the FCO's to point to them
2025-10-27 11:43:31 +00:00
snipe
0e6991d56d Merge remote-tracking branch 'origin/develop' 2025-10-27 11:42:05 +00:00
snipe
06eab5f8a4 Merge pull request #18093 from Godmartinz/fix-warranty-part-of-expiring-asset-query
Fixed expiring warranties not being included in the expiring alerts notification
2025-10-27 11:41:51 +00:00
snipe
4a481e79c4 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/build/overrides.css
#	public/css/build/overrides.css.map
#	public/css/dist/all.css
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-10-27 11:14:05 +00:00
snipe
ee4abbcbaa Updated dev assets 2025-10-27 11:12:13 +00:00
snipe
dcc82d742f Fixed RB-20430 - 500 on LDAP if baseDN is not set 2025-10-27 11:09:24 +00:00
snipe
19cb2089d7 Merge pull request #18098 from grokability/dependabot/github_actions/develop/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-10-27 10:47:59 +00:00
snipe
04923b06b0 Merge pull request #18078 from grokability/groups-ui-improvements
Groups UI improvements, ability to add users from the group edit screen
2025-10-27 10:47:11 +00:00
dependabot[bot]
e16755d491 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 08:19:26 +00:00
snipe
742b0769a4 Use translation string 2025-10-26 12:10:08 +00:00
snipe
df68dca9dc Warn if user has individual permission overrides 2025-10-25 18:57:17 +01:00
snipe
4a5bf78d58 Merge branch 'develop' into groups-ui-improvements 2025-10-25 18:31:22 +01:00
snipe
7947237489 Double check the admin status when toggling the superadmin 2025-10-25 18:29:52 +01:00
snipe
1115205164 Normalize the JS 2025-10-25 18:20:22 +01:00
snipe
d5d01136c4 Fixed js errors 2025-10-25 17:57:59 +01:00
snipe
3d47277614 Added cursor style 2025-10-25 17:57:44 +01:00
snipe
b937bea04f Working, but there’s a bit of a jitter I need to fix 2025-10-25 15:59:47 +01:00
snipe
fff14632bc Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/build/overrides.css
#	public/css/build/overrides.css.map
#	public/css/dist/all.css
#	public/mix-manifest.json
2025-10-25 14:59:31 +01:00
snipe
9bdf1a620f Built assets 2025-10-25 14:58:27 +01:00
snipe
60099aa989 FAFOing on disclosure arrows being remembered 2025-10-25 14:56:01 +01:00
snipe
f3976e5dd8 Merge pull request #18094 from Godmartinz/custom_field_color_fixx
Fixed fieldset colors on dark themes
2025-10-23 20:32:05 +01:00
Godfrey M
d7d6893304 fix Custom Fields section header font color 2025-10-23 12:05:13 -07:00
Godfrey M
99549ce805 rewrite query for expired warranties on assets, concat queries" 2025-10-23 11:01:51 -07:00
snipe
7eb15fe04d Merge pull request #18091 from uberbrady/fix_backup_durations
Moved import time limit inside class, added new backup time limit
2025-10-23 18:51:35 +01:00
Godfrey M
e2019a13ab rewrite expired assets collection query 2025-10-23 10:49:58 -07:00
Brady Wetherington
4b7a06761a Moved import time limit inside class, added new backup time limit 2025-10-23 16:05:09 +01:00
snipe
8f4a1f5801 Moved JS and styles into js and css files 2025-10-23 13:24:26 +01:00
snipe
891bec9cdb Styling fixes 2025-10-23 13:06:45 +01:00
Godfrey M
c5252ea583 skip in one more spot 2025-10-22 12:23:14 -07:00
Godfrey M
82d553c180 skip test if sqllite 2025-10-22 12:19:13 -07:00
Godfrey M
71e34355b9 remove unwanted changes 2025-10-22 11:51:00 -07:00
Godfrey M
2bad8c72e4 fixes warranty part of expiring alerts query 2025-10-22 11:43:54 -07:00
Godfrey M
6134ca01ac Merge remote-tracking branch 'origin/develop' into develop 2025-10-22 10:48:05 -07:00
snipe
be8193ebff Fixed inherit permissions 2025-10-22 15:00:04 +01:00
snipe
430ee46645 Small tweaks to inherit js 2025-10-22 13:41:59 +01:00
snipe
76fbbf29e8 Replace generate text with icon button 2025-10-22 13:37:45 +01:00
snipe
3108159d95 Jitter CSS tweaks 2025-10-22 12:37:39 +01:00
snipe
f282a1ead7 Removed duplicated permissions js code 2025-10-22 12:03:55 +01:00
snipe
324bc4957d Merge pull request #18080 from Godmartinz/add-null-safe-operator-to-manager
Fixes admin alerts when a location doesnt have a manager
2025-10-22 11:56:59 +01:00
snipe
c3b5c4dfae Moved the logic into the permissions partial, added translations 2025-10-21 22:10:09 +01:00
Godfrey M
4ab5d97e86 add nullsafe operator to location manager 2025-10-21 14:06:08 -07:00
Godfrey M
b4696ef11e added alert_email to send conditional in listener 2025-10-21 13:11:21 -07:00
snipe
294ffb72a4 Translations!!! 2025-10-21 20:36:09 +01:00
snipe
8c534d29d3 WTF tower?? 2025-10-21 19:36:28 +01:00
snipe
d6cb262f9d Bumped version 2025-10-21 19:22:36 +01:00
snipe
5211e2ae20 Some UI refinement 2025-10-21 19:22:36 +01:00
snipe
90832fd1ad Checked check 2025-10-21 19:22:36 +01:00
snipe
889cbc69e1 Starter improvements - needs testing 2025-10-21 19:22:36 +01:00
snipe
15948370d4 Updated assets 2025-10-21 19:22:24 +01:00
snipe
63c5177b37 Merge pull request #18077 from Godmartinz/acceptance-notif-fixes-pt2
Adds admin to decline notification, fix asset and model name translations on asset notification
2025-10-21 18:31:28 +01:00
Godfrey M
4fbfaf6b9f add admin to decline, fix asset and model name translations 2025-10-21 10:22:34 -07:00
Brady Wetherington
9e68497b63 Moved Traits into directory and modify the users to point to them 2025-10-21 16:45:58 +01:00
snipe
0b9e13bf1e Merge remote-tracking branch 'origin/develop' 2025-10-21 12:58:06 +01:00
snipe
485d343e0f Merge pull request #18058 from uberbrady/ldap_fetch_dn_before_login_FIXED
FIXED - perform Ldap fetch for dn (Distinguished Name) before logging-in (fixed)
2025-10-21 12:56:31 +01:00
snipe
07f0e8a3be Merge pull request #18070 from Godmartinz/fix-admin-in-user-acceptance-notif
Fixes `admin` parameter acceptance notifications
2025-10-21 12:54:03 +01:00
snipe
cc5afb1cd8 Merge pull request #18074 from grokability/smaller-audit-image-fix
Fixed audit images not displaying inline
2025-10-21 12:51:20 +01:00
snipe
c69f1c0890 Smaller fix for missing audit images 2025-10-21 12:43:59 +01:00
Godfrey M
a8733bdedf remove nullsafe operator 2025-10-20 11:01:38 -07:00
Godfrey M
4222e4eb51 add nullsafe operator after admin 2025-10-20 11:00:59 -07:00
Godfrey M
5db4441f5c fix admin param in user accepted notification 2025-10-20 10:51:24 -07:00
snipe
2bcfe97211 Merge remote-tracking branch 'origin/develop' 2025-10-20 16:03:55 +01:00
snipe
4e74c97c84 Merge pull request #18066 from smarsching/issue-18065
Fixed #18065: Ensure that private_key_bits is always an int
2025-10-20 13:51:42 +01:00
Sebastian Marsching
71a46c9bd6 Fixed #18065: ensure that private_key_bits is always an int. 2025-10-18 18:39:43 +02:00
Brady Wetherington
598612d4bf Got tests to pass? Not very happy about it, tbh. 2025-10-16 19:11:49 +01:00
Brady Wetherington
a07d83e583 Improved find-and-bind for complex LDAP directory structures 2025-10-16 19:11:49 +01:00
snipe
a3bd58bda6 Foundation 2025-10-16 11:17:48 +01:00
Mohammad Ahmadi
3fc651d659 fix: update mysqldump options to use --ssl-mode=DISABLED for modern versions 2025-10-15 00:30:53 +02:00
110 changed files with 2591 additions and 1530 deletions

View File

@@ -190,6 +190,7 @@ APP_ALLOW_INSECURE_HOSTS=false
GOOGLE_MAPS_API=
LDAP_MEM_LIM=500M
LDAP_TIME_LIM=600
BACKUP_TIME_LIMIT=600
IMPORT_TIME_LIMIT=600
IMPORT_MEMORY_LIMIT=500M
REPORT_TIME_LIMIT=12000

View File

@@ -82,7 +82,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |

View File

@@ -81,7 +81,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |

View File

@@ -67,7 +67,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |

View File

@@ -8,8 +8,6 @@ use Symfony\Component\Console\Input\InputOption;
use Illuminate\Support\Facades\Log;
use Symfony\Component\Console\Helper\ProgressIndicator;
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
/**
* Class ObjectImportCommand
@@ -52,6 +50,9 @@ class ObjectImportCommand extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
$this->progressIndicator = new ProgressIndicator($this->output);
$filename = $this->argument('filename');

View File

@@ -16,7 +16,7 @@ class SendUpcomingAuditReport extends Command
*
* @var string
*/
protected $signature = 'snipeit:upcoming-audits';
protected $signature = 'snipeit:upcoming-audits {--with-output : Display the results in a table in your console in addition to sending the email}';
/**
* The console command description.
@@ -47,43 +47,69 @@ class SendUpcomingAuditReport extends Command
$today = Carbon::now();
$interval_date = $today->copy()->addDays($interval);
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'asc')->get();
$this->info($assets->count() . ' assets must be audited in on or before ' . $interval_date . ' is deadline');
if ((count($assets) !== 0) && ($assets->count() > 0) && ($settings->alert_email != '')) {
// Send a rollup to the admin, if settings dictate
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item))
->filter(fn($item) => !empty($item))
->all();
$this->info('Sending Admin SendUpcomingAuditNotification to: ' . $settings->alert_email);
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets, $settings->audit_warning_days));
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.last_audit'),
trans('general.next_audit_date'),
trans('mail.Days'),
trans('mail.supplier'),
trans('mail.assigned_to'),
],
$assets->map(fn($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->display_name,
trans('general.last_audit') => $item->last_audit_formatted_date,
trans('general.next_audit_date') => $item->next_audit_formatted_date,
trans('mail.Days') => round($item->next_audit_diff_in_days),
trans('mail.supplier') => $item->supplier ? $item->supplier->name : '',
trans('mail.assigned_to') => $item->assignedTo ? $item->assignedTo->display_name : '',
])
);
$assets_query = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'asc')->with('supplier');
$asset_count = $assets_query->count();
$this->info(number_format($asset_count) . ' assets must be audited on or before ' . $interval_date);
if (!$this->option('with-output')) {
$this->info('Run this command with the --with-output option to see the full list in the console.');
}
if ($asset_count > 0) {
$assets_for_email = $assets_query->limit(30)->get();
// Send a rollup to the admin, if settings dictate
if ($settings->alert_email != '') {
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item))
->filter(fn($item) => !empty($item))
->all();
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets_for_email, $settings->audit_warning_days, $asset_count));
$this->info('Audit notification sent to: ' . $settings->alert_email);
} else {
$this->info('There is no admin alert email set so no email will be sent.');
}
if ($this->option('with-output')) {
// Get the full list if the user wants output in the console
$assets_for_output = $assets_query->limit(null)->get();
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.last_audit'),
trans('general.next_audit_date'),
trans('mail.Days'),
trans('mail.supplier'),
trans('mail.assigned_to'),
],
$assets_for_output->map(fn($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->display_name,
trans('general.last_audit') => $item->last_audit_formatted_date,
trans('general.next_audit_date') => $item->next_audit_formatted_date,
trans('mail.Days') => round($item->next_audit_diff_in_days),
trans('mail.supplier') => $item->supplier ? $item->supplier->name : '',
trans('mail.assigned_to') => $item->assignedTo ? $item->assignedTo->display_name : '',
])
);
}
} else {
$this->info('There are no assets due for audit in the next ' . $interval . ' days.');
}
}
}

View File

@@ -37,6 +37,8 @@ class SystemBackup extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('BACKUP_TIME_LIMIT', 600)); //600 seconds = 10 minutes
if ($this->option('filename')) {
$filename = $this->option('filename');

View File

@@ -40,6 +40,8 @@ class IconHelper
return 'fa-solid fa-trash-arrow-up';
case 'external-link':
return 'fa fa-external-link';
case 'link':
return 'fa fa-link';
case 'email':
return 'fa-regular fa-envelope';
case 'phone':
@@ -140,7 +142,7 @@ class IconHelper
case 'more-files':
return 'fa-solid fa-laptop-file';
case 'maintenances':
return 'fas fa-wrench';
return 'fa-solid fa-screwdriver-wrench';
case 'seats':
return 'far fa-list-alt';
case 'globe-us':

View File

@@ -116,8 +116,6 @@ class AcceptanceController extends Controller
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
// If signatures are required, make sure we have one
if (Setting::getSettings()->require_accept_signature == '1') {
@@ -164,11 +162,9 @@ class AcceptanceController extends Controller
'signature' => (($sig_filename && array_key_exists('1', $encoded_image))) ? $encoded_image[1] : null,
'logo' => ($encoded_logo) ?? null,
'date_settings' => $settings->date_display_format,
'admin' => auth()->user()->present()?->fullName,
'qty' => $acceptance->qty ?? 1,
];
if ($request->input('asset_acceptance') == 'accepted') {

View File

@@ -45,6 +45,7 @@ abstract class Controller extends BaseController
'accessories' => Accessory::class,
'maintenances' => Maintenance::class,
'assets' => Asset::class,
'audits' => Asset::class,
'components' => Component::class,
'consumables' => Consumable::class,
'hardware' => Asset::class,
@@ -58,6 +59,7 @@ abstract class Controller extends BaseController
'accessories' => 'private_uploads/accessories/',
'maintenances' => 'private_uploads/maintenances/',
'assets' => 'private_uploads/assets/',
'audits' => 'private_uploads/audits/',
'components' => 'private_uploads/components/',
'consumables' => 'private_uploads/consumables/',
'hardware' => 'private_uploads/assets/',
@@ -71,6 +73,7 @@ abstract class Controller extends BaseController
'accessories' => 'accessory',
'maintenances' => 'maintenance',
'assets' => 'asset',
'audits' => 'audits',
'components' => 'component',
'consumables' => 'consumable',
'hardware' => 'asset',

View File

@@ -65,6 +65,7 @@ class GroupsController extends Controller
$group->notes = $request->input('notes');
if ($group->save()) {
$group->users()->sync($request->input('associated_users'));
return redirect()->route('groups.index')->with('success', trans('admin/groups/message.success.create'));
}
@@ -88,7 +89,10 @@ class GroupsController extends Controller
$groupPermissions = [];
}
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
$associated_users = $group->users()->get();
//dd($associated_users->toArray());
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'))->with('associated_users', $associated_users);
}
/**
@@ -105,8 +109,10 @@ class GroupsController extends Controller
$group->permissions = json_encode($request->input('permission'));
$group->notes = $request->input('notes');
if (! config('app.lock_passwords')) {
if ($group->save()) {
$group->users()->sync($request->input('associated_users'));
return redirect()->route('groups.index')->with('success', trans('admin/groups/message.success.update'));
}

View File

@@ -68,6 +68,12 @@ class MaintenancesController extends Controller
{
$this->authorize('update', Asset::class);
\Log::error(print_r($request->input('selected_assets[]'), true));
if (!$request->filled('selected_assets')) {
return redirect()->back()->withInput()->with('error', 'No assets were selected.');
}
$assets = Asset::whereIn('id', $request->input('selected_assets'))->get();
// Loop through the selected assets

View File

@@ -109,7 +109,7 @@ class SettingsSamlRequest extends FormRequest
];
$pkey = openssl_pkey_new([
'private_key_bits' => config('app.saml_key_size'),
'private_key_bits' => (int) config('app.saml_key_size'),
'private_key_type' => OPENSSL_KEYTYPE_RSA,
]);

View File

@@ -32,7 +32,7 @@ class StoreNotificationSettings extends FormRequest
],
'alert_threshold' => 'numeric|nullable',
'alert_interval' => 'numeric|nullable|gt:0',
'audit_warning_days' => 'numeric|nullable',
'audit_warning_days' => 'numeric|nullable|gte:0',
'due_checkin_days' => 'numeric|nullable|gt:0',
'audit_interval' => 'numeric|nullable|gt:0',
];

View File

@@ -149,6 +149,7 @@ class ActionlogsTransformer
'filename' => $actionlog->filename,
'inlineable' => StorageHelper::allowSafeInline($actionlog->uploads_file_path()),
'exists_on_disk' => Storage::exists($actionlog->uploads_file_path()) ? true : false,
'mediatype' => StorageHelper::getMediaType($actionlog->uploads_file_path()),
] : null,
'item' => ($actionlog->item) ? [

View File

@@ -68,7 +68,7 @@ class AssetModelsTransformer
'default_fieldset_values' => $default_field_values,
'eol' => ($assetmodel->eol > 0) ? $assetmodel->eol.' months' : 'None',
'requestable' => ($assetmodel->requestable == '1') ? true : false,
'require_serial' => $assetmodel->require_serial,
'require_serial' => ($assetmodel->require_serial == '1') ? true : false,
'notes' => Helper::parseEscapedMarkedownInline($assetmodel->notes),
'created_by' => ($assetmodel->adminuser) ? [
'id' => (int) $assetmodel->adminuser->id,

View File

@@ -44,7 +44,7 @@ class AssetImporter extends ItemImporter
foreach ($this->customFields as $customField) {
$customFieldValue = $this->array_smart_custom_field_fetch($row, $customField);
if ($customFieldValue) {
if (!is_null($customFieldValue)) {
if ($customField->field_encrypted == 1) {
$this->item['custom_fields'][$customField->db_column_name()] = Crypt::encrypt($customFieldValue);
$this->log('Custom Field '.$customField->name.': '.Crypt::encrypt($customFieldValue));

View File

@@ -87,7 +87,7 @@ class CheckoutAssetMail extends Mailable
$name = $this->target->assignedto?->display_name;
}
else if($this->target instanceof Location){
$name = $this->target->manager->name;
$name = $this->target->manager?->name;
}
// Check if the item has custom fields associated with it

View File

@@ -17,10 +17,11 @@ class SendUpcomingAuditMail extends Mailable
/**
* Create a new message instance.
*/
public function __construct($params, $threshold)
public function __construct($params, $threshold, $total)
{
$this->assets = $params;
$this->threshold = $threshold;
$this->total = $total;
}
/**
@@ -32,7 +33,7 @@ class SendUpcomingAuditMail extends Mailable
return new Envelope(
from: $from,
subject: trans_choice('mail.upcoming-audits', $this->assets->count(), ['count' => $this->assets->count(), 'threshold' => $this->threshold]),
subject: trans_choice('mail.upcoming-audits', $this->total, ['count' => $this->total, 'threshold' => $this->threshold]),
);
}
@@ -49,6 +50,7 @@ class SendUpcomingAuditMail extends Mailable
with: [
'assets' => $this->assets,
'threshold' => $this->threshold,
'total' => $this->total,
],
);
}

View File

@@ -6,6 +6,7 @@ use App\Helpers\Helper;
use App\Models\Traits\Acceptable;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;

View File

@@ -478,6 +478,10 @@ class Actionlog extends SnipeModel
$object = 'models';
}
if ($this->action_type == 'audit') {
$object = 'audits';
}
return route('ui.files.show', [
'object_type' => $object,
'id' => $this->item_id,

View File

@@ -9,6 +9,8 @@ use App\Http\Traits\UniqueUndeletedTrait;
use App\Models\Traits\Acceptable;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Requestable;
use App\Models\Traits\Searchable;
use App\Presenters\AssetPresenter;
use App\Presenters\Presentable;
@@ -937,25 +939,37 @@ class Asset extends Depreciable
*/
public static function getExpiringWarrantyOrEol($days = 30)
{
return self::where('archived', '=', '0')
$now = now();
$end = now()->addDays($days);
$expired_assets = self::query()
->where('archived', '=', '0')
->NotArchived()
->whereNull('deleted_at')
->where(function ($query) use ($days) {
// Check for manual asset EOL first
$query->where(function ($query) use ($days) {
$query->whereNotNull('asset_eol_date')
->whereBetween('asset_eol_date', [Carbon::now(), Carbon::now()->addDays($days)]);
// Otherwise use the warranty months + purchase date + threshold
})->orWhere(function ($query) use ($days) {
$query->whereNotNull('purchase_date')
->whereNotNull('warranty_months')
->whereBetween('purchase_date', [Carbon::now(), Carbon::now()->addMonths('assets.warranty_months')->addDays($days)]);
});
})
->orderBy('asset_eol_date', 'ASC')
->orderBy('purchase_date', 'ASC')
->whereNotNull('asset_eol_date')
->whereBetween('asset_eol_date', [$now, $end])
->get();
$assets_with_warranties = self::query()
->where('archived', '=', '0')
->NotArchived()
->whereNull('deleted_at')
->whereNotNull('purchase_date')
->whereNotNull('warranty_months')
->get();
$expired_warranties = $assets_with_warranties->filter(function ($asset) use ($now, $end) {
$expiration_window = Carbon::parse($asset->purchase_date)->addMonths((int) $asset->warranty_months);
return $expiration_window->betweenIncluded($now, $end);
});
return $expired_assets->concat($expired_warranties)
->unique('id')
->sortBy([
['asset_eol_date', 'ASC'],
['purchase_date', 'ASC']
])
->values();
}

View File

@@ -2,16 +2,18 @@
namespace App\Models;
use App\Http\Traits\TwoColumnUniqueUndeletedTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Requestable;
use App\Models\Traits\Searchable;
use App\Presenters\AssetModelPresenter;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Storage;
use Watson\Validating\ValidatingTrait;
use \App\Presenters\AssetModelPresenter;
use App\Http\Traits\TwoColumnUniqueUndeletedTrait;
/**
* Model for Asset Models. Asset Models contain higher level

View File

@@ -190,6 +190,11 @@ class CheckoutAcceptance extends Model
}
$pdf->Ln();
// Check for CJK in the translation string for date. (This is a good proxy for the rest of the document)
Helper::hasRtl(trans('general.date')) ? $pdf->setRTL(true) : $pdf->setRTL(false);
Helper::isCjk(trans('general.date')) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
$pdf->writeHTML(trans('general.date') . ': ' . Helper::getFormattedDateObject(now(), 'datetime', false), true, 0, true, 0, '');
if ($data['company_name'] != null) {
@@ -224,7 +229,6 @@ class CheckoutAcceptance extends Model
foreach ($eula_lines as $eula_line) {
Helper::hasRtl($eula_line) ? $pdf->setRTL(true) : $pdf->setRTL(false);
Helper::isCjk($eula_line) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
$pdf->writeHTML(Helper::parseEscapedMarkedown($eula_line), true, 0, true, 0, '');
}
$pdf->Ln();
@@ -239,8 +243,11 @@ class CheckoutAcceptance extends Model
$pdf->Ln();
}
Helper::hasRtl(trans('general.notes')) ? $pdf->setRTL(true) : $pdf->setRTL(false);
Helper::isCjk(trans('general.notes')) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
if ($data['note'] != null) {
Helper::isCjk($data['note']) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
Helper::isCjk(trans('general.notes')) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
$pdf->writeHTML(trans('general.notes') . ': ' . e($data['note']), true, 0, true, 0, '');
$pdf->Ln();
}

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use App\Helpers\Helper;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;

View File

@@ -6,6 +6,7 @@ use App\Helpers\Helper;
use App\Models\Traits\Acceptable;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\ConsumablePresenter;
use App\Presenters\Presentable;

View File

@@ -104,6 +104,78 @@ class Ldap extends Model
return $connection;
}
/**
* Finds user via Admin search *first*, and _then_ try to bind as that user, returning the user attributes on success,
* or false on failure. This enables login when the DN is harder to programmatically 'guess' due to having users in
* various different OU's or other LDAP entities.
*/
public static function findAndBindMultiOU(string $baseDn, string $filterQuery, string $password, int $slow_failure = 3): array|false
{
/**
* If you *don't* set the slow_failure variable, do note that we might permit timing attacks in here - if
* your find results come back 'slow' when a user *does* exist, but fast if they *don't* exist, then you
* can use this to enumerate users.
*
* Even if that's *not* true, we still might have an issue: if we don't find the user, then we don't even _try_
* to bind as them. Again, that could permit a timing attack.
*
* Instead of checking every little thing, we just wrap everything in a try/catch in order to unify the
* 'slow_failure' treatment. All failures are re-raised as exceptions so that all failures exit from the
* same place.
*/
$connection = null;
$admin_conn = null;
try {
/**
* First we get an 'admin' connection, which will need search permissions. That was already a requirement
* here, so that's not a big lift. But it _is_ possible to configure LDAP to only login, and *not* to be
* able to import lists of users. In that case, this function *will not work* - and you should use the
* legacy 'findAndBindUserLdap' method, below. Otherwise, it looks like this would attempt an anonymous
* bind - which you might want, but you probably don't.
*
**/
$admin_conn = self::connectToLdap();
self::bindAdminToLdap($admin_conn);
$results = ldap_search($admin_conn, $baseDn, $filterQuery);
$entry_count = ldap_count_entries($admin_conn, $results);
if ($entry_count != 1) {
throw new \Exception('Wrong number of entries found: ' . $entry_count);
}
$entry = ldap_first_entry($admin_conn, $results);
$user = ldap_get_attributes($admin_conn, $entry);
$userDn = ldap_get_dn($admin_conn, $entry);
if (!$userDn) {
throw new \Exception("No user DN found");
}
\Log::debug("FOUND DN IS: $userDn");
// The temptation now is to do ldap_unbind on the $admin_conn, but that gets handled in the 'finally' below.
// I don't know if that means a separate 'connection' is maintained to the LDAP server or not, and would
// definitely prefer to not do that if we can avoid it. But I don't know enough about the LDAP protocol to
// be certain that that happens.
//now we try to log in (bind) as that found user
$connection = self::connectToLdap();
$bind_results = ldap_bind($connection, $userDn, $password);
if (!$bind_results) {
throw new \Exception("Unable to bind as user");
}
return array_change_key_case($user);
} catch (\Exception $e) {
\Log::debug("Exception on fast find-and-bind: " . $e->getMessage());
if ($slow_failure) {
sleep($slow_failure);
}
return false; //TODO - make this null instead for a slightly nicer type signature
} finally {
if ($admin_conn) {
ldap_unbind($admin_conn);
}
if ($connection) {
ldap_unbind($connection);
}
}
}
/**
* Binds/authenticates the user to LDAP, and returns their attributes.
@@ -147,25 +219,27 @@ class Ldap extends Model
Log::debug('Filter query: '.$filterQuery);
// only try this if we have an Admin username set; otherwise use the 'legacy' method
if (($settings->ldap_uname) && ($baseDn)) {
// in the fallowing call, we pick a slow-failure of 0 because we might need to fall through to 'legacy'
$fast_bind = self::findAndBindMultiOU($baseDn, $filterQuery, $password, 0);
if ($fast_bind) {
\Log::debug("Fast bind worked");
return $fast_bind;
}
\Log::debug("Fast bind failed; falling through to legacy bind");
}
if (! $ldapbind = @ldap_bind($connection, $userDn, $password)) {
Log::debug("Status of binding user: $userDn to directory: (directly!) ".($ldapbind ? "success" : "FAILURE"));
if (! $ldapbind = self::bindAdminToLdap($connection)) {
/*
* TODO PLEASE:
*
* this isn't very clear, so it's important to note: the $ldapbind value is never correctly returned - we never 'return true' from self::bindAdminToLdap() (the function
* just "falls off the end" without ever explictly returning 'true')
*
* but it *does* have an interesting side-effect of checking for the LDAP password being incorrectly encrypted with the wrong APP_KEY, so I'm leaving it in for now.
*
* If it *did* correctly return 'true' on a succesful bind, it would _probably_ allow users to log in with an incorrect password. Which would be horrible!
*
* Let's definitely fix this at the next refactor!!!!
*
*/
Log::debug("Status of binding Admin user: $userDn to directory instead: ".($ldapbind ? "success" : "FAILURE"));
return false;
// replicate the old bad-decryption-key detection behavior here
try {
Crypt::decrypt(Setting::getSettings()->ldap_pword);
} catch (\Exception $e) {
throw new \Exception('Your app key has changed! Could not decrypt LDAP password using your current app key, so LDAP authentication has been disabled. Login with a local account, update the LDAP password and re-enable it in Admin > Settings.');
}
//regardless of anything else; stuff isn't working. Return false.
return false;
}
if (! $results = ldap_search($connection, $baseDn, $filterQuery)) {

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use App\Helpers\Helper;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use Carbon\Carbon;

View File

@@ -4,6 +4,7 @@ namespace App\Models;
use App\Models\Traits\Acceptable;
use App\Models\Traits\CompanyableChildTrait;
use App\Models\Traits\Loggable;
use App\Notifications\CheckinLicenseNotification;
use App\Notifications\CheckoutLicenseNotification;
use App\Presenters\Presentable;
@@ -75,7 +76,7 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
protected function displayName(): Attribute
{
return Attribute:: make(
get: fn(mixed $value) => $this->license->name,
get: fn(mixed $value) => $this->license?->name,
);
}

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use App\Http\Traits\UniqueUndeletedTrait;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use App\Helpers\Helper;
use App\Models\Traits\CompanyableChildTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;

View File

@@ -20,6 +20,13 @@ class SnipeModel extends Model
$this->attributes['purchase_date'] = $value;
}
protected function purchaseDateForDatepicker(): Attribute
{
return Attribute:: make(
get: fn(mixed $value, array $attributes) => array_key_exists('purchase_date', $attributes) ? Carbon::parse($attributes['purchase_date'])->format('Y-m-d') : null,
);
}
protected function purchaseDateFormatted(): Attribute
{

View File

@@ -1,8 +1,14 @@
<?php
namespace App\Models;
namespace App\Models\Traits;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\Location;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\AuditNotification;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;

View File

@@ -1,8 +1,10 @@
<?php
namespace App\Models;
namespace App\Models\Traits;
use Illuminate\Support\Facades\Auth;
use App\Models\CheckoutRequest;
use App\Models\User;
// $asset->requests
// $asset->isRequestedBy($user)

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use App\Http\Traits\UniqueUndeletedTrait;
use App\Models\Traits\CompanyableTrait;
use App\Models\Traits\HasUploads;
use App\Models\Traits\Loggable;
use App\Models\Traits\Searchable;
use App\Presenters\Presentable;
use App\Presenters\UserPresenter;
@@ -224,6 +225,26 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
return false;
}
public function hasIndividualPermissions()
{
$permissions = [];
if (is_object($this->permissions)) {
$permissions = json_decode(json_encode($this->permissions), true);
}
if (is_string($this->permissions)) {
$permissions = json_decode($this->permissions, true);
}
foreach ($permissions as $permission) {
if ($permission != 0) {
return true;
}
}
return false;
}
/**
* Internally check the user permission for the given section
*

View File

@@ -34,7 +34,6 @@ use Illuminate\Notifications\Notification;
$this->file = $params['file'] ?? null;
$this->qty = $params['qty'] ?? null;
$this->note = $params['note'] ?? null;
$this->admin = $params['admin'] ?? null;
}
@@ -77,7 +76,6 @@ use Illuminate\Notifications\Notification;
'accepted_date' => $this->accepted_date,
'assigned_to' => $this->assigned_to,
'company_name' => $this->company_name,
'admin' => $this->admin,
'qty' => $this->qty,
'intro_text' => trans('mail.acceptance_asset_accepted'),
])

View File

@@ -32,7 +32,6 @@ use Illuminate\Notifications\Notification;
$this->settings = Setting::getSettings();
$this->file = $params['file'] ?? null;
$this->qty = $params['qty'] ?? null;
$this->admin = $params['admin'] ?? null;
}
/**
@@ -70,7 +69,6 @@ use Illuminate\Notifications\Notification;
'accepted_date' => $this->accepted_date,
'assigned_to' => $this->assigned_to,
'company_name' => $this->company_name,
'admin' => $this->admin,
'qty' => $this->qty,
'intro_text' => trans_choice('mail.acceptance_asset_accepted_to_user', $this->qty, ['qty' => $this->qty, 'site_name' => $this->settings->site_name]),
])

View File

@@ -31,6 +31,7 @@ class AcceptanceAssetDeclinedNotification extends Notification
$this->company_name = $params['company_name'];
$this->settings = Setting::getSettings();
$this->qty = $params['qty'] ?? null;
$this->admin = $params['admin'] ?? null;
}
/**
@@ -70,7 +71,8 @@ class AcceptanceAssetDeclinedNotification extends Notification
'declined_date' => $this->declined_date,
'assigned_to' => $this->assigned_to,
'company_name' => $this->company_name,
'qty' => $this->qty,
'qty' => $this->qty,
'admin' => $this->admin,
'intro_text' => trans('mail.acceptance_asset_declined'),
])
->subject(trans('mail.acceptance_asset_declined'));

View File

@@ -93,8 +93,8 @@ class CheckoutAssetNotification extends Notification
$channel = ($this->settings->webhook_channel) ? $this->settings->webhook_channel : '';
$fields = [
trans('general.to') => '<'.$target->present()->viewUrl().'|'.$target->display_name.'>',
trans('general.by') => '<'.$admin->present()->viewUrl().'|'.$admin->display_name.'>',
trans('general.to_user') => '<'.$target->present()->viewUrl().'|'.$target->display_name.'>',
trans('general.by_user') => '<'.$admin->present()->viewUrl().'|'.$admin->display_name.'>',
];
if ($item->location) {

View File

@@ -24,6 +24,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Blade;
/**
* This service provider handles setting the observers on models
@@ -42,6 +43,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(UrlGenerator $url)
{
/**
* This is a workaround for proxies/reverse proxies that don't always pass the proper headers.
*
@@ -76,6 +80,9 @@ class AppServiceProvider extends ServiceProvider
Consumable::observe(ConsumableObserver::class);
License::observe(LicenseObserver::class);
Setting::observe(SettingObserver::class);
// https://laravel.com/docs/11.x/blade#html-entity-encoding
Blade::withoutDoubleEncoding();
}
/**

View File

@@ -18,9 +18,10 @@ $dump_options = [
//'add_extra_option' => '--optionname=optionvalue',
];
// Some versions of mysql do not support the --skip-ssl option and will fail if it is even set
// For modern versions of mysqldump, use --ssl-mode=DISABLED
if (env('DB_DUMP_SKIP_SSL') == 'true') {
$dump_options['skip_ssl'] = true;
// Correctly add the option as a string to the 'add_extra_option' key.
$dump_options['add_extra_option'] = '--ssl-mode=DISABLED';
}

View File

@@ -9,11 +9,9 @@
return [
'Global' => [
'Superuser' => [
[
'permission' => 'superuser',
'label' => 'Super User',
'note' => 'Determines whether the user has full access to all aspects of the admin. This setting overrides any more specific permissions throughout the system. ',
'display' => true,
],
],
@@ -21,17 +19,13 @@ return [
'Admin' => [
[
'permission' => 'admin',
'label' => '',
'note' => 'Determines whether the user has access to most aspects of the admin. ',
'display' => true,
],
],
'CSV Import' => [
'Import' => [
[
'permission' => 'import',
'label' => '',
'note' => 'This will allow users to import even if access to users, assets, etc is denied elsewhere.',
'display' => true,
],
],
@@ -39,8 +33,6 @@ return [
'Reports' => [
[
'permission' => 'reports.view',
'label' => 'View',
'note' => 'Determines whether the user has the ability to view reports.',
'display' => true,
],
],
@@ -48,68 +40,48 @@ return [
'Assets' => [
[
'permission' => 'assets.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => false,
],
[
'permission' => 'assets.checkin',
'label' => 'Checkin ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.audit',
'label' => 'Audit ',
'note' => 'Allows the user to mark an asset as physically inventoried.',
'display' => true,
],
[
'permission' => 'assets.view.requestable',
'label' => 'View Requestable Assets',
'note' => '',
'display' => true,
],
[
'permission' => 'assets.view.encrypted_custom_fields',
'label' => 'View and Modify Encrypted Custom Fields',
'note' => '',
'display' => true,
],
@@ -118,44 +90,30 @@ return [
'Accessories' => [
[
'permission' => 'accessories.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.checkin',
'label' => 'Checkin ',
'note' => '',
'display' => true,
],
[
'permission' => 'accessories.files',
'label' => 'View and Modify Accessory Files',
'note' => '',
'display' => true,
],
@@ -164,38 +122,26 @@ return [
'Consumables' => [
[
'permission' => 'consumables.view',
'label' => 'View',
'note' => '',
'display' => true,
],
[
'permission' => 'consumables.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'consumables.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'consumables.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
[
'permission' => 'consumables.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
[
'permission' => 'consumables.files',
'label' => 'View and Modify Consumable Files',
'note' => '',
'display' => true,
],
],
@@ -204,50 +150,34 @@ return [
'Licenses' => [
[
'permission' => 'licenses.view',
'label' => 'View',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.checkin',
'label' => 'Checkin ',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.keys',
'label' => 'View License Keys',
'note' => '',
'display' => true,
],
[
'permission' => 'licenses.files',
'label' => 'View and Modify License Files',
'note' => '',
'display' => true,
],
],
@@ -256,44 +186,30 @@ return [
'Components' => [
[
'permission' => 'components.view',
'label' => 'View',
'note' => '',
'display' => true,
],
[
'permission' => 'components.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'components.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'components.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
[
'permission' => 'components.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
[
'permission' => 'components.checkin',
'label' => 'Checkin ',
'note' => '',
'display' => true,
],
[
'permission' => 'components.files',
'label' => 'View and Modify Component Files',
'note' => '',
'display' => true,
],
@@ -302,26 +218,18 @@ return [
'Kits' => [
[
'permission' => 'kits.view',
'label' => 'View ',
'note' => 'These are predefined kits that can be used to quickly checkout assets, licenses, etc.',
'display' => true,
],
[
'permission' => 'kits.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'kits.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'kits.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -329,26 +237,18 @@ return [
'Users' => [
[
'permission' => 'users.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'users.create',
'label' => 'Create Users',
'note' => '',
'display' => true,
],
[
'permission' => 'users.edit',
'label' => 'Edit Users',
'note' => '',
'display' => true,
],
[
'permission' => 'users.delete',
'label' => 'Delete Users',
'note' => '',
'display' => true,
],
@@ -357,26 +257,18 @@ return [
'Models' => [
[
'permission' => 'models.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'models.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'models.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'models.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
@@ -385,26 +277,18 @@ return [
'Categories' => [
[
'permission' => 'categories.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'categories.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'categories.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'categories.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -412,26 +296,18 @@ return [
'Departments' => [
[
'permission' => 'departments.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'departments.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'departments.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'departments.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -439,26 +315,18 @@ return [
'Status Labels' => [
[
'permission' => 'statuslabels.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'statuslabels.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'statuslabels.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'statuslabels.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -466,26 +334,18 @@ return [
'Custom Fields' => [
[
'permission' => 'customfields.view',
'label' => 'View',
'note' => '',
'display' => true,
],
[
'permission' => 'customfields.create',
'label' => 'Create',
'note' => '',
'display' => true,
],
[
'permission' => 'customfields.edit',
'label' => 'Edit',
'note' => '',
'display' => true,
],
[
'permission' => 'customfields.delete',
'label' => 'Delete',
'note' => '',
'display' => true,
],
],
@@ -493,26 +353,18 @@ return [
'Suppliers' => [
[
'permission' => 'suppliers.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'suppliers.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'suppliers.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'suppliers.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -521,26 +373,18 @@ return [
'Manufacturers' => [
[
'permission' => 'manufacturers.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'manufacturers.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'manufacturers.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'manufacturers.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -548,26 +392,18 @@ return [
'Depreciations' => [
[
'permission' => 'depreciations.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'depreciations.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'depreciations.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'depreciations.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -575,26 +411,18 @@ return [
'Locations' => [
[
'permission' => 'locations.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'locations.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'locations.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'locations.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
@@ -602,66 +430,46 @@ return [
'Companies' => [
[
'permission' => 'companies.view',
'label' => 'View ',
'note' => '',
'display' => true,
],
[
'permission' => 'companies.create',
'label' => 'Create ',
'note' => '',
'display' => true,
],
[
'permission' => 'companies.edit',
'label' => 'Edit ',
'note' => '',
'display' => true,
],
[
'permission' => 'companies.delete',
'label' => 'Delete ',
'note' => '',
'display' => true,
],
],
'Self' => [
'User (Self) Accounts' => [
[
'permission' => 'self.two_factor',
'label' => 'Two-Factor Authentication',
'note' => 'The user may disable/enable two-factor authentication themselves if two-factor is enabled and set to selective.',
'display' => true,
],
[
'permission' => 'self.api',
'label' => 'Create API Keys',
'note' => 'The user create personal API keys to utilize the REST API.',
'display' => true,
],
[
'permission' => 'self.edit_location',
'label' => 'Profile Edit Location',
'note' => 'The user may update their own location in their profile. Note that this is not affected by any additional Users permissions you grant to this user or group.',
'display' => true,
],
[
'permission' => 'self.checkout_assets',
'label' => 'Self-Checkout',
'note' => 'This user may check out assets that are marked for self-checkout.',
'display' => true,
],
[
'permission' => 'self.view_purchase_cost',
'label' => 'View Purchase-Cost Column',
'note' => 'This user can see the purchase cost column of items assigned to them.',
'display' => true,
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{
"/js/dist/all.js": "/js/dist/all.js?id=5c191843e0bb9292ec6b7f0a3c5765b3",
"/js/dist/all.js": "/js/dist/all.js?id=6ffdb46d7dcfceb395f453e15cfbc4be",
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=bf1a348eae3e60c62b8879953f7df14c",
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=f712d11cfca345b58c1d8a35df03d38d",
"/css/build/overrides.css": "/css/build/overrides.css?id=fec94887d3bd4899176e7172e315c961",
"/css/build/app.css": "/css/build/app.css?id=1b2aad9b78c526c9ac324a147a4848e6",
"/css/build/overrides.css": "/css/build/overrides.css?id=3a3b20a7cde391756b707a67a3e297e4",
"/css/build/app.css": "/css/build/app.css?id=86244e556cc26877415e9ab63e8b7e33",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=bdf169bc2141f453390614c138cdce95",
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=e1e6e1c64cf14fc350585aaeb0e42f6b",
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=08ae1b3e66008966ce5d600ea3ad04a2",
@@ -19,7 +19,7 @@
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=68a92d85c8e351dfb38a835307f126ec",
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=cbb20ad6182b658f34117bf96a621b63",
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=84e2ee950ae04444988b37038e5a3951",
"/css/dist/all.css": "/css/dist/all.css?id=ebce085e83406391a6003079f8a304b0",
"/css/dist/all.css": "/css/dist/all.css?id=d025bd7724d6b3510b3818f6f120f6ef",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",

View File

@@ -579,6 +579,8 @@ function htmlEntities(str) {
})(jQuery);
/**
* Universal Livewire Select2 integration
*
@@ -610,3 +612,105 @@ document.addEventListener('livewire:init', () => {
});
});
});
// Check/Uncheck all radio buttons in the permissions group
$('.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});
// Generic toggleable callouts with remember state
$(".remember-toggle").on("click",function(){
var toggleable_callout_id = $(this).attr('id');
var toggle_content_class = 'toggle-content-'+$(this).attr('id');
var toggle_arrow = '#toggle-arrow-' + toggleable_callout_id;
var toggle_cookie_name='toggle_state_'+toggleable_callout_id;
console.log('Callout ID: ' + toggleable_callout_id);
console.log('Content ID: '+toggle_content_class);
console.log('Arrow ID: '+toggle_arrow);
console.log('Cookie Name: '+toggle_cookie_name);
$('.'+toggle_content_class).fadeToggle(100);
$(toggle_arrow).toggleClass('fa-caret-right fa-caret-down');
var toggle_open = $(toggle_arrow).hasClass('fa-caret-down');
console.log('Cookie will set open state to: '+toggle_open);
document.cookie=toggle_cookie_name+"="+toggle_open+';path=/';
});
var all_cookies = document.cookie.split(';')
for (var i in all_cookies) {
var trimmed_cookie = all_cookies[i].trim(' ')
elems = all_cookies[i].split('=', 2);
// We have to do more here since we don't know the name of the selector
if (trimmed_cookie.startsWith('toggle_state_')) {
console.log(trimmed_cookie + ' matches toggle_state_');
var toggle_selector_name = elems[0].replace(' toggle_state_','');
if (elems[1] == 'true') {
console.log('Selector name for cookie click trigger: '+toggle_selector_name);
$('#'+toggle_selector_name+'.remember-toggle').trigger('click')
}
}
}
/**
* This handles the show/hide of superuser and admin specific permissions
* on the group edit and user edit pages
*/
if ($("#superuser_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonsuperuser").hide();
$(".nonsuperuser").attr('display','none');
}
$(".superuser").change(function() {
if ($(this).val() == '1') {
$(".nonsuperuser").fadeOut();
$(".nonsuperuser").attr('display','none');
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonsuperuser").fadeIn();
$(".nonsuperuser").attr('display','block');
// If the superuser button has been set to deny, we need to
// check that the admin button isn't set to allow, before we show non-admin stuff
if ($("#admin_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display','none');
}
}
});
if ($("#admin_allow").is(':checked')) {
// Hide here instead of fadeout on pageload to prevent what looks like Flash Of Unstyled Content (FOUC)
$(".nonadmin").hide();
$(".nonadmin").attr('display','none');
}
$(".admin").change(function() {
if ($(this).val() == '1') {
$(".nonadmin").fadeOut();
$(".nonadmin").attr('display','none');
} else if ($(this).val() != '1') {
$(".nonadmin").fadeIn();
$(".nonadmin").attr('display','block');
}
});

View File

@@ -1175,10 +1175,6 @@ input[type="radio"]:checked::before {
display: table-row !important;
}
.form-control-static {
padding-top: 0px;
}
td.text-right.text-padding-number-cell {
padding-right: 30px !important;
@@ -1275,6 +1271,7 @@ input[name="columnsSearch"] {
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@@ -1288,7 +1285,8 @@ input[name="columnsSearch"] {
}
p.callout-subtext {
margin-top: 5px;
color:#333;
margin-top: 5px;
}
p.callout-subtext a:hover, p.callout-subtext a:visited, p.callout-subtext a:link {
@@ -1301,4 +1299,66 @@ This just hides the padding on the right side of the mark tag for a less weird v
*/
mark {
padding-right: 0px;
}
/**
Radio toggle styles for permission settings and check/uncheck all
*/
.radio-toggle-wrapper {
display: flex;
padding: 2px;
background-color: #e9e9e9;
margin-bottom: 3px;
border-radius: 4px;
border: 1px #d6d6d6 solid;
}
.radio-slider-inputs {
flex-grow: 1;
}
.radio-slider-inputs input[type=radio] {
display: none;
}
.radio-slider-inputs label {
display: block;
margin-bottom: 0px;
padding: 6px 8px;
color: #fff;
font-weight: bold;
text-align: center;
transition : all .4s 0s ease;
cursor: pointer;
}
.radio-slider-inputs label {
color: #9a9999;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .allow:checked + label {
background-color: green;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.radio-slider-inputs .inherit:checked + label {
background-color: rgba(255, 204, 51, 0.11);
color: #9a9999;
border-radius: 4px;
border: 1px white solid;
}
.radio-slider-inputs .deny:checked + label {
background-color: #a94442;
color: white;
border-radius: 4px;
border: 1px transparent solid;
}
.remember-toggle {
cursor: pointer;
}

View File

@@ -2,7 +2,7 @@
return [
'select_type' => 'Select Maintenance Type',
'asset_maintenance_type' => 'Asset Maintenance Type',
'asset_maintenance_type' => 'Maintenance Type',
'title' => 'Title',
'start_date' => 'Start Date',
'completion_date' => 'Completion Date',

View File

@@ -416,6 +416,9 @@ return [
'manager_view' => 'Manager View',
'manager_view_enabled_text' => 'Enable Manager View',
'manager_view_enabled_help' => 'Allow managers to view assigned items to their direct and indirect reports in their account view.',
'redirect_url' => 'Redirect URL',
'client_secret' => 'Client Secret',
'client_id' => 'Client ID',
'username_formats' => [
'username_format' => 'Username Format',

View File

@@ -15,7 +15,8 @@ return [
'info' => 'Info',
'restore_user' => 'Click here to restore them.',
'last_login' => 'Last Login',
'ldap_config_text' => 'LDAP configuration settings can be found Admin > Settings. The (optional) selected location will be set for all imported users.',
'ldap_config_text' => 'The selected location will be set for ALL imported users. This will overwrite their existing location, and is an unusual use-case, so leaving this blank is typically best.',
'ldap_sync_intro' => 'Click on the button below to manually sync your LDAP users. To learn more about configuring LDAP sync to run automatically, please see the <a href=":link" target="_blank">documentation <i class="fa fa-external-link"></i></a> .',
'print_assigned' => 'Print All Assigned',
'email_assigned' => 'Email List of All Assigned',
'user_notified' => 'User has been emailed a list of their currently assigned items.',
@@ -53,4 +54,6 @@ return [
'all_assigned_list_generation' => 'Generated on:',
'email_user_creds_on_create' => 'Email this user their credentials?',
'department_manager' => 'Department Manager',
'generate_password' => 'Generate random password',
'individual_override' => 'This user has at least one individual permission set, which may override group permissions.',
];

View File

@@ -2,8 +2,8 @@
return array(
'accepted' => 'You have successfully accepted this asset.',
'declined' => 'You have successfully declined this asset.',
'accepted' => 'You have successfully accepted this item.',
'declined' => 'You have successfully declined this item.',
'bulk_manager_warn' => 'Your users have been successfully updated, however your manager entry was not saved because the manager you selected was also in the user list to be edited, and users may not be their own manager. Please select your users again, excluding the manager.',
'user_exists' => 'User already exists!',
'user_not_found' => 'User does not exist or you do not have permission view them.',

View File

@@ -350,6 +350,7 @@ return [
'login_disabled' => 'Login Disabled',
'audit_due' => 'Due for Audit',
'audit_due_days' => '{}Assets Due or Overdue for Audit|[1]Assets Due or Overdue for Audit Within a Day|[2,*]Assets Due or Overdue for Audit Within :days Days',
'audit_due_days_view_all' => '{}Assets Due or Overdue for Audit|[1]View All Assets Due or Overdue for Audit Within a Day|[2,*]View All Assets Due or Overdue for Audit Within :days Days',
'checkin_due' => 'Due for Checkin',
'checkin_overdue' => 'Overdue for Checkin',
'checkin_due_days' => '{}Due for Checkin|[1]Assets Due for Checkin Within :days Day|[2,*]Assets Due for Checkin Within :days Days',
@@ -390,6 +391,7 @@ return [
'reminder_checked_out_items' => 'This is a reminder of the items currently checked out to you. If you feel this list is inaccurate (something is missing, or something appears here that you believe you never received), please email :reply_to_name at :reply_to_address.',
'changed' => 'Changed',
'to' => 'To',
'to_user' => 'To',
'report_fields_info' => '<p>Select the fields you would like to include in your custom report, and click Generate. The file (custom-asset-report-YYYY-mm-dd.csv) will download automatically, and you can open it in Excel.</p>
<p>If you would like to export only certain assets, use the options below to fine-tune your results.</p>',
'range' => 'Range',
@@ -615,6 +617,8 @@ return [
'user_managed_passwords_allow' => 'Allow users to manage their own passwords',
'from' => 'From',
'by' => 'By',
'by_user' => 'By',
'ldap_sync_location' => 'Sync All Users to This Location (Optional)',
'version' => 'Version',
'build' => 'build',
'use_cloned_image' => 'Clone image from original',

View File

@@ -100,7 +100,8 @@ return [
'the_following_item' => 'The following item has been checked in: ',
'to_reset' => 'To reset your :web password, complete this form:',
'type' => 'Type',
'upcoming-audits' => 'There is :count asset that is coming up for audit within :threshold days.|There are :count assets that are coming up for audit within :threshold days.',
'upcoming-audits' => 'There is :count asset that is coming up for audit within :threshold days.|There are :count assets that are coming up for audit within :threshold days. ',
'upcoming-audits_click' => 'This email may not contain the full list so as not to exceed email size limits. Click on the button below to view all assets due for audit.',
'user' => 'User',
'username' => 'Username',
'unaccepted_asset_reminder' => 'Reminder: You have Unaccepted Assets.',

View File

@@ -0,0 +1,424 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Permissions
|--------------------------------------------------------------------------
| The following language lines are used in the user permissions system.
| Each permission has a 'name' and a 'note' that describes
| the permission in detail.
|
| DO NOT edit the keys (left-hand side) of each permission as these are
| used throughout the system for translations.
|---------------------------------------------------------------------------
*/
"superuser" => [
'name' => 'Super User',
'note' => 'Determines whether the user has full access to all aspects of the admin. This setting overrides ALL more specific and restrictive permissions throughout the system. ',
],
'admin' => [
'name' => 'Admin Access',
'note' => 'Determines whether the user has access to most aspects of the system EXCEPT the System Admin Settings. These users will be able to manage users, locations, categories, etc, but ARE constrained by Full Multiple Company Support if it is enabled.',
],
'import' => [
'name' => 'CSV Import',
'note' => 'This will allow users to import even if access to users, assets, etc is denied elsewhere.',
],
'reports' => [
'name' => 'Reports Access',
'note' => 'Determines whether the user has access to the Reports section of the application.',
],
'assets' =>
[
'name' => 'Assets',
'note' => 'Grants access to the Assets section of the application.',
],
'assetsview' => [
'name' => 'View Assets',
],
'assetscreate' => [
'name' => 'Create New Assets',
],
'assetsedit' => [
'name' => 'Edit Assets',
],
'assetsdelete' => [
'name' => 'Delete Assets',
],
'assetscheckin' => [
'name' => 'Check In',
'note' => 'Check assets back into inventory that are currently checked out.',
],
'assetscheckout' => [
'name' => 'Check Out',
'note' => 'Assign assets in inventory by checking them out.',
],
'assetsaudit' => [
'name' => 'Audit Assets',
'note' => 'Allows the user to mark an asset as physically inventoried.',
],
'assetsviewrequestable' => [
'name' => 'View Requestable Assets',
'note' => 'Allows the user to view assets that are marked as requestable.',
],
'assetsviewencrypted-custom-fields' => [
'name' => 'View Encrypted Custom Fields',
'note' => 'Allows the user to view and modify encrypted custom fields on assets.',
],
'accessories' => [
'name' => 'Accessories',
'note' => 'Grants access to the Accessories section of the application.',
],
'accessoriesview' => [
'name' => 'View Accessories',
],
'accessoriescreate' => [
'name' => 'Create New Accessories',
],
'accessoriesedit' => [
'name' => 'Edit Accessories',
],
'accessoriesdelete' => [
'name' => 'Delete Accessories',
],
'accessoriescheckout' => [
'name' => 'Check Out Accessories',
'note' => 'Assign accessories in inventory by checking them out.',
],
'accessoriescheckin' => [
'name' => 'Check In Accessories',
'note' => 'Check accessories back into inventory that are currently checked out.',
],
'accessoriesfiles' => [
'name' => 'Manage Accessory Files',
'note' => 'Allows the user to upload, download, and delete files associated with accessories.',
],
'consumables' => [
'name' => 'Consumables',
'note' => 'Grants access to the Consumables section of the application.',
],
'consumablesview' => [
'name' => 'View Consumables',
],
'consumablescreate' => [
'name' => 'Create New Consumables',
],
'consumablesedit' => [
'name' => 'Edit Consumables',
],
'consumablesdelete' => [
'name' => 'Delete Consumables',
],
'consumablescheckout' => [
'name' => 'Check Out Consumables',
'note' => 'Assign consumables in inventory by checking them out.',
],
'consumablesfiles' => [
'name' => 'Manage Consumable Files',
'note' => 'Allows the user to upload, download, and delete files associated with consumables.',
],
'licenses' => [
'name' => 'Licenses',
'note' => 'Grants access to the Licenses section of the application.',
],
'licensesview' => [
'name' => 'View Licenses',
],
'licensescreate' => [
'name' => 'Create New Licenses',
],
'licensesedit' => [
'name' => 'Edit Licenses',
],
'licensesdelete' => [
'name' => 'Delete Licenses',
],
'licensescheckout' => [
'name' => 'Assign Licenses',
'note' => 'Allows the user to assign licenses to assets or users.',
],
'licensescheckin' => [
'name' => 'Unassign Licenses',
'note' => 'Allows the user to unassign licenses from assets or users.',
],
'licensesfiles' => [
'name' => 'Manage License Files',
'note' => 'Allows the user to upload, download, and delete files associated with licenses.',
],
'licenseskeys' => [
'name' => 'Manage License Keys',
'note' => 'Allows the user to view product keys associated with licenses.',
],
'components' => [
'name' => 'Components',
'note' => 'Grants access to the Components section of the application.',
],
'componentsview' => [
'name' => 'View Components',
],
'componentscreate' => [
'name' => 'Create New Components',
],
'componentsedit' => [
'name' => 'Edit Components',
],
'componentsdelete' => [
'name' => 'Delete Components',
],
'componentsfiles' => [
'name' => 'Manage Component Files',
'note' => 'Allows the user to upload, download, and delete files associated with components.',
],
'componentscheckout' => [
'name' => 'Check Out Components',
'note' => 'Assign components in inventory by checking them out.',
],
'componentscheckin' => [
'name' => 'Check In Components',
'note' => 'Check components back into inventory that are currently checked out.',
],
'kits' => [
'name' => 'Predefined Kits',
'note' => 'Grants access to the Predefined Kits section of the application.',
],
'kitsview' => [
'name' => 'View Predefined Kits',
],
'kitscreate' => [
'name' => 'Create New Predefined Kits',
],
'kitsedit' => [
'name' => 'Edit Predefined Kits',
],
'kitsdelete' => [
'name' => 'Delete Predefined Kits',
],
'users' => [
'name' => 'Users',
'note' => 'Grants access to the Users section of the application.',
],
'usersview' => [
'name' => 'View Users',
],
'userscreate' => [
'name' => 'Create New Users',
],
'usersedit' => [
'name' => 'Edit Users',
],
'usersdelete' => [
'name' => 'Delete Users',
],
'models' => [
'name' => 'Models',
'note' => 'Grants access to the Models section of the application.',
],
'modelsview' => [
'name' => 'View Models',
],
'modelscreate' => [
'name' => 'Create New Models',
],
'modelsedit' => [
'name' => 'Edit Models',
],
'modelsdelete' => [
'name' => 'Delete Models',
],
'categories' => [
'name' => 'Categories',
'note' => 'Grants access to the Categories section of the application.',
],
'categoriesview' => [
'name' => 'View Categories',
],
'categoriescreate' => [
'name' => 'Create New Categories',
],
'categoriesedit' => [
'name' => 'Edit Categories',
],
'categoriesdelete' => [
'name' => 'Delete Categories',
],
'departments' => [
'name' => 'Departments',
'note' => 'Grants access to the Departments section of the application.',
],
'departmentsview' => [
'name' => 'View Departments',
],
'departmentscreate' => [
'name' => 'Create New Departments',
],
'departmentsedit' => [
'name' => 'Edit Departments',
],
'departmentsdelete' => [
'name' => 'Delete Departments',
],
'locations' => [
'name' => 'Locations',
'note' => 'Grants access to the Locations section of the application.',
],
'locationsview' => [
'name' => 'View Locations',
],
'locationscreate' => [
'name' => 'Create New Locations',
],
'locationsedit' => [
'name' => 'Edit Locations',
],
'locationsdelete' => [
'name' => 'Delete Locations',
],
'status-labels' => [
'name' => 'Status Labels',
'note' => 'Grants access to the Status Labels section of the application used by Assets.',
],
'statuslabelsview' => [
'name' => 'View Status Labels',
],
'statuslabelscreate' => [
'name' => 'Create New Status Labels',
],
'statuslabelsedit' => [
'name' => 'Edit Status Labels',
],
'statuslabelsdelete' => [
'name' => 'Delete Status Labels',
],
'custom-fields' => [
'name' => 'Custom Fields',
'note' => 'Grants access to the Custom Fields section of the application used by Assets.',
],
'customfieldsview' => [
'name' => 'View Custom Fields',
],
'customfieldscreate' => [
'name' => 'Create New Custom Fields',
],
'customfieldsedit' => [
'name' => 'Edit Custom Fields',
],
'customfieldsdelete' => [
'name' => 'Delete Custom Fields',
],
'suppliers' => [
'name' => 'Suppliers',
'note' => 'Grants access to the Suppliers section of the application.',
],
'suppliersview' => [
'name' => 'View Suppliers',
],
'supplierscreate' => [
'name' => 'Create New Suppliers',
],
'suppliersedit' => [
'name' => 'Edit Suppliers',
],
'suppliersdelete' => [
'name' => 'Delete Suppliers',
],
'manufacturers' => [
'name' => 'Manufacturers',
'note' => 'Grants access to the Manufacturers section of the application.',
],
'manufacturersview' => [
'name' => 'View Manufacturers',
],
'manufacturerscreate' => [
'name' => 'Create New Manufacturers',
],
'manufacturersedit' => [
'name' => 'Edit Manufacturers',
],
'manufacturersdelete' => [
'name' => 'Delete Manufacturers',
],
'companies' => [
'name' => 'Companies',
'note' => 'Grants access to the Companies section of the application.',
],
'companiesview' => [
'name' => 'View Companies',
],
'companiescreate' => [
'name' => 'Create New Companies',
],
'companiesedit' => [
'name' => 'Edit Companies',
],
'companiesdelete' => [
'name' => 'Delete Companies',
],
'user-self-accounts' => [
'name' => 'User Self Accounts',
'note' => 'Grants non-admin users the ability to manage certain aspects of their own user accounts.',
],
'selftwo-factor' => [
'name' => 'Manage Two-Factor Authentication',
'note' => 'Allows users to enable, disable, and manage two-factor authentication for their own accounts.',
],
'selfapi' => [
'name' => 'Manage API Tokens',
'note' => 'Allows users to create, view, and revoke their own API tokens. User tokens will have the same permissions as the user who created them.',
],
'selfedit-location' => [
'name' => 'Edit Location',
'note' => 'Allows users to edit the location associated with their own user account.',
],
'selfcheckout-assets' => [
'name' => 'Self Check Out Assets',
'note' => 'Allows users to check out assets to themselves without admin intervention.',
],
'selfview-purchase-cost' => [
'name' => 'View Purchase Cost',
'note' => 'Allows users to view the purchase cost of items in their account view.',
],
'depreciations' => [
'name' => 'Depreciation Management',
'note' => 'Allows users to manage and view asset depreciation details.',
],
'depreciationsview' => [
'name' => 'View Depreciation Details',
],
'depreciationsedit' => [
'name' => 'Edit Depreciation Settings',
],
'depreciationsdelete' => [
'name' => 'Delete Depreciation Records',
],
'depreciationscreate' => [
'name' => 'Create Depreciation Records',
],
'grant_all' => 'Grant all permissions for :area',
'deny_all' => 'Deny all permissions for :area',
'inherit_all' => 'Inherit all permissions for :area from permission groups',
'grant' => 'Grant Permission for :area',
'deny' => 'Deny Permission for :area',
'inherit' => 'Inherit Permission for :area from permission groups',
'use_groups' => 'We strongly suggest using Permission Groups instead of assigning individual permissions for easier management.'
);

View File

@@ -0,0 +1,47 @@
@props([
'item' => null,
'border_class' => 'default',
'header_icon' => null,
'form_route' => null,
])
<div {{ $attributes->merge(['class' => 'col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0']) }}>
<!-- CSRF Token -->
{{ csrf_field() }}
<div class="box box-{{ $border_class }}">
<!-- .box-header -->
<div class="box-header with-border">
<h2 class="box-title">
@if ($header_icon)
<x-icon type="{{ $header_icon }}" class="box-header-icon" />
@endif
{{ ($item->id) ? $item->display_name : trans('general.create') }}
</h2>
</div>
<!-- /.box-header -->
<!-- box-body -->
<div class="box-body">
{{ $slot }}
</div>
<!-- /.box-body -->
<div class="box-footer text-right">
<button type="submit" class="btn btn-success">
<x-icon type="checkmark" />
{{ trans('general.save') }}
</button>
</div>
<!-- /.box-footer -->
</div> <!-- /.box-default -->
</div>

View File

@@ -0,0 +1,7 @@
<!-- Help Text -->
<div {{ $attributes->merge(['class' => 'col-md-8 col-md-offset-3']) }}>
<p class="help-block">
{{ $slot }}
</p>
</div>

View File

@@ -0,0 +1,7 @@
<!-- Info Tooltip -->
<div class="col-md-1 text-left" style="padding-left:0; margin-top: 5px;">
<x-form-tooltip>
{{ $slot }}
</x-form-tooltip>
</div>

View File

@@ -0,0 +1,71 @@
@aware(['name'])
@props([
'class' => null,
'new_model' => false,
'category_type' => null,
'modal_type' => false,
'modal_id' => false,
])
<?php
// Let's set some sane defaults here for smaller fields
// This uses the form name to determine the appropriate class
switch ($name) {
case 'qty':
case 'min_amt':
case 'seats':
$class_override = $new_model ? 'col-md-3' : 'col-md-4';
break;
case 'purchase_cost':
case 'purchase_date':
case 'termination_date':
case 'expiration_date':
case 'start_date':
case 'end_date':
$class_override = $new_model ? 'col-md-4' : 'col-md-5';
break;
case 'model_number':
case 'item_no':
case 'order_number':
case 'purchase_order':
$class_override = $new_model ? 'col-md-5' : 'col-md-6';
break;
default:
$class_override = $new_model ? 'col-md-7' : 'col-md-8';
break;
}
// Use the explicit override if one is set
if ($class) {
$class_override = $class;
}
?>
<!-- form-input blade component -->
<div {{ $attributes->merge(['class' => $class_override]) }}>
{{ $slot }}
</div>
@if ($new_model)
<div class="col-md-1 col-sm-1">
@can('create', $new_model)
<a href='{{ route('modal.show',[
'type' => $modal_type ?? null,
'category_type' => $category_type ?? null
]) }}' data-toggle="modal" data-target="#createModal" data-select="{{ $modal_id }}" class="btn btn-sm btn-primary text-left">{{ trans('button.new') }}</a>
@endcan
</div>
@endif
@error($name)
<div class="col-md-8 col-md-offset-3">
<span class="alert-msg" aria-hidden="true">
<x-icon type="x" />
{{ $message }}
</span>
</div>
@enderror

View File

@@ -0,0 +1,6 @@
@aware(['name'])
<!-- form-label blade component -->
<label {{ $attributes->merge(['class' => 'control-label col-md-3']) }} for="{{ $name }}">
{{ $slot }}
</label>

View File

@@ -0,0 +1,9 @@
@props([
'name' => null,
])
<!-- form-row blade component -->
<div {{ $attributes->merge(['name' => $name]) }} class="form-group @error($name) has-error @enderror">
{{ $slot }}
</div>

View File

@@ -0,0 +1,4 @@
<a href="#" data-tooltip="true" title="{{ $slot }}" style="padding-left: 0px;">
<x-icon type="more-info" style="font-size: 20px;" />
<span class="sr-only">{{ $slot }}</span>
</a>

View File

@@ -0,0 +1,15 @@
@props([
'item' => null,
'update_route' => null,
'create_route' => null,
])
<form class="form-horizontal" id="create-form" method="post" action="{{ ($item->id) ? route($update_route, $item->id) : route($create_route) }}" autocomplete="off" enctype="multipart/form-data">
@if ($item->id)
{{ method_field('PUT') }}
@endif
{{ $slot }}
</form>

View File

@@ -1,13 +1,31 @@
@aware(['name'])
@props([
'value' => '',
'required' => '',
'value' => null,
'required' => false,
'end_date' => null,
'col_size_class' => null,
'name' => null,
])
<!-- Datepicker -->
<div class="input-group date {{ $col_size_class }}" data-provide="datepicker" data-date-today-highlight="true" data-date-language="{{ auth()->user()->locale }}" data-date-locale="{{ auth()->user()->locale }}" data-date-format="yyyy-mm-dd" data-date-autoclose="true" data-date-clear-btn="true"{{ $end_date ? ' data-date-end-date=' . $end_date : '' }}>
<input type="text" placeholder="{{ trans('general.select_date') }}" value="{{ $value }}" maxlength="10" {{ $attributes->merge(['class' => 'form-control']) }} {{ $required=='1' ? 'required' : '' }}>
<div
{{ $attributes->merge(['class' => 'input-group date']) }}
data-provide="datepicker"
data-date-today-highlight="true"
data-date-language="{{ auth()->user()->locale }}"
data-date-locale="{{ auth()->user()->locale }}"
data-date-format="yyyy-mm-dd"
data-date-autoclose="true"
data-date-clear-btn="true"{{ $end_date ? ' data-date-end-date=' . $end_date : '' }}>
<input
type="text"
name="{{ $name }}"
placeholder="{{ trans('general.select_date') }}"
value="{{ $value }}" maxlength="10"
{{ $attributes->merge(['class' => 'form-control']) }}
{{ $required ? ' required' : '' }}
>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>

View File

@@ -1,3 +1,5 @@
@aware(['name'])
@props([
// <options> can either be provided as key => value pairs
// or passed in via the default $slot
@@ -5,9 +7,11 @@
'selected' => null,
'includeEmpty' => false,
'forLivewire' => false,
'name' => null
])
<select
name="{{ $name }}"
{{ $attributes->class(['select2', 'livewire-select2' => $forLivewire]) }}
@if($forLivewire) data-livewire-component="{{ $this->getId() }}" @endif
>

View File

@@ -0,0 +1,44 @@
@aware(['name'])
@props([
'selected' => null,
'forLivewire' => false,
'data_endpoint' => false,
'data_placeholder' => false,
'multiple' => false,
'item_model' => null,
'name' => null,
'new_button' => false,
])
@if (!$selected)
@php
$selected = old($name);
@endphp
@endif
<select
{{ ($multiple == 'true')? ' multiple' : '' }}
{{ $attributes->class(['js-data-ajax select2', 'livewire-select2' => $forLivewire])->style(['width:100%']) }}
@if($forLivewire) data-livewire-component="{{ $this->getId() }}" @endif
data-endpoint="{{ $data_endpoint }}"
data-placeholder="{{ $data_placeholder }}"
name="{{ $name }}"
>
@if ($selected)
@if (is_integer($selected))
<option value="{{ $selected }}" selected="selected" role="option" aria-selected="true">
{{ $item_model::find($selected) ? $item_model::find($selected)->display_name : '' }}
</option>
@else
@foreach ($selected as $key => $id)
<option value="{{ $id }}" selected="selected" role="option" aria-selected="true">
{{ $item_model::find($id) ? $item_model::find($id)->display_name : '' }}
</option>
@endforeach
@endif
@endif
</select>

View File

@@ -0,0 +1,7 @@
@props([
'static_value' => false,
])
<p class="form-control-static">
{{ $slot ?? $static_value }}
</p>

View File

@@ -0,0 +1,31 @@
@aware(['name'])
@props([
'name' => null,
'input_group_addon' => false,
'input_icon' => false,
'input_group_text' => false,
'required' => false,
])
<!-- input-text blade component -->
@if ($input_group_addon)
<div class="input-group">
@endif
<input
{{ $attributes->merge(['class' => 'form-control']) }}
name="{{ $name }}"
@required($required)
/>
@if ($input_group_addon)
<span class="input-group-addon">
@if ($input_icon)
<x-icon :type="$input_icon" />
@elseif ($input_group_text)
{{ $input_group_text }}
@endif
</span>
</div>
@endif

View File

@@ -1,9 +1,12 @@
@aware(['name'])
@props([
'value' => '',
'rows' => 10,
'value' => null,
'rows' => 5,
'name' => null,
])
<textarea
{{ $attributes->merge(['class' => 'form-control']) }}
rows="{{ $rows }}"
name="{{ $name }}"
>{{ $value }}</textarea>

View File

@@ -9,7 +9,13 @@
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Type -->
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">

View File

@@ -4,6 +4,7 @@
'helpPosition' => 'right',
'helpText' => trans('help.components'),
'formAction' => (isset($item->id)) ? route('components.update', ['component' => $item->id]) : route('components.store'),
'container_classes' => 'col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0',
'index_route' => 'components.index',
'options' => [
'back' => trans('admin/hardware/form.redirect_to_type',['type' => trans('general.previous_page')]),
@@ -16,20 +17,127 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')])
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id','category_type' => 'component'])
@include ('partials.forms.edit.quantity')
@include ('partials.forms.edit.minimum_quantity')
<!-- Name -->
<x-form-row name="name">
<x-form-label>{{ trans('general.name') }}</x-form-label>
<x-form-input>
<x-input.text
required="true"
:value="old('name', $item->name)"
/>
</x-form-input>
</x-form-row>
<!-- Category -->
<x-form-row name="category_id">
<x-form-label>{{ trans('general.category') }}</x-form-label>
<x-form-input modal_type="category" modal_id="category_select_id" category_type="component" new_model="\App\Models\Category::class">
<x-input.select2-ajax
id="category_select_id"
:data_placeholder="trans('general.select_asset')"
:item="old('category_id', $item->category_id)"
:new_button="true"
:required="Helper::checkIfRequired($item, 'category_id')"
:selected="old('category_id', $item->category_id)"
data_endpoint="categories/component"
item_model="\App\Models\Category"
/>
</x-form-input>
</x-form-row>
<!-- QTY -->
<x-form-row name="qty">
<x-form-label>{{ trans('general.quantity') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('qty', $item->qty)"
input_min="1"
required="true"
/>
</x-form-input>
</x-form-row>
<!-- Minimum QTY -->
<x-form-row name="min_amt">
<x-form-label>{{ trans('general.min_amt') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('min_amt', $item->min_amt)"
input_min="0"
/>
</x-form-input>
<x-form-inline-tooltip>
{{ trans('general.min_amt_help') }}
</x-form-inline-tooltip>
</x-form-row>
@include ('partials.forms.edit.serial', ['fieldname' => 'serial'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
<!-- Manufacturer -->
<x-form-row name="manufacturer_id">
<x-form-label>{{ trans('general.manufacturer') }}</x-form-label>
<x-form-input modal_type="manufacturer" modal_id="manufacturer_select_id" new_model="\App\Models\Manufacturer::class">
<x-input.select2-ajax
id="manufacturer_select_id"
:data_placeholder="trans('general.manufacturer')"
:item="old('manufacturer_id', $item->manufacturer_id)"
:new_button="true"
:required="Helper::checkIfRequired($item, 'manufacturer_id')"
:selected="old('manufacturer_id', $item->manufacturer_id)"
data_endpoint="manufacturers"
item_model="\App\Models\Manufacturer"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.model_number')
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
@include ('partials.forms.edit.order_number')
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
@include ('partials.forms.edit.purchase_cost', ['unit_cost' => trans('general.unit_cost')])
@include ('partials.forms.edit.notes')
<!--- Purchase Date -->
<x-form-row name="purchase_date">
<x-form-label>{{ trans('general.purchase_date') }}</x-form-label>
<x-form-input>
<x-input.datepicker :value="old('purchase_date', $item->purchase_date_for_datepicker)" />
</x-form-input>
</x-form-row>
<!-- Purchase Cost -->
<x-form-row name="purchase_cost">
<x-form-label>{{ trans('general.unit_cost') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:input_group_text="$snipeSettings->default_currency"
:value="old('purchase_cost', $item->purchase_cost)"
input_group_addon="left"
input_max="99999999999999999.000"
input_min="0"
input_min="0.00"
input_step="0.001"
maxlength="25"
/>
</x-form-input>
</x-form-row>
<!-- Notes -->
<x-form-row name="notes">
<x-form-label>{{ trans('general.notes') }}</x-form-label>
<x-form-input>
<x-input.textarea
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')])

View File

@@ -5,6 +5,7 @@
'helpText' => trans('help.consumables'),
'formAction' => (isset($item->id)) ? route('consumables.update', ['consumable' => $item->id]) : route('consumables.store'),
'index_route' => 'consumables.index',
'container_classes' => 'col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0',
'options' => [
'back' => trans('admin/hardware/form.redirect_to_type',['type' => trans('general.previous_page')]),
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => 'consumables']),
@@ -15,19 +16,115 @@
@section('inputFields')
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
<!-- Name -->
<x-form-row name="name">
<x-form-label>{{ trans('general.name') }}</x-form-label>
<x-form-input>
<x-input.text
required="true"
:value="old('name', $item->name)"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'consumable'])
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
@include ('partials.forms.edit.model_number')
@include ('partials.forms.edit.item_number')
@include ('partials.forms.edit.order_number')
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
@include ('partials.forms.edit.purchase_cost', [ 'unit_cost' => trans('general.unit_cost')])
@include ('partials.forms.edit.quantity')
@include ('partials.forms.edit.minimum_quantity')
@include ('partials.forms.edit.notes')
<!-- Model Number -->
<x-form-row name="model_number">
<x-form-label>{{ trans('general.model_no') }}</x-form-label>
<x-form-input>
<x-input.text :value="old('model_number', $item->model_number)"
/>
</x-form-input>
</x-form-row>
<!-- Item Number -->
<x-form-row name="item_no">
<x-form-label>{{ trans('admin/consumables/general.item_no') }}</x-form-label>
<x-form-input>
<x-input.text :value="old('item_no', $item->item_no)" />
</x-form-input>
</x-form-row>
<!-- Order Number -->
<x-form-row name="order_number">
<x-form-label>{{ trans('general.order_number') }}</x-form-label>
<x-form-input>
<x-input.text :value="old('order_number', $item->order_number)" />
</x-form-input>
</x-form-row>
<!--- Purchase Date -->
<x-form-row name="purchase_date">
<x-form-label>{{ trans('general.purchase_date') }}</x-form-label>
<x-form-input>
<x-input.datepicker :value="old('purchase_date', $item->purchase_date_for_datepicker)" />
</x-form-input>
</x-form-row>
<!-- Purchase Cost -->
<x-form-row name="purchase_cost">
<x-form-label>{{ trans('general.unit_cost') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:input_group_text="$snipeSettings->default_currency"
:value="old('purchase_cost', $item->purchase_cost)"
input_group_addon="left"
input_max="99999999999999999.000"
input_min="0"
input_min="0.00"
input_step="0.001"
maxlength="25"
/>
</x-form-input>
</x-form-row>
<!-- QTY -->
<x-form-row name="qty">
<x-form-label>{{ trans('general.quantity') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('qty', $item->qty)"
input_min="1"
required="true"
/>
</x-form-input>
</x-form-row>
<!-- Minimum QTY -->
<x-form-row name="min_amt">
<x-form-label>{{ trans('general.min_amt') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('min_amt', $item->min_amt)"
input_min="0"
/>
</x-form-input>
<x-form-inline-tooltip>
{{ trans('general.min_amt_help') }}
</x-form-inline-tooltip>
</x-form-row>
<!-- Notes -->
<x-form-row name="notes">
<x-form-label>{{ trans('general.notes') }}</x-form-label>
<x-form-input>
<x-input.textarea
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.image-upload', ['image_path' => app('consumables_upload_path')])
@stop

View File

@@ -3,67 +3,30 @@
'updateText' => trans('admin/groups/titles.update'),
'item' => $group,
'formAction' => ($group !== null && $group->id !== null) ? route('groups.update', ['group' => $group->id]) : route('groups.store'),
'container_classes' => 'col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0',
'topSubmit' => 'true',
])
@section('content')
<style>
.form-horizontal .control-label {
padding-top: 0px;
}
input[type='text'][disabled], input[disabled], textarea[disabled], input[readonly], textarea[readonly], .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
background-color: white;
color: #555555;
cursor:text;
}
table.permissions {
display:flex;
flex-direction: column;
}
.permissions.table > thead, .permissions.table > tbody {
margin: 15px;
margin-top: 0px;
}
.permissions.table > tbody {
border: 1px solid;
}
.header-row {
border-bottom: 1px solid #ccc;
}
.permissions-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.table > tbody > tr > td.permissions-item {
padding: 1px;
padding-left: 8px;
}
.header-name {
cursor: pointer;
}
</style>
@parent
@stop
@section('inputFields')
<!-- Name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-2 control-label">{{ trans('admin/groups/titles.group_name') }}</label>
<div class="col-md-9 required">
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}</label>
<div class="col-md-8 required">
<input class="form-control" type="text" name="name" id="name" value="{{ old('name', $group->name) }}" required />
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-2 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-9">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
@@ -77,163 +40,41 @@
</div>
</div>
<div class="col-md-12">
<table class="table table-striped permissions">
<thead>
<tr class="permissions-row">
<th class="col-md-5">{{ trans('admin/groups/titles.permission')}}</th>
<th class="col-md-1">{{ trans('admin/groups/titles.grant')}}</th>
<th class="col-md-1">{{ trans('admin/groups/titles.deny')}}</th>
</tr>
</thead>
@foreach ($permissions as $area => $area_permission)
<!-- handle superadmin and reports, and anything else with only one option -->
<?php $localPermission = $area_permission[0]; ?>
@if (count($area_permission) == 1)
<tbody class="permissions-group">
<tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item"
data-tooltip="true"
data-placement="right"
title="{{ $localPermission['note'] }}">
@unless (empty($localPermission['label']))
<h2>{{ $area . ': ' . $localPermission['label'] }}</h2>
@else
<h2>{{ $area }}</h2>
@endunless
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$localPermission['permission'].']' }}" style="form-control"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ 'permission['.$localPermission['permission'].']' }}</span></label>
<input
value="1"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked(array_key_exists($localPermission['permission'], $groupPermissions) && $groupPermissions[$localPermission['permission']] == '1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$localPermission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ 'permission['.$localPermission['permission'].']' }}</span></label>
<input
value="0"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked(array_key_exists($localPermission['permission'], $groupPermissions) && $groupPermissions[$localPermission['permission']] == '0')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
>
</td>
</tr>
</tbody>
@else
<tbody class="permission-group">
<tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item header-name"
data-tooltip="true"
data-placement="right"
title="{{ $localPermission['note'] }}">
<h2>{{ $area }}</h2>
<div class="form-group{{ $errors->has('associated_users') ? ' has-error' : '' }}">
<label for="associated_users[]" class="col-md-3 control-label">
{{ trans('general.users') }}
</label>
</td>
<td class="col-md-1 permissions-item" style="vertical-align: bottom">
<label for="{{ $area }}"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ $area }}</span></label>
<input
value="1"
data-checker-group="{{ str_slug($area) }}"
aria-label="{{ $area }}"
name="{{ $area }}"
type="radio"
>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ $area }}</span></label>
<input
value="0"
data-checker-group="{{ str_slug($area) }}"
aria-label="{{ $area }}"
name="{{ $area }}"
type="radio"
>
</td>
</tr>
<div class="col-md-7">
<select class="js-data-ajax"
data-endpoint="users"
data-placeholder="{{ trans('general.select_user') }}"
name="associated_users[]"
style="width: 100%"
id="associated_users[]"
aria-label="associated_users[]" multiple>
@foreach ($area_permission as $index => $this_permission)
@if ($this_permission['display'])
<tr class="permissions-row">
<td
class="col-md-5 tooltip-base permissions-item"
data-tooltip="true"
data-placement="right"
title="{{ $this_permission['note'] }}">
{{ $this_permission['label'] }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$this_permission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ 'permission['.$this_permission['permission'].']' }}</span></label>
<input
class="radiochecker-{{ str_slug($area) }}"
aria-label="permission[{{ $this_permission['permission'] }}]"
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '1')
name="permission[{{ $this_permission['permission'] }}]"
type="radio"
value="1"
>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$this_permission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ 'permission['.$this_permission['permission'].']' }}</span></label>
<input
class="radiochecker-{{ str_slug($area) }}"
aria-label="permission[{{ $this_permission['permission'] }}]"
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '0')
name="permission[{{ $this_permission['permission'] }}]"
type="radio"
value="0"
>
</td>
<option value="" role="option">{{ trans('general.select_user') }}</option>
@if(isset($associated_users))
@foreach($associated_users as $associated_user)
<option value="{{ $associated_user->id }}" selected="selected" role="option" aria-selected="true"
role="option">
{{ $associated_user->present()->fullName }} ({{ $associated_user->username }})
</option>
@endforeach
@endif
</select>
</div>
</tr>
@endif
@endforeach
@endif
</tbody>
@endforeach
</table>
{!! $errors->first('associated_users', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
@stop
@section('moar_scripts')
<script nonce="{{ csrf_token() }}">
$(document).ready(function(){
$('.tooltip-base').tooltip({container: 'body'});
$(".superuser").change(function() {
var perms = $(this).val();
if (perms =='1') {
$("#nonadmin").hide();
} else {
$("#nonadmin").show();
}
});
// Check/Uncheck all radio buttons in the group
$('tr.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});
$('.header-name').click(function() {
$(this).parent().nextUntil('tr.header-row').slideToggle(500);
});
});
</script>
<div class="col-md-12">
@include ('partials.forms.edit.permissions-base', ['use_inherit' => false])
</div>
@stop

View File

@@ -1391,6 +1391,7 @@
<th data-visible="true" data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter">{{ trans('admin/hardware/table.icon') }}</th>
<th data-visible="true" data-field="created_at" data-sortable="true" data-formatter="dateDisplayFormatter">{{ trans('general.date') }}</th>
<th data-visible="true" data-field="admin" data-formatter="usersLinkObjFormatter">{{ trans('general.created_by') }}</th>
<th data-visible="true" data-field="image" data-formatter="auditImageFormatter">{{ trans('general.image') }}</th>
<th class="col-sm-2" data-field="file" data-sortable="true" data-visible="false" data-formatter="fileNameFormatter">{{ trans('general.file_name') }}</th>
<th data-field="note">{{ trans('general.notes') }}</th>
<th data-visible="false" data-field="file" data-visible="false" data-formatter="fileDownloadButtonsFormatter">{{ trans('general.download') }}</th>

View File

@@ -1163,21 +1163,45 @@ dir="{{ Helper::determineLanguageDirection() }}">
var validator = $('#create-form').validate({
ignore: 'input[type=hidden]',
errorClass: 'alert-msg',
errorElement: 'span',
errorElement: 'div',
errorPlacement: function(error, element) {
$(element).hasClass('select2') || $(element).hasClass('js-data-ajax')
if ($(element).hasClass('select2') || $(element).hasClass('js-data-ajax')) {
// If the element is a select2 then append the error to the parent div
? element.parent('div').append(error)
// Otherwise place it after
: error.insertAfter(element);
element.parent('div').append(error);
} else if ($(element).parent().hasClass('input-group')) {
var end_input_group = $(element).next('.input-group-addon').parent();
error.insertAfter(end_input_group);
} else {
error.insertAfter(element);
}
},
highlight: function(inputElement) {
$(inputElement).parent().addClass('has-error');
$(inputElement).closest('.help-block').remove();
// We have to go two levels up if it's an input group
if ($(inputElement).hasClass('select2') || $(inputElement).hasClass('js-data-ajax')) {
$(inputElement).parent().parent().addClass('has-error');
} else if ($(inputElement).parent().hasClass('input-group')) {
$(inputElement).parent().parent().parent().addClass('has-error');
} else {
$(inputElement).parent().addClass('has-error');
$(inputElement).closest('.help-block').remove();
}
},
onfocusout: function(element) {
$(element).parent().removeClass('has-error');
return $(element).valid();
// We have to go two levels up if it's an input group
if ($(element).parent().hasClass('input-group')) {
$(element).parent().parent().parent().removeClass('has-error');
return $(element).valid();
} else {
$(element).parent().removeClass('has-error');
return $(element).valid();
}
},
});

View File

@@ -24,7 +24,7 @@
<!-- row -->
<div class="row">
<!-- col-md-8 -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0">
<div class="{{ isset($container_classes) ? $container_classes : 'col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0'}}">
<form id="create-form" class="form-horizontal" method="post" action="{{ (isset($formAction)) ? $formAction : \Request::url() }}" autocomplete="off" role="form" enctype="multipart/form-data">

View File

@@ -4,6 +4,7 @@
'topSubmit' => true,
'formAction' => ($item->id) ? route('licenses.update', ['license' => $item->id]) : route('licenses.store'),
'index_route' => 'licenses.index',
'container_classes' => 'col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0',
'options' => [
'back' => trans('admin/hardware/form.redirect_to_type',['type' => trans('general.previous_page')]),
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => 'licenses']),
@@ -13,24 +14,52 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/licenses/form.name')])
<!-- Name -->
<x-form-row name="name">
<x-form-label>{{ trans('general.name') }}</x-form-label>
<x-form-input>
<x-input.text
required="true"
:value="old('name', $item->name)"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license'])
<!-- Seats -->
<div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
<label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}</label>
<div class="col-md-7 col-sm-12">
<div class="col-md-12" style="padding-left:0px">
<input class="form-control" type="text" name="seats" id="seats" value="{{ old('seats', $item->seats) }}" minlength="1" required style="width: 97px;">
</div>
</div>
{!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
@include ('partials.forms.edit.minimum_quantity')
<!-- Seats -->
<x-form-row name="seats">
<x-form-label>{{ trans('admin/licenses/form.seats') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('seats', $item->seats)"
input_min="1"
required="true"
/>
</x-form-input>
</x-form-row>
<!-- Serial-->
<!-- Minimum QTY -->
<x-form-row name="min_amt">
<x-form-label>{{ trans('general.min_amt') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:value="old('min_amt', $item->min_amt)"
input_min="0"
/>
</x-form-input>
<x-form-inline-tooltip>
{{ trans('general.min_amt_help') }}
</x-form-inline-tooltip>
</x-form-row>
<!-- Serial-->
@can('viewKeys', $item)
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
<label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
@@ -77,46 +106,71 @@
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
@include ('partials.forms.edit.order_number')
@include ('partials.forms.edit.purchase_cost')
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
<!-- Order Number -->
<x-form-row name="order_number">
<x-form-label>{{ trans('general.order_number') }}</x-form-label>
<x-form-input>
<x-input.text :value="old('order_number', $item->order_number)" />
</x-form-input>
</x-form-row>
{{-- @TODO How does this differ from Order #? --}}
<!-- Purchase Order -->
<x-form-row name="purchase_order">
<x-form-label>{{ trans('admin/licenses/form.purchase_order') }}</x-form-label>
<x-form-input>
<x-input.text :value="old('purchase_order', $item->purchase_order)" />
</x-form-input>
</x-form-row>
<!-- Purchase Cost -->
<x-form-row name="purchase_cost">
<x-form-label>{{ trans('general.unit_cost') }}</x-form-label>
<x-form-input>
<x-input.text
type="number"
:input_group_text="$snipeSettings->default_currency"
:value="old('purchase_cost', $item->purchase_cost)"
input_group_addon="left"
input_max="99999999999999999.000"
input_min="0"
input_min="0.00"
input_step="0.001"
maxlength="25"
/>
</x-form-input>
</x-form-row>
<!--- Purchase Date -->
<x-form-row name="purchase_date">
<x-form-label>{{ trans('general.purchase_date') }}</x-form-label>
<x-form-input>
<x-input.datepicker
:value="old('purchase_date', $item->purchase_date_for_datepicker)"
input_group_addon="left"/>
</x-form-input>
</x-form-row>
<!-- Expiration Date -->
<div class="form-group {{ $errors->has('expiration_date') ? ' has-error' : '' }}">
<label for="expiration_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.expiration') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expiration_date" id="expiration_date" value="{{ old('expiration_date', ($item->expiration_date) ? $item->expiration_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('expiration_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row name="expiration_date">
<x-form-label>{{ trans('admin/licenses/form.expiration') }}</x-form-label>
<x-form-input>
<x-input.datepicker :value="old('expiration_date', $item->expiration_date)" />
</x-form-input>
</x-form-row>
<!-- Termination Date -->
<div class="form-group {{ $errors->has('termination_date') ? ' has-error' : '' }}">
<label for="termination_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.termination_date') }}</label>
<x-form-row name="termination_date">
<x-form-label>{{ trans('admin/licenses/form.termination_date') }}</x-form-label>
<x-form-input>
<x-input.datepicker :value="old('termination_date', $item->termination_date)" />
</x-form-input>
</x-form-row>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="termination_date" id="termination_date" value="{{ old('termination_date', ($item->termination_date) ? $item->termination_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('termination_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
{{-- @TODO How does this differ from Order #? --}}
<!-- Purchase Order -->
<div class="form-group {{ $errors->has('purchase_order') ? ' has-error' : '' }}">
<label for="purchase_order" class="col-md-3 control-label">{{ trans('admin/licenses/form.purchase_order') }}</label>
<div class="col-md-3 text-right">
<input class="form-control" type="text" name="purchase_order" id="purchase_order" value="{{ old('purchase_order', $item->purchase_order) }}" maxlength="191" />
{!! $errors->first('purchase_order', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.depreciation')
@@ -131,6 +185,15 @@
</div>
</div>
@include ('partials.forms.edit.notes')
<!-- Notes -->
<x-form-row name="notes">
<x-form-label>{{ trans('general.notes') }}</x-form-label>
<x-form-input>
<x-input.textarea
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
</x-form-input>
</x-form-row>
@stop

View File

@@ -9,7 +9,13 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- parent -->
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/locations/table.parent'), 'fieldname' => 'parent_id'])
@@ -63,20 +69,14 @@
@include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -11,196 +11,204 @@
@stop
@section('header_right')
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
{{ trans('general.back') }}</a>
@stop
{{-- Page content --}}
@section('content')
<div class="row">
<div class="col-md-9">
@if ($item->id)
<form class="form-horizontal" method="post" action="{{ route('maintenances.update', $item->id) }}" autocomplete="off" enctype="multipart/form-data">
{{ method_field('PUT') }}
@else
<form class="form-horizontal" method="post" action="{{ route('maintenances.store') }}" autocomplete="off" enctype="multipart/form-data">
@endif
<!-- CSRF Token -->
{{ csrf_field() }}
<div class="box box-default">
<!-- Initiate form component -->
<x-form :$item update_route="maintenances.update" create_route="maintenances.store">
<!-- Start box component -->
<x-box :$item header_icon="maintenances">
<!-- This is an existing maintenance -->
@if ($item->id)
<div class="box-header with-border">
<h2 class="box-title">
{{ $item->title }}
</h2>
</div><!-- /.box-header -->
@endif
<div class="box-body">
@if ($item->asset)
<x-form-row name="asset">
<x-form-label>{{ trans('general.asset') }}</x-form-label>
<x-form-input>
<x-input.static>
{{ $item->asset->display_name }}
</x-input.static>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name'), 'required' => 'true'])
@if ($item->asset->company)
<x-form-row name="company">
<x-form-label>{{ trans('general.company') }}</x-form-label>
<x-form-input>
<x-input.static>
{{ $item->asset->company->display_name }}
</x-input.static>
</x-form-input>
</x-form-row>
<!-- This is a new maintenance -->
@if (!$item->id)
@endif
@if ($item->asset->location)
<x-form-row name="location">
<x-form-label>
{{ trans('general.location') }}
</x-form-label>
<x-form-input>
<x-input.static>
{{ $item->asset->location->display_name }}
</x-input.static>
</x-form-input>
</x-form-row>
@endif
@include ('partials.forms.edit.asset-select', [
'translated_name' => trans('general.assets'),
'fieldname' => 'selected_assets[]',
'multiple' => true,
'required' => true,
'select_id' => 'assigned_assets_select',
'asset_selector_div_id' => 'assets_for_maintenance_div',
'asset_ids' => $item->id ? $item->asset()->pluck('id')->toArray() : old('selected_assets'),
'asset_id' => $item->id ? $item->asset()->pluck('id')->toArray() : null
])
@else
@if ($item->asset->company)
<div class="form-group">
<label for="company" class="control-label col-md-3">
{{ trans('general.company') }}
</label>
<div class="col-md-9">
<p class="form-control-static">
{{ $item->asset->company->name }}
</p>
</div>
</div>
@endif
<div class="form-group">
<label for="asset" class="control-label col-md-3">
{{ trans('general.asset') }}
</label>
<div class="col-md-9">
<p class="form-control-static">
{{ $item->asset ? $item->asset->present()->fullName : '' }}
</p>
</div>
</div>
@if ($item->asset->location)
<div class="form-group">
<label for="location" class="control-label col-md-3">
{{ trans('general.location') }}
</label>
<div class="col-md-9">
<p class="form-control-static">
{{ $item->asset->location->name }}
</p>
</div>
</div>
@endif
@endif
<!-- Name -->
<x-form-row name="name">
<x-form-label>{{ trans('general.name') }}</x-form-label>
<x-form-input>
<x-input.text
required="true"
:value="old('name', $item->name)"
/>
</x-form-input>
</x-form-row>
@include ('partials.forms.edit.maintenance_type')
@if (!$item->id)
<!-- Assets (multiple select for new maintenance) -->
<x-form-row name="selected_assets[]">
<x-form-label>{{ trans('general.assets') }}</x-form-label>
<x-form-input>
<x-input.select2-ajax
:item="$item->id ? $item->asset()->pluck('id')->toArray() : old('selected_assets')"
item_model="\App\Models\Asset"
:required="Helper::checkIfRequired($item, 'asset_id')"
multiple="true"
data_endpoint="hardware"
:selected="old('selected_assets[]', request('asset_id'))"
:data_placeholder="trans('general.select_asset')"
/>
</x-form-input>
</x-form-row>
@endif
<!-- Start Date -->
<div class="form-group {{ $errors->has('start_date') ? ' has-error' : '' }}">
<label for="start_date" class="col-md-3 control-label">
{{ trans('admin/maintenances/form.start_date') }}
</label>
<div class="col-md-4">
<x-input.datepicker
name="start_date"
:value="old('start_date', $item->start_date)"
placeholder="{{ trans('general.select_date') }}"
required="{{ Helper::checkIfRequired($item, 'start_date') }}"
/>
{!! $errors->first('start_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Maintenance Type -->
<x-form-row name="asset_maintenance_type">
<x-form-label>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</x-form-label>
<x-form-input>
<x-input.select
:options="$maintenanceType"
:selected="old('asset_maintenance_type', $item->asset_maintenance_type)"
:required="Helper::checkIfRequired($item, 'asset_maintenance_type')"
data-placeholder="{{ trans('admin/maintenances/form.select_type')}}"
includeEmpty="true"
style="width:100%;"
/>
</x-form-input>
</x-form-row>
<!-- Completion Date -->
<div class="form-group {{ $errors->has('completion_date') ? ' has-error' : '' }}">
<label for="start_date" class="col-md-3 control-label">{{ trans('admin/maintenances/form.completion_date') }}</label>
<div class="input-group col-md-4">
<x-input.datepicker
name="completion_date"
:value="old('start_date', $item->completion_date)"
placeholder="{{ trans('general.select_date') }}"
required="Helper::checkIfRequired($item, 'completion_date')"
/>
{!! $errors->first('completion_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
<!--- Start Date -->
<x-form-row name="start_date">
<x-form-label>{{ trans('admin/maintenances/form.start_date') }}</x-form-label>
<x-form-input class="col-md-5">
<x-input.datepicker :value="old('start_date', $item->start_date)" required="true" />
</x-form-input>
</x-form-row>
<!-- Warranty -->
<!--- Completion Date -->
<x-form-row name="completion_date">
<x-form-label>{{ trans('admin/maintenances/form.completion_date') }}</x-form-label>
<x-form-input class="col-md-5">
<x-input.datepicker :value="old('completion_date', $item->completion_date)"
/>
</x-form-input>
</x-form-row>
<!-- Cost -->
<x-form-row name="cost">
<x-form-label>{{ trans('admin/maintenances/form.cost') }}</x-form-label>
<x-form-input class="col-md-5">
<x-input.text
type="number"
:input_group_text="$snipeSettings->default_currency"
:value="old('cost', $item->cost)"
input_group_addon="left"
input_max="99999999999999999.000"
input_min="0"
input_min="0.00"
input_step="0.001"
maxlength="25"
/>
</x-form-input>
</x-form-row>
<!-- URL -->
<x-form-row name="url">
<x-form-label>{{ trans('general.url') }}</x-form-label>
<x-form-input>
<x-input.text
name="url"
type="url"
:value="old('url', $item->url)"
input_icon="link"
input_group_addon="left"
placeholder="https://example.com"
/>
</x-form-input>
</x-form-row>
<!-- Supplier -->
<x-form-row name="supplier_id">
<x-form-label>{{ trans('general.supplier') }}</x-form-label>
<x-form-input>
<x-input.select2-ajax
item="$item->supplier"
item_model="\App\Models\Supplier"
name="supplier_id"
:selected="old('supplier_id', $item->supplier_id)"
data_endpoint="suppliers"
:data_placeholder="trans('general.select_supplier')"
/>
</x-form-input>
</x-form-row>
<!-- Warranty? -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<label class="form-control">
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" {{ old('is_warranty', $item->is_warranty) == '1' ? ' checked="checked"' : '' }}>
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" @checked(old('is_warranty', $item->is_warranty))>
{{ trans('admin/maintenances/form.is_warranty') }}
</label>
</div>
</div>
<!-- Asset Maintenance Cost -->
<div class="form-group {{ $errors->has('cost') ? ' has-error' : '' }}">
<label for="cost" class="col-md-3 control-label">{{ trans('admin/maintenances/form.cost') }}</label>
<div class="col-md-3 text-right">
<div class="input-group">
<span class="input-group-addon">
@if (($item->asset) && ($item->asset->location) && ($item->asset->location->currency!=''))
{{ $item->asset->location->currency }}
@else
{{ $snipeSettings->default_currency }}
@endif
</span>
<input class="form-control" type="number" name="cost" min="0.00" max="99999999999999999.000" step="0.001" aria-label="cost" id="cost" value="{{ old('cost', $item->cost) }}" maxlength="25" />
{!! $errors->first('cost', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
</div>
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
<label for="url" class="col-md-3 control-label">{{ trans('general.url') }}</label>
<div class="col-md-7">
<input class="form-control" name="url" type="url" id="url" value="{{ old('url', $item->url) }}" placeholder="https://example.com">
{!! $errors->first('url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.image-upload', ['image_path' => app('maintenances_path')])
<!-- Notes -->
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
<label for="notes" class="col-md-3 control-label">{{ trans('admin/maintenances/form.notes') }}</label>
<div class="col-md-7">
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ old('notes', $item->notes) }}</textarea>
<p class="help-block">{!! trans('general.markdown') !!}</p>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
</div> <!-- .box-body -->
<x-form-row name="notes">
<x-form-label>{{ trans('general.notes') }}</x-form-label>
<x-form-input>
<x-input.textarea
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
</x-form-input>
</x-form-row>
<!-- End box component -->
</x-box>
<!-- Start form component -->
</x-form>
<div class="box-footer text-right">
<button type="submit" class="btn btn-success"><x-icon type="checkmark" /> {{ trans('general.save') }}</button>
</div>
</div> <!-- .box-default -->
</form>
</div>
</div>
@stop

View File

@@ -9,75 +9,89 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/manufacturers/table.name')])
<!-- Name -->
<x-form-row
:label="trans('admin/manufacturers/table.name')"
:$item
name="name"
/>
<!-- URL -->
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
<label for="url" class="col-md-3 control-label">{{ trans('general.url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="text" name="url" id="url" value="{{ old('url', $item->url) }}" />
{!! $errors->first('url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.url')"
:$item
name="url"
type="url"
input_icon="link"
input_group_addon="left"
placeholder="https://example.com"
/>
<!-- Support URL -->
<div class="form-group {{ $errors->has('support_url') ? ' has-error' : '' }}">
<label for="support_url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="url" name="support_url" id="support_url" value="{{ old('support_url', $item->support_url) }}" />
{!! $errors->first('support_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_url')"
:$item
name="support_url"
type="url"
input_icon="link"
input_group_addon="left"
placeholder="https://example.com"
/>
<!-- Warranty Lookup URL -->
<div class="form-group {{ $errors->has('warranty_lookup_url') ? ' has-error' : '' }}">
<label for="support_url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.warranty_lookup_url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="url" name="warranty_lookup_url" id="warranty_lookup_url" value="{{ old('warranty_lookup_url', $item->warranty_lookup_url) }}" />
<p class="help-block">{!! trans('admin/manufacturers/message.support_url_help') !!}</p>
{!! $errors->first('warranty_lookup_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.warranty_lookup_url')"
:$item
name="warranty_lookup_url"
type="url"
help_text="{!! trans('admin/manufacturers/message.support_url_help') !!}"
input_icon="link"
input_group_addon="left"
placeholder="https://example.com"
/>
<!-- Support Phone -->
<div class="form-group {{ $errors->has('support_phone') ? ' has-error' : '' }}">
<label for="support_phone" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_phone') }}
</label>
<div class="col-md-6">
<input class="form-control" type="text" name="support_phone" id="support_phone" value="{{ old('support_phone', $item->support_phone) }}" />
{!! $errors->first('support_phone', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_phone')"
:$item
name="support_phone"
input_div_class="col-md-6"
type="tel"
input_icon="phone"
input_group_addon="left"
placeholder="1-800-555-5555"
/>
<!-- Support Email -->
<div class="form-group {{ $errors->has('support_email') ? ' has-error' : '' }}">
<label for="support_email" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_email') }}
</label>
<div class="col-md-6">
<input class="form-control" type="email" name="support_email" id="support_email" value="{{ old('support_email', $item->support_email) }}" />
{!! $errors->first('support_email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_email')"
:$item
name="support_email"
input_div_class="col-md-6"
type="email"
input_icon="email"
input_group_addon="left"
placeholder="support@example.com"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -32,15 +32,16 @@
<p class="help-block" id="uploadFile-status">{{ trans('general.upload_filetypes_help', ['allowed_filetypes' => config('filesystems.allowed_upload_extensions'), 'size' => Helper::file_upload_max_size_readable()]) }}</p>
</div>
<div class="col-md-12">
<x-input.textarea
name="notes"
:value="old('notes')"
placeholder="Notes (Optional)"
rows="3"
aria-label="file"
/>
</div>
<!-- Notes -->
<x-form-row name="notes">
<x-form-label>{{ trans('general.notes') }}</x-form-label>
<x-form-input>
<x-input.textarea
:value="old('notes')"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
</x-form-input>
</x-form-row>
</div>
</div> <!-- /.modal-body-->

View File

@@ -59,9 +59,14 @@
<div class="col-md-3 col-xs-12">
<label class="control-label" for="modal-password">{{ trans('admin/users/table.password') }}:</label>
</div>
<div class="col-md-8 col-xs-12 " style="margin-bottom:5px;">
<div class="col-md-7 col-xs-12">
<input type='password' name="password" id='modal-password' class="form-control" required>
<a href="#" class="left" id="modal-genPassword">Generate</a>
<div id="modal-generated-password"></div>
</div>
<div class="col-md-1">
<a href="#" class="btn btn-default btn-sm" id="modal-genPassword" data-tooltip="true" title="{{ trans('admin/users/general.generate_password') }}">
<i class="fa-solid fa-wand-magic-sparkles"></i>
</a>
<div id="modal-generated-password"></div>
</div>
</div>
@@ -72,9 +77,8 @@
<div class="col-md-3 col-xs-12 ">
<label class="control-label" for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label>
</div>
<div class="col-md-8 col-xs-12">
<div class="col-md-7 col-xs-12">
<input class="form-control" type='password' name="password_confirmation" id='modal-password_confirmation' required>
</div>
</div>
</div>

View File

@@ -9,12 +9,38 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name'), 'required' => 'true'])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'asset'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
@include ('partials.forms.edit.model_number')
<!-- Model Number -->
<x-form-row
:label="trans('general.model_no')"
:$item
name="model_number"
/>
@include ('partials.forms.edit.depreciation')
@include ('partials.forms.edit.minimum_quantity')
<!-- Minimum QTY -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="min_amt"
type="number"
input_div_class="col-md-4 col-xs-9"
info_tooltip_text="{{ trans('general.min_amt_help') }}"
input_min="0"
/>
<!-- require serial boolean -->
<div class="form-group">
@@ -25,40 +51,41 @@
<div class="col-md-9">
<div class="form-inline" style="display: flex; align-items: center; gap: 8px;">
<input type="checkbox" name="require_serial" value="1" @checked(old('require_serial', $item->require_serial)) id="require_serial" aria-label="require_serial" />
<a
href="#"
data-tooltip="true"
title="{{ trans('admin/hardware/general.require_serial_help') }}"
style="display: inline-flex; align-items: center;"
>
<x-icon type="info-circle" />
<span class="sr-only">{{ trans('admin/hardware/general.require_serial_help') }}</span>
</a>
<x-form-tooltip>
{{ trans('admin/hardware/general.require_serial_help') }}
</x-form-tooltip>
</div>
</div>
</div>
<!-- EOL -->
<div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
<label for="eol" class="col-md-3 control-label">{{ trans('general.eol') }}</label>
<div class="col-md-3 col-sm-4 col-xs-7">
<div class="input-group">
<input class="form-control" type="text" name="eol" id="eol" value="{{ old('eol', isset($item->eol)) ? $item->eol : '' }}" />
<span class="input-group-addon">
{{ trans('general.months') }}
</span>
</div>
</div>
<div class="col-md-9 col-md-offset-3">
{!! $errors->first('eol', '<span class="alert-msg" aria-hidden="true"><br><i class="fas fa-times"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.eol')"
:$item
name="eol"
type="number"
input_div_class="col-md-4"
input_group_text="{{ trans('general.months') }}"
input_group_addon="left"
maxlength="3"
min="0"
/>
<!-- Custom Fieldset -->
<!-- If $item->id is null we are cloning the model and we need the $model_id variable -->
@livewire('custom-field-set-default-values-for-model', ["model_id" => $item->id ?? $model_id ?? null])
@include ('partials.forms.edit.notes')
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])
@include ('partials.forms.edit.image-upload', ['image_path' => app('models_upload_path')])

View File

@@ -7,7 +7,7 @@
| | |
| ------------- | ------------- |
@if (isset($item_name))
| **{{ trans('general.name') }}** | {{ $item_name }} |
| **{{ trans('general.asset_name') }}** | {{ $item_name }} |
@endif
| **{{ trans('mail.user') }}** | {{ $assigned_to }} |
@if (isset($user->location))
@@ -32,7 +32,7 @@
| **{{ trans('general.category') }}** | {{ $item->model->category->name }} |
@endif
@if ((isset($item_model)) && ($item_model!=''))
| **{{ trans('mail.asset_name') }}** | {{ $item_model }} |
| **{{ trans('general.model_name') }}** | {{ $item_model }} |
@endif
@if (isset($item->model))
| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} |
@@ -43,9 +43,6 @@
@if (isset($qty))
| **{{ trans('general.qty') }}** | {{ $qty }} |
@endif
@if (isset($admin))
| **{{ trans('general.administrator') }}** | {{ $admin }} |
@endif
@endcomponent
{{ trans('mail.best_regards') }}

View File

@@ -1,12 +1,17 @@
@component('mail::message')
{{ trans_choice('mail.upcoming-audits', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]) }}
{{ trans_choice('mail.upcoming-audits', $total, ['count' => $total, 'threshold' => $threshold]) }}
{{ trans('mail.upcoming-audits_click') }}
<x-mail::button :url="route('assets.audit.due')">
{{ trans_choice('general.audit_due_days_view_all', $threshold, ['days' => $threshold]) }}
</x-mail::button>
<x-mail::table>
| | | |
| ------------- | ------------- | ------------- |
@foreach ($assets as $asset)
| {{ ($asset->next_audit_diff_in_days <= 7) ? '🚨' : (($asset->next_audit_diff_in_days <= 14) ? '⚠️' : '⚠️') }} **{{ trans('mail.name') }}** | <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a> |
| {{ ($asset->next_audit_diff_in_days <= 7) ? '🚨' : (($asset->next_audit_diff_in_days <= 14) ? '⚠️' : '⚠️') }} **{{ trans('mail.name') }}** | <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a> (<a href="{{ route('asset.audit.create', $asset->id) }}">{{ trans('general.audit') }}</a>)|
@if ($asset->serial)
| **{{ trans('general.serial_number') }}** | {{ $asset->serial }} |
@endif
@@ -33,6 +38,6 @@
</x-mail::table>
<x-mail::button :url="route('assets.audit.due')">
{{ trans_choice('general.audit_due_days', $threshold, ['days' => $threshold]) }}
{{ trans_choice('general.audit_due_days_view_all', $threshold, ['days' => $threshold]) }}
</x-mail::button>
@endcomponent

View File

@@ -294,6 +294,28 @@
@endcan
@can('create', \App\Models\Groups::class)
// Groups table buttons
window.groupButtons = () => ({
btnAdd: {
text: '{{ trans('general.create') }}',
icon: 'fa fa-plus',
event () {
window.location.href = '{{ route('groups.create') }}';
},
attributes: {
class: 'btn-info',
title: '{{ trans('general.create') }}',
@if ($snipeSettings->shortcuts_enabled == 1)
accesskey: 'n'
@endif
}
},
}); // End Groups table buttons
@endcan
// Asset table buttons
window.assetButtons = () => ({
@can('create', \App\Models\Asset::class)
@@ -1517,9 +1539,9 @@
}
}
function auditImageFormatter(value){
if (value){
return '<a href="' + value.url + '" data-toggle="lightbox" data-type="image"><img src="' + value.url + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive" alt=""></a>'
function auditImageFormatter(value, row) {
if ((row) && (row.file) && (row.file.url)) {
return '<a href="' + row.file.url + '" data-toggle="lightbox" data-type="image"><img src="' + row.file.url + '" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive" alt=""></a>'
}
}

View File

@@ -1,202 +1,200 @@
@foreach ($permissions as $area => $permissionsArray)
@if (count($permissionsArray) == 1)
<?php $localPermission = $permissionsArray[0]; ?>
<tbody class="permissions-group">
<tr class="header-row permissions-row">
<td class="col-md-5 tooltip-base permissions-item"
data-tooltip="true"
data-placement="right"
title="{{ $localPermission['note'] }}"
@foreach ($permissions as $main_section => $main_section_permission)
<!-- handle superadmin and reports, and anything else with only one option -->
@php
// Ugh, this sucks, but we need to special case reports to map to reports.view
$sectionPermission = $main_section_permission[0];
if ((str_slug($main_section)) == 'reports') {
$section_name = 'reports.view';
} else {
$section_name = str_slug($main_section);
}
@endphp
<div class="form-group {{ ($sectionPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($sectionPermission['permission']!='superuser') && ($sectionPermission['permission']!='admin')) ? ' nonadmin' : '' }}">
<!-- start callout legend for major sections -->
<div class="callout callout-legend col-md-12">
<!-- start left column with area name and note -->
<div class="col-md-10">
<h4 id="{{ str_slug($sectionPermission['permission'])}}" class="{{ (count($main_section_permission) > 1) ? 'remember-toggle': '' }}">
@if (count($main_section_permission) > 1)
<x-icon type="caret-down" class="fa-fw" id="toggle-arrow-{{ str_slug($sectionPermission['permission'])}}" />
@endif
{{ trans('permissions.'.str_slug($main_section).'.name') }}
</h4>
@if (\Lang::has('permissions.'.str_slug($main_section).'.note'))
<p>{{ trans('permissions.'.str_slug($main_section).'.note') }}</p>
@endif
</div>
<!-- end left column with area name and note -->
<!-- Handle the checkall ALLOW and DENY radios in the right column -->
<div class="col-md-2 text-right header-row">
<div class="radio-toggle-wrapper">
<!-- start .radio-slider-inputs allow -->
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.grant_all', ['area' => $main_section]) : trans('permissions.grant', ['area' => $main_section]) }}">
<input
class="form-control {{ str_slug($main_section) }} allow"
data-checker-group="{{ str_slug($main_section) }}"
aria-label="{{ str_slug($main_section) }}"
name="permission[{{ $section_name }}]"
@checked(array_key_exists($section_name, $groupPermissions) && $groupPermissions[$section_name] == '1')
type="radio"
value="1"
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
disabled
@endif
id="{{ str_slug($main_section) }}_allow"
>
<label class="allow" for="{{ str_slug($main_section) }}_allow">
<i class="fa-solid fa-square-check"></i>
</label>
</div>
<!-- end .radio-slider-inputs allow -->
<!-- start .radio-slider-inputs inherit if used -->
@if ($use_inherit)
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.inherit_all', ['area' => $main_section]) : trans('permissions.inherit', ['area' => $main_section]) }}">
<input
class="form-control {{ str_slug($main_section) }} inherit"
data-checker-group="{{ str_slug($main_section) }}"
aria-label="{{ str_slug($main_section) }}"
name="permission[{{ str_slug($main_section) }}]"
@checked((array_key_exists(str_slug($main_section), $groupPermissions) && $groupPermissions[str_slug($main_section)] == '0') || (!array_key_exists(str_slug($main_section), $groupPermissions)))
type="radio"
value="0"
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
disabled
@endif
id="{{ str_slug($main_section) }}_inherit"
>
<label class="inherit" for="{{ str_slug($main_section) }}_inherit">
<i class="fa-solid fa-layer-group"></i>
</label>
</div>
@endif
<!-- end .radio-slider-inputs inherit if used -->
<!-- start .radio-slider-inputs deny -->
<div class="radio-slider-inputs" data-tooltip="true" title="{{ (count($main_section_permission) > 1) ? trans('permissions.deny_all', ['area' => $main_section]) : trans('permissions.deny', ['area' => $main_section]) }}">
<input
class="form-control {{ str_slug($main_section) }} deny"
data-checker-group="{{ str_slug($main_section) }}"
aria-label="{{ str_slug($main_section) }}"
name="permission[{{ str_slug($main_section) }}]"
@checked(array_key_exists(str_slug($main_section), $groupPermissions) && $groupPermissions[str_slug($main_section)] == '-1')
type="radio"
value="-1"
{{-- Disable the superuser and admin allow if the user is not a superuser --}}
@if (((str_slug($main_section) == 'admin') && (!auth()->user()->hasAccess('admin'))) || ((str_slug($main_section) == 'superuser') && (!auth()->user()->isSuperUser())))
disabled
@endif
id="{{ str_slug($main_section) }}_deny"
>
<label class="deny" for="{{ str_slug($main_section) }}_deny">
<i class="fa-solid fa-square-xmark"></i>
</label>
</div>
<!-- end .radio-slider-inputs deny -->
</div> <!-- end .radio-toggle-wrapper -->
</div> <!-- end right column radios -->
</div> <!-- end callout legend for major sections -->
</div> <!-- end form row -->
<!-- now handle sub-permissions if they exist -->
@if (count($main_section_permission) > 2)
<div
class="toggle-content-{{ str_slug($sectionPermission['permission']) }} {{ str_slug($sectionPermission['permission']) }}
{{ ($sectionPermission['permission']!='superuser') ? ' nonsuperuser' : '' }}{{ ( ($sectionPermission['permission']!='superuser') && ($sectionPermission['permission']!='admin')) ? ' nonadmin' : '' }}"
>
@unless (empty($localPermission['label']))
<h2>{{ $area . ': ' . $localPermission['label'] }}</h2>
@else
<h2>{{ $area }}</h2>
@endunless
</td>
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="1"
/>
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="1"
/>
@else
<input
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="1"
/>
@endif
@foreach ($main_section_permission as $index => $this_permission)
@if ($this_permission['display'])
</td>
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '-1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="-1"
/>
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '-1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="-1"
/>
@else
<input
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '-1')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="-1"
/>
@endif
</td>
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">
{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '0')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="0"
/>
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
<input
disabled="disabled"
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '0')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="0"
/>
@else
<input
aria-label="permission[{{ $localPermission['permission'] }}]"
@checked($userPermissions[$localPermission['permission']] == '0')
name="permission[{{ $localPermission['permission'] }}]"
type="radio"
value="0"
/>
@endif
</td>
</tr>
</tbody>
@php
$section_translation = trans('permissions.'.str_slug($this_permission['permission']).'.name');
@endphp
@else <!-- count($permissionsArray) == 1-->
<tbody class="permissions-group">
<tr class="header-row permissions-row">
<td class="col-md-5 header-name">
<h2> {{ $area }}</h2>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
<input
value="1"
data-checker-group="{{ str_slug($area) }}"
aria-label="{{ $area }}"
name="{{ $area }}"
type="radio"
/>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
<input
value="-1"
data-checker-group="{{ str_slug($area) }}"
aria-label="{{ $area }}"
name="{{ $area }}"
type="radio"
/>
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
<input
value="0"
data-checker-group="{{ str_slug($area) }}"
aria-label="{{ $area }}"
name="{{ $area }}"
type="radio"
/>
</td>
</tr>
<div class="form-group" style="border-bottom: 1px solid #eee; padding-right: 13px;">
<div class="col-md-10">
<strong>{{ $section_translation }}</strong>
@if (\Lang::has('permissions.'.str_slug($this_permission['permission']).'.note'))
<p>{{ trans('permissions.'.str_slug($this_permission['permission']).'.note') }}</p>
@endif
</div>
@foreach ($permissionsArray as $index => $permission)
<tr class="permissions-row">
@if ($permission['display'])
<td
class="col-md-5 tooltip-base permissions-item"
data-tooltip="true"
data-placement="right"
title="{{ $permission['note'] }}"
>
{{ $permission['label'] }}
</td>
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$permission['permission'].']' }}">{{ 'permission['.$permission['permission'].']' }}</label>
<input
value="1"
class="radiochecker-{{ str_slug($area) }}"
aria-label="permission[{{ $permission['permission'] }}]"
@checked($userPermissions[$permission['permission']] == '1')
@disabled(($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
name="permission[{{ $permission['permission'] }}]"
type="radio"
/>
</td>
<td class="col-md-1 permissions-item">
<input
value="-1"
class="radiochecker-{{ str_slug($area) }}"
aria-label="permission[{{ $permission['permission'] }}]"
@checked($userPermissions[$permission['permission']] == '-1')
@disabled(($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
name="permission[{{ $permission['permission'] }}]"
type="radio"
/>
</td>
<td class="col-md-1 permissions-item">
<input
value="0"
class="radiochecker-{{ str_slug($area) }}"
aria-label="permission[{{ $permission['permission'] }}]"
@checked($userPermissions[$permission['permission']] =='0')
@disabled(($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
name="permission[{{ $permission['permission'] }}]"
type="radio"
/>
</td>
@endif
</tr>
@endforeach
</tbody>
<div class="form-group col-md-2 text-right">
<div class="radio-toggle-wrapper">
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.grant', ['area' => $section_translation]) }}">
<input
class="form-control allow radiochecker-{{ str_slug($main_section) }}"
aria-label="permission[{{ $this_permission['permission'] }}]"
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '1')
name="permission[{{ $this_permission['permission'] }}]"
type="radio"
id="{{ str_slug($this_permission['permission']) }}_allow"
value="1"
>
<label for="{{ str_slug($this_permission['permission']) }}_allow" class="allow">
<i class="fa-solid fa-square-check"></i>
</label>
</div>
@if ($use_inherit)
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.inherit', ['area' => $section_translation]) }}">
<input
class="form-control inherit radiochecker-{{ str_slug($main_section) }}"
aria-label="permission[{{ $this_permission['permission'] }}]"
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '0')
name="permission[{{ $this_permission['permission'] }}]"
type="radio"
id="{{ str_slug($this_permission['permission']) }}_inherit"
value="0"
>
<label for="{{ str_slug($this_permission['permission']) }}_inherit" class="inherit">
<i class="fa-solid fa-layer-group"></i>
</label>
</div>
@endif
<div class="radio-slider-inputs" data-tooltip="true" title="{{ trans('permissions.deny', ['area' => $section_translation]) }}">
<input
class="form-control deny radiochecker-{{ str_slug($main_section) }}"
aria-label="permission[{{ $this_permission['permission'] }}]"
@checked(array_key_exists($this_permission['permission'], $groupPermissions) && $groupPermissions[$this_permission['permission']] == '-1')
name="permission[{{ $this_permission['permission'] }}]"
type="radio"
value="-1"
id="{{ str_slug($this_permission['permission']) }}_deny"
>
<label for="{{ str_slug($this_permission['permission']) }}_deny">
<i class="fa-solid fa-square-xmark"></i>
</label>
</div>
</div>
</div>
</div>
@endif
@endforeach
</div>
@endif
@endforeach

View File

@@ -1,10 +1,10 @@
<!-- {{ $logoVariable }}logo image upload -->
<div class="form-group">
<div class="col-md-3 text-right">
<label {!! $errors->has($logoVariable) ? 'class="alert-msg"' : '' !!} for="{{ $logoVariable }}">
<div class="col-md-3 control-label{!! $errors->has($logoVariable) ? ' error' : '' !!}">
<strong>
{{ trans($logoLabel) }}
</label>
</strong>
</div>
<div class="col-md-9">
<label class="btn btn-default{{ (config('app.lock_passwords')) ? ' disabled' : '' }}">

View File

@@ -412,9 +412,10 @@
<div class="form-group purchase-range{{ ($errors->has('purchase_start') || $errors->has('purchase_end')) ? ' has-error' : '' }}">
<label for="purchase_start" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-daterange input-group col-md-7" id="purchase-range-datepicker">
<input type="text" class="form-control" name="purchase_start" aria-label="purchase_start" value="{{ $template->textValue('purchase_start', old('purchase_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="purchase_end" aria-label="purchase_end" value="{{ $template->textValue('purchase_end', old('purchase_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="purchase_start" aria-label="purchase_start" value="{{ $template->textValue('purchase_start', old('purchase_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="purchase_end" aria-label="purchase_end" value="{{ $template->textValue('purchase_end', old('purchase_end')) }}">
</div>
@if ($errors->has('purchase_start') || $errors->has('purchase_end'))
@@ -431,7 +432,7 @@
<label for="purchase_cost_start" class="col-md-3 control-label">{{ trans('admin/hardware/form.cost') }}</label>
<div class="input-group col-md-7">
<input type="number" min="0" step="0.01" class="form-control" name="purchase_cost_start" aria-label="purchase_cost_start" value="{{ $template->textValue('purchase_cost_start', old('purchase_cost_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<span class="input-group-addon"> - </span>
<input type="number" min="0" step="0.01" class="form-control" name="purchase_cost_end" aria-label="purchase_cost_end" value="{{ $template->textValue('purchase_cost_end', old('purchase_cost_end')) }}">
</div>
@@ -448,9 +449,9 @@
<div class="form-group created-range{{ ($errors->has('created_start') || $errors->has('created_end')) ? ' has-error' : '' }}">
<label for="created_start" class="col-md-3 control-label">{{ trans('general.created_at') }} </label>
<div class="input-daterange input-group col-md-7" id="created-range-datepicker">
<input type="text" class="form-control" name="created_start" aria-label="created_start" value="{{ $template->textValue('created_start', old('created_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="created_end" aria-label="created_end" value="{{ $template->textValue('created_end', old('created_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="created_start" aria-label="created_start" value="{{ $template->textValue('created_start', old('created_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="created_end" aria-label="created_end" value="{{ $template->textValue('created_end', old('created_end')) }}">
</div>
@if ($errors->has('created_start') || $errors->has('created_end'))
@@ -465,9 +466,9 @@
<div class="form-group checkout-range{{ ($errors->has('checkout_date_start') || $errors->has('checkout_date_end')) ? ' has-error' : '' }}">
<label for="checkout_date" class="col-md-3 control-label">{{ trans('general.checkout') }} </label>
<div class="input-daterange input-group col-md-7" id="checkout-range-datepicker">
<input type="text" class="form-control" name="checkout_date_start" aria-label="checkout_date_start" value="{{ $template->textValue('checkout_date_start', old('checkout_date_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="checkout_date_end" aria-label="checkout_date_end" value="{{ $template->textValue('checkout_date_end', old('checkout_date_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="checkout_date_start" aria-label="checkout_date_start" value="{{ $template->textValue('checkout_date_start', old('checkout_date_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="checkout_date_end" aria-label="checkout_date_end" value="{{ $template->textValue('checkout_date_end', old('checkout_date_end')) }}">
</div>
@if ($errors->has('checkout_date_start') || $errors->has('checkout_date_end'))
@@ -483,9 +484,9 @@
<div class="form-group checkin-range{{ ($errors->has('checkin_date_start') || $errors->has('checkin_date_end')) ? ' has-error' : '' }}">
<label for="checkin_date" class="col-md-3 control-label">{{ trans('admin/hardware/table.last_checkin_date') }}</label>
<div class="input-daterange input-group col-md-7" id="checkin-range-datepicker">
<input type="text" class="form-control" name="checkin_date_start" aria-label="checkin_date_start" value="{{ $template->textValue('checkin_date_start', old('checkin_date_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="checkin_date_end" aria-label="checkin_date_end" value="{{ $template->textValue('checkin_date_end', old('checkin_date_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="checkin_date_start" aria-label="checkin_date_start" value="{{ $template->textValue('checkin_date_start', old('checkin_date_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="checkin_date_end" aria-label="checkin_date_end" value="{{ $template->textValue('checkin_date_end', old('checkin_date_end')) }}">
</div>
@if ($errors->has('checkin_date_start') || $errors->has('checkin_date_end'))
@@ -500,9 +501,9 @@
<div class="form-group expected_checkin-range{{ ($errors->has('expected_checkin_start') || $errors->has('expected_checkin_end')) ? ' has-error' : '' }}">
<label for="expected_checkin_start" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
<div class="input-daterange input-group col-md-7" id="expected_checkin-range-datepicker">
<input type="text" class="form-control" name="expected_checkin_start" aria-label="expected_checkin_start" value="{{ $template->textValue('expected_checkin_start', old('expected_checkin_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="expected_checkin_end" aria-label="expected_checkin_end" value="{{ $template->textValue('expected_checkin_end', old('expected_checkin_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="expected_checkin_start" aria-label="expected_checkin_start" value="{{ $template->textValue('expected_checkin_start', old('expected_checkin_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="expected_checkin_end" aria-label="expected_checkin_end" value="{{ $template->textValue('expected_checkin_end', old('expected_checkin_end')) }}">
</div>
@if ($errors->has('expected_checkin_start') || $errors->has('expected_checkin_end'))
@@ -518,9 +519,9 @@
<div class="form-group asset_eol_date-range {{ ($errors->has('asset_eol_date_start') || $errors->has('asset_eol_date_end')) ? ' has-error' : '' }}">
<label for="asset_eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>
<div class="input-daterange input-group col-md-7" id="asset_eol_date-range-datepicker">
<input type="text" class="form-control" name="asset_eol_date_start" aria-label="asset_eol_date_start" value="{{ $template->textValue('asset_eol_date_start', old('asset_eol_date_start')) }}">
<span class="input-group-addon">to</span>
<input type="text" class="form-control" name="asset_eol_date_end" aria-label="asset_eol_date_end" value="{{ $template->textValue('asset_eol_date_end', old('asset_eol_date_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="asset_eol_date_start" aria-label="asset_eol_date_start" value="{{ $template->textValue('asset_eol_date_start', old('asset_eol_date_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="asset_eol_date_end" aria-label="asset_eol_date_end" value="{{ $template->textValue('asset_eol_date_end', old('asset_eol_date_end')) }}">
</div>
@if ($errors->has('asset_eol_date_start') || $errors->has('asset_eol_date_end'))
@@ -535,9 +536,9 @@
<div class="form-group last_audit-range{{ ($errors->has('last_audit_start') || $errors->has('last_audit_end')) ? ' has-error' : '' }}">
<label for="last_audit_start" class="col-md-3 control-label">{{ trans('general.last_audit') }}</label>
<div class="input-daterange input-group col-md-7" id="last_audit-range-datepicker">
<input type="text" class="form-control" name="last_audit_start" aria-label="last_audit_start" value="{{ $template->textValue('last_audit_start', old('last_audit_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="last_audit_end" aria-label="last_audit_end" value="{{ $template->textValue('last_audit_end', old('last_audit_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="last_audit_start" aria-label="last_audit_start" value="{{ $template->textValue('last_audit_start', old('last_audit_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="last_audit_end" aria-label="last_audit_end" value="{{ $template->textValue('last_audit_end', old('last_audit_end')) }}">
</div>
@if ($errors->has('last_audit_start') || $errors->has('last_audit_end'))
@@ -552,9 +553,9 @@
<div class="form-group next_audit-range{{ ($errors->has('next_audit_start') || $errors->has('next_audit_end')) ? ' has-error' : '' }}">
<label for="next_audit_start" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
<div class="input-daterange input-group col-md-7" id="next_audit-range-datepicker">
<input type="text" class="form-control" name="next_audit_start" aria-label="next_audit_start" value="{{ $template->textValue('next_audit_start', old('next_audit_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="next_audit_end" aria-label="next_audit_end" value="{{ $template->textValue('next_audit_end', old('next_audit_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="next_audit_start" aria-label="next_audit_start" value="{{ $template->textValue('next_audit_start', old('next_audit_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="next_audit_end" aria-label="next_audit_end" value="{{ $template->textValue('next_audit_end', old('next_audit_end')) }}">
</div>
@if ($errors->has('next_audit_start') || $errors->has('next_audit_end'))
@@ -569,9 +570,9 @@
<div class="form-group last_updated-range{{ ($errors->has('last_updated_start') || $errors->has('last_updated_end')) ? ' has-error' : '' }}">
<label for="last_updated_start" class="col-md-3 control-label">{{ trans('general.updated_at') }}</label>
<div class="input-daterange input-group col-md-7" id="last_updated-range-datepicker">
<input type="text" class="form-control" name="last_updated_start" aria-label="last_updated_start" value="{{ $template->textValue('last_updated_start', old('last_updated_start')) }}">
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="last_updated_end" aria-label="last_updated_end" value="{{ $template->textValue('last_updated_end', old('last_updated_end')) }}">
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="last_updated_start" aria-label="last_updated_start" value="{{ $template->textValue('last_updated_start', old('last_updated_start')) }}">
<span class="input-group-addon"> - </span>
<input type="text" placeholder="{{ trans('general.select_date') }}" class="form-control" name="last_updated_end" aria-label="last_updated_end" value="{{ $template->textValue('last_updated_end', old('last_updated_end')) }}">
</div>
@if ($errors->has('last_updated_start') || $errors->has('last_updated_end'))

View File

@@ -41,13 +41,13 @@
<div class="col-md-12">
<fieldset name="remote-login"">
<fieldset name="remote-login">
<x-form-legend>
{{ trans('admin/settings/general.legends.general') }}
</x-form-legend>
<!-- Menu Alerts Enabled -->
<div class="form-group {{ $errors->has('show_alerts_in_menu') ? 'error' : '' }}">
<div class="form-group{{ $errors->has('show_alerts_in_menu') ? ' error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="show_alerts_in_menu" value="1" @checked(old('show_alerts_in_menu', $setting->show_alerts_in_menu))>
@@ -68,16 +68,16 @@
</fieldset>
<fieldset name="alert-addresses"">
<fieldset name="alert-addresses">
<x-form-legend>
{{ trans('admin/settings/general.legends.email') }}
</x-form-legend>
<!-- Alert Email -->
<div class="form-group {{ $errors->has('alert_email') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="alert_email">{{ trans('admin/settings/general.alert_email') }}</label>
</div>
<label for="alert_email" class="col-md-3 control-label">{{ trans('admin/settings/general.alert_email') }}</label>
<div class="col-md-8 input-group">
<input type="text" name="alert_email" value="{{ old('alert_email', $setting->alert_email) }}" class="form-control" placeholder="admin@yourcompany.com,it@yourcompany.com" maxlength="191">
<span class="input-group-addon">
@@ -93,9 +93,8 @@
<!-- Admin CC Email -->
<div class="form-group {{ $errors->has('admin_cc_email') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="admin_cc_email">{{ trans('admin/settings/general.admin_cc_email') }}</label>
</div>
<label for="admin_cc_email" class="col-md-3 control-label">{{ trans('admin/settings/general.admin_cc_email') }}</label>
<div class="col-md-8 input-group">
<input type="email" name="admin_cc_email" value="{{ old('admin_cc_email', $setting->admin_cc_email) }}" class="form-control" placeholder="admin@yourcompany.com" maxlength="191">
<span class="input-group-addon">
@@ -131,7 +130,7 @@
</div>
</fieldset>
<fieldset name="remote-login"">
<fieldset name="remote-login">
<x-form-legend>
{{ trans('admin/settings/general.legends.intervals') }}
@@ -139,9 +138,9 @@
<!-- Inventory alert threshold -->
<div class="form-group {{ $errors->has('alert_threshold') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="alert_threshold">{{ trans('admin/settings/general.alert_inv_threshold') }}</label>
</div>
<label for="alert_threshold" class="col-md-3 control-label">{{ trans('admin/settings/general.alert_inv_threshold') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="5" maxlength="3" style="width: 100px;" name="alert_threshold" type="number" value="{{ old('alert_threshold', $setting->alert_threshold) }}" id="alert_threshold">
{!! $errors->first('alert_threshold', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@@ -151,9 +150,8 @@
<!-- Inventory alert interval -->
<div class="form-group {{ $errors->has('alert_interval') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="alert_interval">{{ trans('admin/settings/general.alert_interval') }}</label>
</div>
<label for="alert_interval" class="col-md-3 control-label">{{ trans('admin/settings/general.alert_interval') }}</label>
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
<input class="form-control" placeholder="30" maxlength="3" name="alert_interval" type="number" value="{{ old('alert_interval', $setting->alert_interval) }}" id="alert_interval">
<span class="input-group-addon">{{ trans('general.days') }}</span>
@@ -164,9 +162,8 @@
<!-- Due for checkin days -->
<div class="form-group {{ $errors->has('due_checkin_days') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="due_checkin_days">{{ trans('admin/settings/general.due_checkin_days') }}</label>
</div>
<label for="due_checkin_days" class="col-md-3 control-label">{{ trans('admin/settings/general.due_checkin_days') }}</label>
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
<input class="form-control" placeholder="14" maxlength="3" name="due_checkin_days" type="number" id="due_checkin_days" value="{{ old('due_checkin_days', $setting->due_checkin_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
@@ -179,11 +176,10 @@
<!-- Alert warning threshold -->
<div class="form-group {{ $errors->has('audit_warning_days') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="audit_warning_days">{{ trans('admin/settings/general.audit_warning_days') }}</label>
</div>
<label for="audit_warning_days" class="col-md-3 control-label">{{ trans('admin/settings/general.audit_warning_days') }}</label>
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
<input class="form-control" placeholder="14" maxlength="3" name="audit_warning_days" type="number" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
<input class="form-control" placeholder="14" maxlength="3" min="0" name="audit_warning_days" type="number" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-8 col-md-offset-3">
@@ -194,9 +190,9 @@
<!-- Audit interval -->
<div class="form-group {{ $errors->has('audit_interval') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="audit_interval">{{ trans('admin/settings/general.audit_interval') }}</label>
</div>
<label for="audit_interval" class="col-md-3 control-label">{{ trans('admin/settings/general.audit_interval') }}</label>
<div class="input-group col-xs-10 col-sm-6 col-md-6 col-lg-3 col-xl-3">
<input class="form-control" placeholder="12" maxlength="3" name="audit_interval" type="number" id="audit_interval" value="{{ old('audit_interval', $setting->audit_interval) }}">
<span class="input-group-addon">{{ trans('general.months') }}</span>

View File

@@ -42,23 +42,20 @@
<!-- auto ids -->
<div class="form-group">
<div class="col-md-5">
<strong>{{ trans('admin/settings/general.auto_increment_assets') }}</strong>
</div>
<div class="col-md-7">
<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="auto_increment_assets" value="1" @checked(old('auto_increment_assets', $setting->auto_increment_assets)) aria-label="auto_increment_assets">
{{ trans('admin/settings/general.enabled') }}
{{ trans('admin/settings/general.auto_increment_assets') }}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-5">
<label for="next_auto_tag_base">{{ trans('admin/settings/general.next_auto_tag_base') }}</label>
</div>
<div class="col-md-7">
<input class="form-control" style="width: 150px;" aria-label="next_auto_tag_base" name="next_auto_tag_base" type="text" value="{{ old('next_auto_tag_base', $setting->next_auto_tag_base) }}" id="next_auto_tag_base">
<label for="next_auto_tag_base" class="col-md-3 control-label">{{ trans('admin/settings/general.next_auto_tag_base') }}</label>
<div class="col-md-8">
<input class="form-control" style="width: 200px;" aria-label="next_auto_tag_base" name="next_auto_tag_base" type="text" value="{{ old('next_auto_tag_base', $setting->next_auto_tag_base) }}" id="next_auto_tag_base">
{!! $errors->first('next_auto_tag_base', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
@@ -66,26 +63,26 @@
<!-- auto prefix -->
<div class="form-group {{ $errors->has('auto_increment_prefix') ? 'error' : '' }}">
<div class="col-md-5">
<label for="auto_increment_prefix">{{ trans('admin/settings/general.auto_increment_prefix') }}</label>
</div>
<div class="col-md-7">
<label for="auto_increment_prefix" class="col-md-3 control-label">{{ trans('admin/settings/general.auto_increment_prefix') }}</label>
<div class="col-md-8">
@if ($setting->auto_increment_assets == 1)
<input class="form-control" style="width: 150px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
<input class="form-control" maxlength="100" style="width: 200px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
{!! $errors->first('auto_increment_prefix', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@else
<input class="form-control" disabled="disabled" style="width: 150px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
<input class="form-control" maxlength="100" disabled="disabled" style="width: 200px;" aria-label="auto_increment_prefix" name="auto_increment_prefix" type="text" id="auto_increment_prefix" value="{{ old('auto_increment_prefix', $setting->auto_increment_prefix) }}">
@endif
</div>
</div>
<!-- auto zerofill -->
<div class="form-group {{ $errors->has('zerofill_count') ? 'error' : '' }}">
<div class="col-md-5">
<label for="zerofill_count">{{ trans('admin/settings/general.zerofill_count') }}</label>
</div>
<label for="zerofill_count" class="col-md-3 control-label">{{ trans('admin/settings/general.zerofill_count') }}</label>
<div class="col-md-7">
<input class="form-control" style="width: 150px;" aria-label="zerofill_count" name="zerofill_count" type="text" value="{{ old('zerofill_count', $setting->zerofill_count) }}" id="zerofill_count">
<input class="form-control" maxlength="100" style="width: 200px;" aria-label="zerofill_count" name="zerofill_count" type="text" value="{{ old('zerofill_count', $setting->zerofill_count) }}" id="zerofill_count">
{!! $errors->first('zerofill_count', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>

View File

@@ -51,25 +51,22 @@
<div class="col-md-12">
<fieldset name="logo-preferences"">
<fieldset name="logo-preferences">
<x-form-legend>
{{ trans('admin/settings/general.legends.logos') }}
</x-form-legend>
<!-- Site name -->
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="site_name">{{ trans('admin/settings/general.site_name') }}</label>
</div>
<div class="col-md-7 required">
<div class="form-group{{ $errors->has('site_name') ? ' error' : '' }}">
<label for="site_name" class="col-md-3 control-label">{{ trans('admin/settings/general.site_name') }}</label>
<div class="col-md-8 required">
@if (config('app.lock_passwords')===true)
<input class="form-control" disabled="disabled" placeholder="Snipe-IT Asset Management" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
<input maxlength="191" class="form-control" disabled="disabled" placeholder="Snipe-IT Asset Management" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
<p class="text-warning">
<x-icon type="locked" />
{{ trans('general.feature_disabled') }}</p>
@else
<input class="form-control" placeholder="Snipe-IT Asset Management" required="required" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
<input maxlength="191" class="form-control" placeholder="Snipe-IT Asset Management" required="required" name="site_name" type="text" value="{{ old('site_name', $setting->site_name) }}" id="site_name">
@endif
{!! $errors->first('site_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
@@ -81,9 +78,9 @@
<!-- Branding -->
<div class="form-group {{ $errors->has('brand') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="brand">{{ trans('admin/settings/general.web_brand') }}</label>
</div>
<label for="brand" class="col-md-3 control-label">{{ trans('admin/settings/general.web_brand') }}</label>
<div class="col-md-9">
<x-input.select
name="brand"
@@ -161,7 +158,6 @@
@if (($setting->default_avatar == '') || (($setting->default_avatar == 'default.png') && (Storage::disk('public')->missing('default.png'))))
<!-- Restore Default Avatar -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="restore_default_avatar" value="1" @checked(old('restore_default_avatar', $setting->restore_default_avatar)) />
@@ -175,8 +171,8 @@
@endif
<!-- Load gravatar -->
<div class="form-group {{ $errors->has('load_remote') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<div class="form-group{{ $errors->has('load_remote') ? ' error' : '' }}">
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.load_remote') }}</strong>
</div>
<div class="col-md-9">
@@ -196,7 +192,7 @@
<!-- Include logo in print assets -->
<div class="form-group">
<div class="col-md-3 text-right">
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.logo_print_assets') }}</strong>
</div>
<div class="col-md-9">
@@ -211,7 +207,7 @@
<!-- show urls in emails-->
<div class="form-group">
<div class="col-md-3 text-right">
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.show_url_in_emails') }}</strong>
</div>
<div class="col-md-9">
@@ -225,16 +221,16 @@
</fieldset>
<!-- colors and skins -->
<fieldset name="color-preferences"">
<fieldset name="color-preferences">
<x-form-legend>
{{ trans('admin/settings/general.legends.colors') }}
</x-form-legend>
<!-- Header color -->
<div class="form-group {{ $errors->has('header_color') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="header_color">{{ trans('admin/settings/general.header_color') }}</label>
</div>
<label for="header_color" class="col-md-3 control-label">{{ trans('admin/settings/general.header_color') }}</label>
<div class="col-md-5 col-xs-5 col-sm-3 col-md-4 col-lg-3 col-xl-3">
<div class="input-group header-color">
<input class="form-control" placeholder="#FF0000" aria-label="header_color" name="header_color" type="text" id="header_color" value="{{ old('header_color', ($setting->header_color ?? '#3c8dbc')) }}">
@@ -248,9 +244,7 @@
<!-- Skin -->
<div class="form-group {{ $errors->has('skin') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="skin">{{ trans('general.skin') }}</label>
</div>
<label for="skin" class="col-md-3 control-label">{{ trans('general.skin') }}</label>
<div class="col-md-9">
<x-input.skin name="skin" :selected="old('skin', $setting->skin)" />
{!! $errors->first('skin', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@@ -259,9 +253,9 @@
<!-- Custom css -->
<div class="form-group {{ $errors->has('custom_css') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="custom_css">{{ trans('admin/settings/general.custom_css') }}</label>
</div>
<label for="custom_css" class="col-md-3 control-label">{{ trans('admin/settings/general.custom_css') }}</label>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
<x-input.textarea
@@ -302,17 +296,17 @@
<!-- colors and skins -->
<fieldset name="footer-preferences"">
<fieldset name="footer-preferences">
<x-form-legend>
{{ trans('admin/settings/general.legends.footer') }}
</x-form-legend>
<!-- Support Footer -->
<div class="form-group {{ $errors->has('support_footer') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="support_footer">{{ trans('admin/settings/general.support_footer') }}</label>
</div>
<div class="col-md-9">
<label for="support_footer" class="col-md-3 control-label">{{ trans('admin/settings/general.support_footer') }}</label>
<div class="col-md-8">
@if (config('app.lock_passwords')===true)
<x-input.select
name="support_footer"
@@ -343,9 +337,9 @@
<!-- Version Footer -->
<div class="form-group {{ $errors->has('version_footer') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="version_footer">{{ trans('admin/settings/general.version_footer') }}</label>
</div>
<label for="version_footer" class="col-md-3 control-label">{{ trans('admin/settings/general.version_footer') }}</label>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
<x-input.select
@@ -376,9 +370,9 @@
<!-- Additional footer -->
<div class="form-group {{ $errors->has('footer_text') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="footer_text">{{ trans('admin/settings/general.footer_text') }}</label>
</div>
<label for="footer_text" class="col-md-3 control-label">{{ trans('admin/settings/general.footer_text') }}</label>
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
<x-input.textarea

View File

@@ -34,7 +34,7 @@
<div class="col-md-12">
<fieldset">
<fieldset>
<x-form-legend>
{{ trans('admin/settings/general.legends.scoping') }}
</x-form-legend>
@@ -63,15 +63,15 @@
</fieldset>
<fieldset">
<fieldset>
<x-form-legend>
{{ trans('admin/settings/general.legends.formats') }}
</x-form-legend>
<!-- Email domain -->
<div class="form-group {{ $errors->has('email_domain') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="email_domain">{{ trans('general.email_domain') }}</label>
</div>
<label for="email_domain" class="col-md-3 control-label">{{ trans('general.email_domain') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="example.com" name="email_domain" type="text" value="{{ old('email_domain', $setting->email_domain) }}" id="email_domain">
<span class="help-block">{{ trans('general.email_domain_help') }}</span>
@@ -82,9 +82,9 @@
<!-- Email format -->
<div class="form-group {{ $errors->has('email_format') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="email_format">{{ trans('admin/settings/general.email_formats.email_format') }}</label>
</div>
<label for="email_format" class="col-md-3 control-label">{{ trans('admin/settings/general.email_formats.email_format') }}</label>
<div class="col-md-8">
<x-input.email-format-select
name="email_format"
@@ -98,9 +98,9 @@
<!-- Username format -->
<div class="form-group {{ $errors->has('username_format') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="username_format">{{ trans('admin/settings/general.username_formats.username_format') }}</label>
</div>
<label for="username_format" class="col-md-3 control-label">{{ trans('admin/settings/general.username_formats.username_format') }}</label>
<div class="col-md-8">
{!! Form::username_format('username_format', old('username_format', $setting->username_format), 'select2') !!}
{!! $errors->first('username_format', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@@ -114,7 +114,7 @@
</fieldset>
<fieldset">
<fieldset>
<x-form-legend>
{{ trans('admin/settings/general.legends.profiles') }}
</x-form-legend>
@@ -150,9 +150,8 @@
<!-- Default EULA -->
<div class="form-group {{ $errors->has('default_eula_text') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="default_eula_text">{{ trans('admin/settings/general.default_eula_text') }}</label>
</div>
<label for="default_eula_text" class="col-md-3 control-label">{{ trans('admin/settings/general.default_eula_text') }}</label>
<div class="col-md-8">
<x-input.textarea
name="default_eula_text"
@@ -174,9 +173,9 @@
<!-- Thumb Size -->
<div class="form-group {{ $errors->has('thumbnail_max_h') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="thumbnail_max_h">{{ trans('admin/settings/general.thumbnail_max_h') }}</label>
</div>
<label for="thumbnail_max_h" class="col-md-3 control-label">{{ trans('admin/settings/general.thumbnail_max_h') }}</label>
<div class="col-md-8">
<input class="form-control" style="max-width: 100px;" placeholder="50" maxlength="3" name="thumbnail_max_h" type="number" value="{{ old('thumbnail_max_h', ($setting->thumbnail_max_h ?? '25')) }}" id="thumbnail_max_h">
<p class="help-block">{{ trans('admin/settings/general.thumbnail_max_h_help') }}</p>
@@ -186,7 +185,7 @@
<!-- Model List prefs -->
<div class="form-group {{ $errors->has('show_in_model_list') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<div class="col-md-3">
<strong>{{ trans('admin/settings/general.show_in_model_list') }}</strong>
</div>
<div class="col-md-8">
@@ -248,16 +247,16 @@
</fieldset>
<fieldset">
<fieldset>
<x-form-legend>
{{ trans('general.email') }}
</x-form-legend>
<!-- Mail test -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="login_note">{{trans('admin/settings/general.test_mail')}}</label>
</div>
<label for="login_note" class="col-md-3 control-label">{{trans('admin/settings/general.test_mail')}}</label>
<div class="col-md-8" id="mailtestrow">
<a class="btn btn-default btn-sm pull-left" id="mailtest" style="margin-right: 10px;">
{{ trans('admin/settings/general.mail_test') }}</a>
@@ -320,9 +319,9 @@
<!-- login text -->
<div class="form-group {{ $errors->has('login_note') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="login_note">{{ trans('admin/settings/general.login_note') }}</label>
</div>
<label for="login_note" class="col-md-3 control-label">{{ trans('admin/settings/general.login_note') }}</label>
<div class="col-md-8">
@if (config('app.lock_passwords'))
@@ -339,9 +338,9 @@
<!-- dash chart -->
<div class="form-group {{ $errors->has('dash_chart_type') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="show_in_model_list">{{ trans('general.pie_chart_type') }}</label>
</div>
<label for="show_in_model_list" class="col-md-3 control-label">{{ trans('general.pie_chart_type') }}</label>
<div class="col-md-8">
<x-input.select
name="dash_chart_type"
@@ -354,9 +353,9 @@
<!-- dashboard text -->
<div class="form-group {{ $errors->has('dashboard_message') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="dashboard_message">{{ trans('admin/settings/general.dashboard_message') }}</label>
</div>
<label for="dashboard_message" class="col-md-3 control-label">{{ trans('admin/settings/general.dashboard_message') }}</label>
<div class="col-md-8">
@if (config('app.lock_passwords'))
@@ -382,9 +381,9 @@
<!-- Privacy Policy Footer-->
<div class="form-group {{ $errors->has('privacy_policy_link') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="privacy_policy_link">{{ trans('admin/settings/general.privacy_policy_link') }}</label>
</div>
<label for="privacy_policy_link" class="col-md-3 control-label">{{ trans('admin/settings/general.privacy_policy_link') }}</label>
<div class="col-md-8">
@if (config('app.lock_passwords'))
@@ -406,9 +405,9 @@
<!-- Depreciation method -->
<div class="form-group {{ $errors->has('depreciation_method') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="depreciation_method">{{ trans('admin/depreciations/general.depreciation_method') }}</label>
</div>
<label for="depreciation_method" class="col-md-3 control-label">{{ trans('admin/depreciations/general.depreciation_method') }}</label>
<div class="col-md-8">
<x-input.select
name="depreciation_method"
@@ -438,7 +437,7 @@
<!-- Manager View -->
<div class="form-group {{ $errors->has('manager_view_enabled') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<div class="col-md-3">
<strong>{{ trans('admin/settings/general.manager_view') }}</strong>
</div>
<div class="col-md-8">

View File

@@ -38,11 +38,11 @@
<!-- Google Redirect URL -->
<div class="form-group">
<div class="col-md-3 text-right">
<strong>Redirect URL</strong>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.redirect_url') }}</strong>
</div>
<div class="col-md-8">
<p class="form-control-static" style="margin-top: -5px"><code>{{ config('app.url') }}/google/callback</code></p>
<p class="form-control-static"><code>{{ config('app.url') }}/google/callback</code></p>
<p class="help-block">{!! trans('admin/settings/general.google_callback_help') !!}</p>
</div>
</div>
@@ -64,9 +64,9 @@
<!-- Google Client ID -->
<div class="form-group {{ $errors->has('google_client_id') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="google_client_id">Client ID</label>
</div>
<label for="google_client_id" class="col-md-3 control-label">{{ trans('admin/settings/general.client_id') }}</label>
<div class="col-md-8">
<input
class="form-control"
@@ -86,9 +86,9 @@
<!-- Google Client Secret -->
<div class="form-group {{ $errors->has('google_client_secret') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="google_client_secret">Client Secret</label>
</div>
<label for="google_client_secret" class="col-md-3 control-label">{{ trans('admin/settings/general.client_secret') }}</label>
<div class="col-md-8">
@if (config('app.lock_passwords')===true)

View File

@@ -85,8 +85,8 @@
</x-form-legend>
<!-- Enable LDAP -->
<div class="form-group {{ $errors->has('ldap_integration') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_enabled">{{ trans('admin/settings/general.ldap_integration') }}</label>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.ldap_integration') }}</strong>
</div>
<div class="col-md-8">
@@ -107,8 +107,8 @@
<!-- AD Flag -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="is_ad">{{ trans('admin/settings/general.ad') }}</label>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.ad') }}</strong>
</div>
<div class="col-md-8">
<label class="form-control">
@@ -133,8 +133,8 @@
<!-- LDAP Password Sync -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="ldap_pw_sync">{{ trans('admin/settings/general.ldap_pw_sync') }}</label>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.ldap_pw_sync') }}</strong>
</div>
<div class="col-md-8">
<label class="form-control">
@@ -162,9 +162,9 @@
<!-- AD Domain -->
<div class="form-group {{ $errors->has('ad_domain') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ad_domain">{{ trans('admin/settings/general.ad_domain') }}</label>
</div>
<label for="ad_domain" class="col-md-3 control-label">{{ trans('admin/settings/general.ad_domain') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'example.com' }}" name="ad_domain" type="text" id="ad_domain" value="{{ old('ad_domain', $setting->ad_domain) }}">
<p class="help-block">{{ trans('admin/settings/general.ad_domain_help') }}</p>
@@ -186,11 +186,11 @@
<!-- LDAP Client-Side TLS key -->
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_client_tls_key">
{{ trans('admin/settings/general.ldap_client_tls_key') }}
</label>
</div>
<label for="ldap_client_tls_key" class="col-md-3 control-label">
{{ trans('admin/settings/general.ldap_client_tls_key') }}
</label>
<div class="col-md-8">
<x-input.textarea
name="ldap_client_tls_key"
@@ -215,9 +215,9 @@
<!-- LDAP Client-Side TLS certificate -->
<div class="form-group {{ $errors->has('ldap_client_tls_cert') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_client_tls_cert">{{ trans('admin/settings/general.ldap_client_tls_cert') }}</label>
</div>
<label for="ldap_client_tls_cert" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_client_tls_cert') }}</label>
<div class="col-md-8">
<x-input.textarea
name="ldap_client_tls_cert"
@@ -243,9 +243,9 @@
<!-- LDAP Server -->
<div class="form-group {{ $errors->has('ldap_server') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_server">{{ trans('admin/settings/general.ldap_server') }}</label>
</div>
<label for="ldap_server" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_server') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'ldap://ldap.example.com' }}" name="ldap_server" type="text" id="ldap_server" value="{{ old('ldap_server', $setting->ldap_server) }}">
@error('ldap_server')
@@ -268,8 +268,8 @@
<!-- Start TLS -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="ldap_tls">{{ trans('admin/settings/general.ldap_tls') }}</label>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.ldap_tls') }}</strong>
</div>
<div class="col-md-8">
<label class="form-control">
@@ -294,8 +294,8 @@
<!-- Ignore LDAP Certificate -->
<div class="form-group {{ $errors->has('ldap_server_cert_ignore') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_server_cert_ignore">{{ trans('admin/settings/general.ldap_server_cert') }}</label>
<div class="col-md-3 control-label">
<strong>{{ trans('admin/settings/general.ldap_server_cert') }}</strong>
</div>
<div class="col-md-8">
<label class="form-control">
@@ -323,9 +323,9 @@
<!-- LDAP Username -->
<div class="form-group {{ $errors->has('ldap_uname') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_uname">{{ trans('admin/settings/general.ldap_uname') }}</label>
</div>
<label for="ldap_uname" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_uname') }}</label>
<div class="col-md-8">
<input class="form-control" autocomplete="off" placeholder="{{ trans('general.example') .'binduser@example.com' }}" name="ldap_uname" type="text" id="ldap_uname" value="{{ old('ldap_uname', $setting->ldap_uname) }}">
@error('ldap_uname')
@@ -346,9 +346,9 @@
<!-- LDAP pword -->
<div class="form-group {{ $errors->has('ldap_pword') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_pword">{{ trans('admin/settings/general.ldap_pword') }}</label>
</div>
<label for="ldap_pword" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_pword') }}</label>
<div class="col-md-8">
<input class="form-control" type="password" name="ldap_pword" id="ldap_pword" value="" autocomplete="off" onfocus="this.removeAttribute('readonly');" readonly>
@error('ldap_pword')
@@ -369,9 +369,9 @@
<!-- LDAP basedn -->
<div class="form-group {{ $errors->has('ldap_basedn') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_basedn">{{ trans('admin/settings/general.ldap_basedn') }}</label>
</div>
<label for="ldap_basedn" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_basedn') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'cn=users/authorized,dc=example,dc=com' }}" name="ldap_basedn" type="text" id="ldap_basedn" value="{{ old('ldap_basedn', $setting->ldap_basedn) }}">
@error('ldap_basedn')
@@ -392,9 +392,9 @@
<!-- LDAP filter -->
<div class="form-group {{ $errors->has('ldap_filter') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_filter">{{ trans('admin/settings/general.ldap_filter') }}</label>
</div>
<label for="ldap_filter" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_filter') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_filter" id="ldap_filter" value="{{ old('ldap_filter', $setting->ldap_filter) }}" class="form-control" placeholder="{{ trans('general.example') .'&(cn=*)' }}">
@error('ldap_filter')
@@ -415,9 +415,9 @@
<!-- LDAP Auth Filter Query -->
<div class="form-group {{ $errors->has('ldap_auth_filter_query') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_auth_filter_query">{{ trans('admin/settings/general.ldap_auth_filter_query') }}</label>
</div>
<label for="ldap_auth_filter_query" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_auth_filter_query') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_auth_filter_query" id="ldap_auth_filter_query" value="{{ old('ldap_auth_filter_query', $setting->ldap_auth_filter_query) }}" class="form-control" placeholder="{{ trans('general.example') .'uid=' }}">
@@ -439,10 +439,10 @@
<!-- Default LDAP Permissions Group Select -->
<div class="form-group{{ $errors->has('group') ? ' has-error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_default_group">{{ trans('admin/settings/general.ldap_default_group') }}</label>
</div>
<div class="form-group{{ $errors->has('ldap_default_group') ? ' has-error' : '' }}">
<label for="ldap_default_group" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_default_group') }}</label>
<div class="col-md-8">
@@ -490,9 +490,9 @@
<!-- LDAP username field-->
<div class="form-group {{ $errors->has('ldap_username_field') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_username_field">{{ trans('admin/settings/general.ldap_username_field') }}</label>
</div>
<label for="ldap_username_field" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_username_field') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_username_field" id="ldap_username_field" value="{{ old('ldap_username_field', $setting->ldap_username_field) }}" class="form-control" placeholder="{{ trans('general.example') .'samaccountname' }}">
@error('ldap_username_field')
@@ -507,9 +507,9 @@
<!-- LDAP Last Name Field -->
<div class="form-group {{ $errors->has('ldap_lname_field') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_lname_field">{{ trans('admin/settings/general.ldap_lname_field') }}</label>
</div>
<label for="ldap_lname_field" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_lname_field') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_lname_field" id="ldap_lname_field" value="{{ old('ldap_lname_field', $setting->ldap_lname_field) }}" class="form-control" placeholder="{{ trans('general.example') .'sn' }}">
@error('ldap_lname_field')
@@ -524,9 +524,9 @@
<!-- LDAP First Name field -->
<div class="form-group {{ $errors->has('ldap_fname_field') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_fname_field">{{ trans('admin/settings/general.ldap_fname_field') }}</label>
</div>
<label for="ldap_fname_field" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_fname_field') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_fname_field" id="ldap_fname_field" value="{{ old('ldap_fname_field', $setting->ldap_fname_field) }}" class="form-control" placeholder="{{ trans('general.example') .'givenname' }}">
@error('ldap_fname_field')
@@ -541,9 +541,9 @@
<!-- LDAP Display Name Field -->
<div class="form-group {{ $errors->has('ldap_display_name') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_lname_field">{{ trans('admin/settings/general.ldap_display_name') }}</label>
</div>
<label for="ldap_lname_field" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_display_name') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_display_name" id="ldap_display_name" value="{{ old('ldap_display_name', $setting->ldap_display_name) }}" class="form-control" placeholder="{{ trans('general.example') .'displayname' }}">
<p class="help-block">{{ trans('admin/settings/general.ldap_display_name_help') }}</p>
@@ -559,9 +559,9 @@
<!-- LDAP emp number -->
<div class="form-group {{ $errors->has('ldap_emp_num') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_emp_num">{{ trans('admin/settings/general.ldap_emp_num') }}</label>
</div>
<label for="ldap_emp_num" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_emp_num') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'employeenumber/employeeid' }}" name="ldap_emp_num" type="text" id="ldap_emp_num" value="{{ old('ldap_emp_num', $setting->ldap_emp_num) }}">
@error('ldap_emp_num')
@@ -581,9 +581,9 @@
</div>
<!-- LDAP department -->
<div class="form-group {{ $errors->has('ldap_dept') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_dept">{{ trans('admin/settings/general.ldap_dept') }}</label>
</div>
<label for="ldap_dept" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_dept') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'department' }}" name="ldap_dept" type="text" id="ldap_dept" value="{{ old('ldap_dept', $setting->ldap_dept) }}">
@@ -604,9 +604,9 @@
</div>
<!-- LDAP Manager -->
<div class="form-group {{ $errors->has('ldap_dept') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_manager">{{ trans('admin/settings/general.ldap_manager') }}</label>
</div>
<label for="ldap_manager" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_manager') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder=" {{ trans('general.example') .'manager' }}" name="ldap_manager" type="text" value="{{ old('ldap_manager', $setting->ldap_manager) }}">
@error('ldap_manager')
@@ -627,9 +627,9 @@
<!-- LDAP email -->
<div class="form-group {{ $errors->has('ldap_email') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_email">{{ trans('admin/settings/general.ldap_email') }}</label>
</div>
<label for="ldap_email" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_email') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'mail' }}" name="ldap_email" type="text" id="ldap_email" value="{{ old('ldap_email', $setting->ldap_email) }}">
@error('ldap_email')
@@ -650,9 +650,9 @@
<!-- LDAP Phone -->
<div class="form-group {{ $errors->has('ldap_phone') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_phone">{{ trans('admin/settings/general.ldap_phone') }}</label>
</div>
<label for="ldap_phone" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_phone') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'telephonenumber' }}" name="ldap_phone" type="text" id="ldap_phone" value="{{ old('ldap_phone', $setting->ldap_phone_field) }}">
@error('ldap_phone')
@@ -673,9 +673,9 @@
<!-- LDAP Mobile -->
<div class="form-group {{ $errors->has('ldap_mobile') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_mobile">{{ trans('admin/settings/general.ldap_mobile') }}</label>
</div>
<label for="ldap_mobile" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_mobile') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'mobile' }}" name="ldap_mobile" type="text" id="ldap_mobile" value="{{ old('ldap_mobile', $setting->ldap_mobile) }}">
@error('ldap_mobile')
@@ -689,9 +689,9 @@
<!-- LDAP Job title -->
<div class="form-group {{ $errors->has('ldap_jobtitle') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_jobtitle">{{ trans('admin/settings/general.ldap_jobtitle') }}</label>
</div>
<label for="ldap_jobtitle" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_jobtitle') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'title' }}" name="ldap_jobtitle" type="text" id="ldap_jobtitle" value="{{ old('ldap_jobtitle', $setting->ldap_jobtitle) }}">
@error('ldap_jobtitle')
@@ -712,9 +712,9 @@
<!-- LDAP address -->
<div class="form-group {{ $errors->has('ldap_address') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_address">{{ trans('admin/settings/general.ldap_address') }}</label>
</div>
<label for="ldap_address" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_address') }}</label>
<div class="col-md-8">
<input class="form-control" name="ldap_address" placeholder="{{ trans('general.example') .'streetaddress' }}" type="text" id="ldap_address" value="{{ old('ldap_address', $setting->ldap_address) }}">
@error('ldap_address')
@@ -728,9 +728,9 @@
<!-- LDAP city -->
<div class="form-group {{ $errors->has('ldap_city') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_city">{{ trans('admin/settings/general.ldap_city') }}</label>
</div>
<label for="ldap_city" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_city') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'l' }}" name="ldap_city" type="text" id="ldap_city" value="{{ old('ldap_city', $setting->ldap_city) }}">
@error('ldap_city')
@@ -744,9 +744,9 @@
<!-- LDAP state -->
<div class="form-group {{ $errors->has('ldap_state') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_state">{{ trans('admin/settings/general.ldap_state') }}</label>
</div>
<label for="ldap_state" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_state') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'st' }}" name="ldap_state" type="text" id="ldap_state" value="{{ old('ldap_state', $setting->ldap_state) }}">
@error('ldap_state')
@@ -760,9 +760,9 @@
<!-- LDAP zip -->
<div class="form-group {{ $errors->has('ldap_zip') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_zip">{{ trans('admin/settings/general.ldap_zip') }}</label>
</div>
<label for="ldap_zip" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_zip') }}</label>
<div class="col-md-8">
<input class="form-control" name="ldap_zip" type="text" id="ldap_zip" placeholder="{{ trans('general.example') .'postalcode' }}" value="{{ old('ldap_zip', $setting->ldap_zip) }}">
@error('ldap_zip')
@@ -777,9 +777,9 @@
<!-- LDAP Country -->
<div class="form-group {{ $errors->has('ldap_country') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_country">{{ trans('admin/settings/general.ldap_country') }}</label>
</div>
<label for="ldap_country" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_country') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'co' }}" name="ldap_country" type="text" id="ldap_country" value="{{ old('ldap_country', $setting->ldap_country) }}">
@error('ldap_country')
@@ -800,9 +800,9 @@
<!-- LDAP Location -->
<div class="form-group {{ $errors->has('ldap_location') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_location">{{ trans('admin/settings/general.ldap_location') }}</label>
</div>
<label for="ldap_location" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_location') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'physicaldeliveryofficename' }}" name="ldap_location" type="text" id="ldap_location" value="{{ old('ldap_location', $setting->ldap_location) }}">
<p class="help-block">{!! trans('admin/settings/general.ldap_location_help') !!}</p>
@@ -824,9 +824,9 @@
<!-- LDAP active flag -->
<div class="form-group {{ $errors->has('ldap_active_flag') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="ldap_active_flag">{{ trans('admin/settings/general.ldap_active_flag') }}</label>
</div>
<label for="ldap_active_flag" class="col-md-3 control-label">{{ trans('admin/settings/general.ldap_active_flag') }}</label>
<div class="col-md-8">
<input type="text" name="ldap_active_flag" id="ldap_active_flag" value="{{ old('ldap_active_flag', $setting->ldap_active_flag) }}" class="form-control">
<p class="help-block">{!! trans('admin/settings/general.ldap_activated_flag_help') !!}</p>
@@ -849,11 +849,11 @@
<!-- LDAP invert active flag -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="ldap_invert_active_flag">
{{ trans('admin/settings/general.ldap_invert_active_flag') }}
</label>
</div>
<label for="ldap_invert_active_flag" class="col-md-3 control-label">
{{ trans('admin/settings/general.ldap_invert_active_flag') }}
</label>
<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)) />
@@ -890,9 +890,9 @@
<!-- LDAP Login test -->
<div class="form-group">
<div class="col-md-3 text-right">
<label for="test_ldap_login"> {{trans('admin/settings/general.ldap_test_login')}} </label>
</div>
<label for="test_ldap_login" class="col-md-3 control-label"> {{trans('admin/settings/general.ldap_test_login')}} </label>
<div class="col-md-8">
<div class="row">
<div class="col-md-4">
@@ -901,7 +901,7 @@
<div class="col-md-4">
<input type="password" name="ldaptest_password" id="ldaptest_password" class="form-control" placeholder="{{trans('admin/settings/general.ldap_password_placeholder')}}" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');">
</div>
<div class="col-md-3 text-right">
<div class="col-md-3">
<a class="btn btn-default btn-sm" id="ldaptestlogin" style="margin-right: 10px;">{{ trans('admin/settings/general.ldap_test') }}</a>
</div>
@@ -951,9 +951,9 @@
<!-- LDAP Forgotten password -->
<div class="form-group {{ $errors->has('custom_forgot_pass_url') ? 'error' : '' }}">
<div class="col-md-3 text-right">
<label for="custom_forgot_pass_url">{{ trans('admin/settings/general.custom_forgot_pass_url') }}</label>
</div>
<label for="custom_forgot_pass_url" class="col-md-3 control-label">{{ trans('admin/settings/general.custom_forgot_pass_url') }}</label>
<div class="col-md-8">
<input class="form-control" placeholder="{{ trans('general.example') .'https://my.ldapserver-forgotpass.com' }}" name="custom_forgot_pass_url" type="url" id="custom_forgot_pass_url" value="{{ old('custom_forgot_pass_url', $setting->custom_forgot_pass_url) }}">
<p class="help-block">{{ trans('admin/settings/general.custom_forgot_pass_url_help') }}</p>

View File

@@ -41,10 +41,10 @@
<div class="col-md-12">
<!-- Language -->
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
<div class="col-md-3 col-xs-12">
<label for="site_name">{{ trans('admin/settings/general.default_language') }}</label>
</div>
<div class="form-group {{ $errors->has('locale') ? 'error' : '' }}">
<label for="site_name" class="col-md-3 control-label">{{ trans('admin/settings/general.default_language') }}</label>
<div class="col-md-5 col-xs-12">
<x-input.locale-select name="locale" :selected="old('locale', $setting->locale)" />
@@ -54,9 +54,9 @@
<!-- name display format -->
<div class="form-group {{ $errors->has('name_display_format') ? 'error' : '' }}">
<div class="col-md-3 col-xs-12">
<label for="name_display_format">{{ trans('general.name_display_format') }}</label>
</div>
<label for="name_display_format" class="col-md-3 control-label">{{ trans('general.name_display_format') }}</label>
<div class="col-md-5 col-xs-12">
<x-input.select
name="name_display_format"
@@ -72,9 +72,9 @@
<!-- Date format -->
<div class="form-group {{ $errors->has('time_display_format') ? 'error' : '' }}">
<div class="col-md-3 col-xs-12">
<label for="time_display_format">{{ trans('general.time_and_date_display') }}</label>
</div>
<label for="time_display_format" class="col-md-3 control-label">{{ trans('general.time_and_date_display') }}</label>
<div class="col-md-5 col-xs-12">
<x-input.date-display-format name="date_display_format" :selected="old('date_display_format', $setting->date_display_format)" style="min-width:100%" />
</div>
@@ -88,9 +88,9 @@
<!-- Currency -->
<div class="form-group {{ $errors->has('default_currency') ? 'error' : '' }}">
<div class="col-md-3 col-xs-12">
<label for="default_currency">{{ trans('admin/settings/general.default_currency') }}</label>
</div>
<label for="default_currency" class="col-md-3 control-label">{{ trans('admin/settings/general.default_currency') }}</label>
<div class="col-md-9 col-xs-12">
<input
class="form-control select2-container"

Some files were not shown because too many files have changed in this diff Show More