Compare commits

...

61 Commits

Author SHA1 Message Date
snipe 4d6a8d48ee Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2020-09-15 10:15:17 -07:00
snipe e464f0edf3 Small UI tweaks for kits 2020-09-15 10:15:14 -07:00
snipe 426897c902 Bumped hash 2020-09-15 10:13:55 -07:00
snipe cfd78fa870 Merge pull request #8435 from inietov/bug/ch15188/v5-500-server-error-in-update-general-settings
Looks great, thank you!
2020-09-15 02:34:59 -07:00
Ivan Nieto 501d5680ea Fix [ch15188] 500 error 2020-09-15 03:51:10 -05:00
snipe 912401a0a0 Change warning icon to padlock icon 2020-09-12 12:07:56 -07:00
snipe ec5daa387b Better explanation for demo mode 2020-09-12 10:04:57 -07:00
snipe 24a52eaeae Bumped hash 2020-09-12 10:04:36 -07:00
snipe e448b626e2 Removed pagaination from dashboard 2020-09-12 08:37:37 -07:00
snipe ac2403e8fc Fixed markdown issue in markdown notifications 2020-09-11 17:12:33 -07:00
snipe cf545f0ed1 Fixed form layout on accessory checkin page 2020-09-11 16:20:56 -07:00
snipe 52848ca8d8 Fixed checkin/checkout notification crashing 2020-09-11 16:10:18 -07:00
snipe a91e81fc42 Added checkin_email to category listing 2020-09-11 16:06:38 -07:00
snipe e750b2b2da Added envelope css to overrides for table header 2020-09-11 16:06:19 -07:00
snipe d3d64bd85c Removed asset tag from accessory checkin markdown notification 2020-09-11 16:06:02 -07:00
snipe 514e7ca072 Added boolean has_eula to categories 2020-09-11 16:05:42 -07:00
snipe 0f22cf6807 Fixed #8428 - Added purchase cost column to user tabs 2020-09-11 11:48:51 -07:00
snipe 2f435a57c1 Fixed #8426 - show model number in custom fields model listing 2020-09-11 11:27:30 -07:00
snipe f949a95cfb Merge pull request #8423 from snipe/fix_ldap_test_php74
Fix ldap test php74
2020-09-09 14:38:26 -07:00
Brady Wetherington f3f7d714a6 Fix ldap test button for php 7.4 (suppressing errors) 2020-09-09 14:18:05 -07:00
snipe b258f34bce Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-09 12:27:01 -07:00
snipe 3d4e1d4641 Merge pull request #8419 from snipe/fixes/ldap_init_fix_for_migrations
Hopefully fixes #8418 - migrations on new install go wonky because of…
2020-09-09 12:26:01 -07:00
snipe cb5104c27d Hopefully fixes #8418 - migrations on new install go wonky because of LDAP service provider 2020-09-08 21:13:24 -07:00
snipe 5e3ccd1004 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2020-09-08 18:29:38 -07:00
snipe 82e0b1ffd8 Fixed [ch15130] - update the seeder to clear requested assets table 2020-09-08 18:29:02 -07:00
snipe 251ef82741 Added company formatter to asset maintenance report 2020-09-08 18:14:21 -07:00
snipe 327583f055 Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-04 16:24:17 -07:00
snipe acd15bc3e4 Fixed DB seeder to truncate the asset_maintenances table
This wouldn’t have affected anything in production, but could cause some weird behavior if re-seeding often, since the suppliers table gets stomped on but the old maintenances remained, leaving ghost entries and associating the wrong (old, now defunct) supplier with the maintenance as new supplier IDs get generated.
2020-09-04 16:23:58 -07:00
snipe aabf9b6f9c Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-04 16:02:38 -07:00
snipe 10648de9af Bulk Checkin and Delete also edit users [ch15107] 2020-09-04 16:02:25 -07:00
snipe 97743160ef Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-04 15:45:03 -07:00
snipe 1bea83ee5a Fixed missing setting call
This is still broken further down the line in the event handler for license checkin, but this gets us closer
2020-09-04 15:44:37 -07:00
snipe d9e7a457d4 Fixed regression on select menus [ch15093]
Custom report doesn’t pass an $item, so we have to check for that in that required check
2020-09-04 15:43:49 -07:00
snipe 5f5b80acae Added maintained and reassignable to license listing 2020-09-04 10:02:04 -07:00
snipe ba06507e10 Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-03 19:47:50 -07:00
snipe 69d7000922 Fixed [ch15085] - duplicate use statements in Consumables controller 2020-09-03 19:47:15 -07:00
snipe 96abe54aad Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-03 19:41:09 -07:00
snipe 249b9b7509 Fixed [ch15086] - [object object] in companies date displays 2020-09-03 19:40:17 -07:00
snipe 25cb489b76 Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-03 17:00:26 -07:00
snipe 0eeeb24cae Added data-validation=“required" to appropriate field partials 2020-09-03 16:59:42 -07:00
snipe 0503a51cae Corrected validation to match model 2020-09-03 16:58:45 -07:00
snipe 2e0f7921a8 Removed commented out javascript 2020-09-03 16:58:16 -07:00
snipe c29ec6a100 Removed duplicate state field 2020-09-03 16:00:26 -07:00
snipe a57ab29af6 Accessibility features for custom fields icons 2020-09-03 15:55:52 -07:00
snipe b8ddbadd2b Use icons for 2FA, LDAP, etc info on user view 2020-09-03 15:55:41 -07:00
snipe 3e120812e3 Removed 2FA reset button if the user is not enrolled in 2FA 2020-09-03 15:55:20 -07:00
snipe d0124b900a Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-03 15:14:06 -07:00
snipe 3ea3e8b856 Updated user asset listing to use bootstrap-tables and asset endpoint [ch1389] 2020-09-03 15:12:51 -07:00
snipe 0ace7d16fb Merge branch 'integrations/rc5-4-2020-08-31-dev-into-master' into develop 2020-09-03 14:08:01 -07:00
snipe fb59405a87 User view can t be loaded [ch15079] 2020-09-03 14:07:30 -07:00
Ivan Nieto 3fcd83c499 Fixes some errors in forms using the deprecated Input:: facade 2020-09-03 13:42:33 -05:00
snipe 9820bc6a58 Merge branch 'integrations/intermediate-2020-08-31-v5-rc' into develop
# Conflicts:
#	config/version.php
#	public/css/build/all.css
#	public/css/skins/skin-contrast.css
#	public/css/skins/skin-contrast.css.map
#	public/js/build/vue.js
#	public/js/dist/all.js
#	resources/views/custom_fields/fieldsets/view.blade.php
#	resources/views/layouts/default.blade.php
#	resources/views/users/index.blade.php
2020-09-03 09:40:38 -07:00
snipe ed79eacb9d Updated help text 2020-08-31 19:55:30 -07:00
snipe 408435057e Small vue fixes 2020-08-31 19:41:05 -07:00
snipe 7cab9f48e5 Use darker red for errors 2020-08-31 19:40:49 -07:00
snipe addb2bde23 Merge pull request #8392 from snipe/integrations/rc5-4-2020-08-31-dev-into-master
Integrations/rc5 4 2020 08 31 dev into master
2020-08-31 17:24:44 -07:00
snipe a64e1be278 Fixed Input:: () vs request() 2020-08-31 17:18:09 -07:00
snipe 13216b8860 Fixed pGenerator (again) 2020-08-31 17:17:51 -07:00
snipe 2a5cd58ad9 Added gitignore to cache dir 2020-08-31 17:15:21 -07:00
snipe 6a90ce523b Bumped version 2020-08-31 15:38:40 -07:00
snipe e321aeabae Merge branch 'master' into integrations/2020-08-31-v5-rc
# Conflicts:
#	.all-contributorsrc
#	.nvmrc
#	README.md
#	app/Console/Commands/LdapSync.php
#	app/Http/Controllers/Api/ConsumablesController.php
#	app/Http/Controllers/Api/ImportController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Auth/LoginController.php
#	app/Http/Controllers/CustomFieldsetsController.php
#	app/Http/Controllers/LicensesController.php
#	app/Http/Controllers/UsersController.php
#	app/Importer/import_mappings.md
#	app/Models/Ldap.php
#	app/Models/Loggable.php
#	composer.json
#	composer.lock
#	config/version.php
#	public/css/build/all.css
#	public/css/dist/all.css
#	public/css/skins/skin-contrast.css
#	public/css/skins/skin-contrast.css.map
#	public/js/build/all.js
#	public/js/build/vue.js
#	public/js/build/vue.js.map
#	public/js/dist/all.js
#	public/mix-manifest.json
#	resources/assets/js/components/importer/importer-file.vue
#	resources/assets/less/overrides.less
#	resources/macros/macros.php
#	resources/views/custom_fields/fieldsets/view.blade.php
#	resources/views/hardware/edit.blade.php
#	resources/views/hardware/labels.blade.php
#	resources/views/hardware/view.blade.php
#	resources/views/layouts/default.blade.php
#	resources/views/modals/model.blade.php
#	resources/views/modals/user.blade.php
#	resources/views/users/index.blade.php
#	routes/api.php
#	routes/web/fields.php
#	tests/unit/UserTest.php
2020-08-31 12:14:44 -07:00
61 changed files with 471 additions and 302 deletions
@@ -9,8 +9,7 @@ use App\Http\Transformers\SelectlistTransformer;
use App\Models\Company;
use App\Models\Consumable;
use App\Models\User;
use App\Http\Transformers\ConsumablesTransformer;
use App\Helpers\Helper;
use Illuminate\Http\Request;
class ConsumablesController extends Controller
{
@@ -75,6 +75,7 @@ class SettingsController extends Controller
// Get a sample of 10 users so user can verify the data is correct
try {
Log::info('Testing LDAP sync');
error_reporting(E_ALL & ~E_DEPRECATED); // workaround for php7.4, which deprecates ldap_control_paged_result
$users = $ldap->testUserImportSync();
$message['user_sync'] = [
'users' => $users
@@ -565,7 +565,7 @@ class AssetsController extends Controller
if (!ini_get("auto_detect_line_endings")) {
ini_set("auto_detect_line_endings", '1');
}
$csv = Reader::createFromPath(Input::file('user_import_csv'));
$csv = Reader::createFromPath($request->file('user_import_csv'));
$csv->setHeaderOffset(0);
$results = $csv->getRecords();
$item = array();
+4 -4
View File
@@ -186,7 +186,7 @@ class SettingsController extends Controller
Auth::login($user, true);
$settings->save();
if ('1' == Input::get('email_creds')) {
if ($request->input('email_creds') == '1') {
$data = [];
$data['email'] = $user->email;
$data['username'] = $user->username;
@@ -347,7 +347,7 @@ class SettingsController extends Controller
$setting->depreciation_method = $request->input('depreciation_method');
if ('' != Input::get('per_page')) {
if ($request->input('per_page') != '') {
$setting->per_page = $request->input('per_page');
} else {
$setting->per_page = 200;
@@ -1146,10 +1146,10 @@ class SettingsController extends Controller
*
* @return View
*/
public function postPurge()
public function postPurge(Request $request)
{
if (! config('app.lock_passwords')) {
if ('DELETE' == Input::get('confirm_purge')) {
if ('DELETE' == $request->input('confirm_purge')) {
// Run a backup immediately before processing
Artisan::call('backup:run');
Artisan::call('snipeit:purge', ['--force' => 'true', '--no-interaction' => true]);
@@ -42,7 +42,8 @@ class BulkUsersController extends Controller
->with('groups', Group::pluck('name', 'id'));
} elseif ($request->input('bulk_actions') == 'delete') {
return view('users/confirm-bulk-delete', compact('users', Helper::statusLabelList()));
return view('users/confirm-bulk-delete')->with('users', $users)->with('statuslabel_list', Helper::statusLabelList());
} elseif ($request->input('bulk_actions') == 'bulkpasswordreset') {
foreach ($users as $user) {
@@ -28,6 +28,7 @@ class CategoriesTransformer
'name' => e($category->name),
'image' => ($category->image) ? Storage::disk('public')->url('categories/'.e($category->image)) : null,
'category_type' => ucwords(e($category->category_type)),
'has_eula' => ($category->getEula() ? true : false),
'eula' => ($category->getEula()),
'checkin_email' => ($category->checkin_email =='1'),
'require_acceptance' => ($category->require_acceptance == '1'),
@@ -36,6 +36,7 @@ class LicensesTransformer
'free_seats_count' => (int) $license->free_seats_count,
'license_name' => e($license->license_name),
'license_email' => e($license->license_email),
'reassignable' => ($license->reassignable == 1) ? true : false,
'maintained' => ($license->maintained == 1) ? true : false,
'supplier' => ($license->supplier) ? ['id' => (int) $license->supplier->id,'name'=> e($license->supplier->name)] : null,
'category' => ($license->category) ? ['id' => (int) $license->category->id,'name'=> e($license->category->name)] : null,
+15 -2
View File
@@ -57,22 +57,32 @@ class CheckoutableListener
* Notify the user about the checked in checkoutable
*/
public function onCheckedIn($event) {
\Log::debug('checkin fired');
/**
* When the item wasn't checked out to a user, we can't send notifications
*/
if(!$event->checkedOutTo instanceof User) {
\Log::debug('checked out to not a user');
return;
}
/**
* Send the appropriate notification
*/
\Log::debug('checked out to a user');
if(!$event->checkedOutTo->locale){
\Log::debug('Use default settings locale');
Notification::locale(Setting::getSettings()->locale)->send(
$this->getNotifiables($event),
$this->getCheckinNotification($event)
);
} else {
\Log::debug('Use user locale? I do not think this works as expected yet');
// \Log::debug(print_r($this->getNotifiables($event), true));
Notification::send(
$this->getNotifiables($event),
$this->getCheckinNotification($event)
@@ -130,7 +140,9 @@ class CheckoutableListener
*/
private function getCheckinNotification($event) {
$model = get_class($event->checkoutable);
// $model = get_class($event->checkoutable);
$notificationClass = null;
@@ -145,7 +157,8 @@ class CheckoutableListener
$notificationClass = CheckinLicenseSeatNotification::class;
break;
}
\Log::debug('Notification class: '.$notificationClass);
return new $notificationClass($event->checkoutable, $event->checkedOutTo, $event->checkedInBy, $event->note);
}
+34 -32
View File
@@ -4,6 +4,7 @@ namespace App\Models;
use App\Notifications\AuditNotification;
use Illuminate\Support\Facades\Auth;
use App\Models\Setting;
trait Loggable
{
@@ -90,6 +91,7 @@ trait Loggable
*/
public function logCheckin($target, $note, $action_date = null)
{
$settings = Setting::getSettings();
$log = new Actionlog;
$log->target_type = get_class($target);
$log->target_id = $target->id;
@@ -120,38 +122,38 @@ trait Loggable
$log->logaction('checkin from');
$params = [
'target' => $target,
'item' => $log->item,
'admin' => $log->user,
'note' => $note,
'target_type' => $log->target_type,
'settings' => $settings,
];
$checkinClass = null;
if (method_exists($target, 'notify')) {
try {
$target->notify(new static::$checkinClass($params));
} catch (\Exception $e) {
\Log::debug($e);
}
}
// Send to the admin, if settings dictate
$recipient = new \App\Models\Recipients\AdminRecipient();
if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
try {
$recipient->notify(new static::$checkinClass($params));
} catch (\Exception $e) {
\Log::debug($e);
}
}
// $params = [
// 'target' => $target,
// 'item' => $log->item,
// 'admin' => $log->user,
// 'note' => $note,
// 'target_type' => $log->target_type,
// 'settings' => $settings,
// ];
//
//
// $checkinClass = null;
//
// if (method_exists($target, 'notify')) {
// try {
// $target->notify(new static::$checkinClass($params));
// } catch (\Exception $e) {
// \Log::debug($e);
// }
//
// }
//
// // Send to the admin, if settings dictate
// $recipient = new \App\Models\Recipients\AdminRecipient();
//
// if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
// try {
// $recipient->notify(new static::$checkinClass($params));
// } catch (\Exception $e) {
// \Log::debug($e);
// }
//
// }
return $log;
}
@@ -26,6 +26,7 @@ class CheckinAccessoryNotification extends Notification
$this->admin = $checkedInby;
$this->note = $note;
$this->settings = Setting::getSettings();
\Log::debug('Constructor for notification fired');
}
/**
@@ -35,23 +36,63 @@ class CheckinAccessoryNotification extends Notification
*/
public function via()
{
\Log::debug('via called');
$notifyBy = [];
if (Setting::getSettings()->slack_endpoint) {
$notifyBy[] = 'slack';
}
/**
* Only send checkin notifications to users if the category
* has the corresponding checkbox checked.
*/
if ($this->item->checkin_email() && $this->target instanceof User && $this->target->email != '')
{
\Log::debug('use email');
$notifyBy[] = 'mail';
if (Setting::getSettings()->slack_endpoint!='') {
$notifyBy[] = 'slack';
}
/**
* Only send notifications to users that have email addresses
*/
if ($this->target instanceof User && $this->target->email != '') {
\Log::debug('The target is a user');
/**
* Send an email if the asset requires acceptance,
* so the user can accept or decline the asset
*/
if (($this->item->requireAcceptance()) || ($this->item->getEula()) || ($this->item->checkin_email())) {
$notifyBy[] = 'mail';
}
/**
* Send an email if the asset requires acceptance,
* so the user can accept or decline the asset
*/
if ($this->item->requireAcceptance()) {
\Log::debug('This accessory requires acceptance');
}
/**
* Send an email if the item has a EULA, since the user should always receive it
*/
if ($this->item->getEula()) {
\Log::debug('This accessory has a EULA');
}
/**
* Send an email if an email should be sent at checkin/checkout
*/
if ($this->item->checkin_email()) {
\Log::debug('This accessory has a checkin_email()');
}
}
\Log::debug('checkin_email on this category is '.$this->item->checkin_email());
return $notifyBy;
}
@@ -86,6 +127,7 @@ class CheckinAccessoryNotification extends Notification
*/
public function toMail()
{
\Log::debug('to email called');
return (new MailMessage)->markdown('notifications.markdown.checkin-accessory',
[
'item' => $this->item,
+9 -1
View File
@@ -50,12 +50,20 @@ class CategoryPresenter extends Presenter
"title" => trans('general.qty'),
"visible" => true
],[
"field" => "eula",
"field" => "has_eula",
"searchable" => false,
"sortable" => false,
"title" => trans('admin/categories/table.eula_text'),
"visible" => false,
"formatter" => 'trueFalseFormatter',
],[
"field" => "checkin_email",
"searchable" => false,
"sortable" => true,
"class" => 'css-envelope',
"title" => 'Send Email',
"visible" => true,
"formatter" => 'trueFalseFormatter',
],[
"field" => "require_acceptance",
"searchable" => false,
+2
View File
@@ -82,12 +82,14 @@ class CompanyPresenter extends Presenter
"sortable" => true,
"visible" => false,
"title" => trans('general.updated_at'),
"formatter" => 'createdAtFormatter',
],[
"field" => "created_at",
"searchable" => false,
"sortable" => true,
"visible" => false,
"title" => trans('general.created_at'),
"formatter" => 'createdAtFormatter',
],[
"field" => "actions",
"searchable" => false,
+15
View File
@@ -98,6 +98,21 @@ class LicensePresenter extends Presenter
"title" => trans('general.purchase_date'),
'formatter' => 'dateDisplayFormatter'
], [
"field" => "maintained",
"searchable" => false,
"sortable" => true,
"visible" => false,
"title" => trans('admin/licenses/form.maintained'),
"formatter" => "trueFalseFormatter"
], [
"field" => "reassignable",
"searchable" => false,
"sortable" => true,
"visible" => false,
"title" => trans('admin/licenses/form.reassignable'),
"formatter" => "trueFalseFormatter"
],
[
"field" => "purchase_cost",
"searchable" => true,
"sortable" => true,
+1 -1
View File
@@ -57,7 +57,7 @@ class LdapAd extends LdapAdConfiguration
public function init()
{
// Already initialized
if($this->ldap) {
if ($this->ldap) {
return true;
}
+37 -26
View File
@@ -52,10 +52,19 @@ class LdapAdConfiguration
* @since 5.0.0
*/
public function init() {
$this->ldapSettings = $this->getSnipeItLdapSettings();
if ($this->isLdapEnabled()) {
$this->setSnipeItConfig();
// This try/catch is dumb, but is necessary to run initial migrations, since
// this service provider is booted even during migrations. :( - snipe
try {
$this->ldapSettings = $this->getSnipeItLdapSettings();
if ($this->isLdapEnabled()) {
$this->setSnipeItConfig();
}
} catch (\Exception $e) {
\Log::debug($e);
$this->ldapSettings = null;
}
}
/**
@@ -82,33 +91,35 @@ class LdapAdConfiguration
*/
private function getSnipeItLdapSettings(): Collection
{
$ldapSettings = Setting::getLdapSettings()
->map(function ($item, $key) {
// Trim the items
if (is_string($item)) {
$item = trim($item);
}
// Get the boolean value of the LDAP setting, makes it easier to work with them
if (in_array($key, self::LDAP_BOOLEAN_SETTINGS)) {
return boolval($item);
}
// Decrypt the admin password
if ('ldap_pword' === $key && !empty($item)) {
try {
return decrypt($item);
} 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.');
$ldapSettings = collect();
if(Setting::first()) { // during early migration steps, there may be no settings table entry to start with
$ldapSettings = Setting::getLdapSettings()
->map(function ($item, $key) {
// Trim the items
if (is_string($item)) {
$item = trim($item);
}
// Get the boolean value of the LDAP setting, makes it easier to work with them
if (in_array($key, self::LDAP_BOOLEAN_SETTINGS)) {
return boolval($item);
}
}
if ($item && 'ldap_server' === $key) {
return collect(parse_url($item));
}
// Decrypt the admin password
if ('ldap_pword' === $key && !empty($item)) {
try {
return decrypt($item);
} 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.');
}
}
return $item;
});
if ($item && 'ldap_server' === $key) {
return collect(parse_url($item));
}
return $item;
});
}
return $ldapSettings;
}
+6 -6
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v5.0.0-beta-3',
'full_app_version' => 'v5.0.0-beta-3 - build 4352-gec723a3da',
'build_version' => '4190',
'app_version' => 'v5.0.0-beta-4',
'full_app_version' => 'v5.0.0-beta-4 - build 4482-g5b68a321a',
'build_version' => '4482',
'prerelease_version' => '',
'hash_version' => 'gec723a3da',
'full_hash' => 'v5.0.0-beta-3-gec723a3da',
'hash_version' => 'g5b68a321a',
'full_hash' => 'v5.0.0-beta-4-44-g5b68a321a',
'branch' => 'develop',
);
);
@@ -19,7 +19,7 @@ class AddAdAppendDomainSettings extends Migration
});
$s = Setting::first(); // we are deliberately *not* using the ::getSettings() method, as it caches things, and our Settings table is being migrated right now
if($s->is_ad && $s->ldap_enabled && $s->ad_domain) { //backwards-compatibility setting; < v5 always appended AD Domains
if ($s && $s->is_ad && $s->ldap_enabled && $s->ad_domain) { //backwards-compatibility setting; < v5 always appended AD Domains
$s->ad_append_domain = 1;
$s->save();
}
+3
View File
@@ -48,6 +48,9 @@ class DatabaseSeeder extends Seeder
Model::reguard();
DB::table('imports')->truncate();
DB::table('asset_maintenances')->truncate();
DB::table('requested_assets')->truncate();
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+26 -27
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -1,8 +1,8 @@
{
"/js/build/app.js": "/js/build/app.js?id=041c2c23e0a7e285999d",
"/js/build/app.js": "/js/build/app.js?id=32ad11cb23fc92588929",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=59413334823616b81341",
"/css/build/app.css": "/css/build/app.css?id=3911a887c2bdc7d0b528",
"/css/build/overrides.css": "/css/build/overrides.css?id=688f59cd273484405f9b",
"/css/build/app.css": "/css/build/app.css?id=032fd8c3fce99c7fd862",
"/css/build/overrides.css": "/css/build/overrides.css?id=0b4aefd7ef0c117ef23a",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=9fa704134cfacfacab93",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=747948e5f269f64047f7",
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=d7996d850e8bcdc4e167",
@@ -18,7 +18,7 @@
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=2f665cf40d7348b3f94c",
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=71c178700d68294e3413",
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=b4fc4a74e1f6367dc3e2",
"/css/dist/all.css": "/css/dist/all.css?id=cd644954b1fc39b7f25b",
"/css/dist/all.css": "/css/dist/all.css?id=23029d15778815d3c35a",
"/css/blue.png": "/css/blue.png?id=4c85d6a97173123bd14a",
"/css/blue@2x.png": "/css/blue@2x.png?id=62c67c6a822439e8a4ac",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=0cfa39cacd9c83b4f53b",
@@ -34,5 +34,5 @@
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=a534edb9f7179f6dcf62",
"/js/build/vendor.js": "/js/build/vendor.js?id=ac70ab5fd89efc2aa7d0",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=9407782198cbc29f23d1",
"/js/dist/all.js": "/js/dist/all.js?id=451bd5a52c473c82fd71"
"/js/dist/all.js": "/js/dist/all.js?id=3fade7209d054eb18a72"
}
@@ -1,17 +1,20 @@
<template>
<div v-show="processDetail" class="col-md-6 col-md-offset-3">
<div class="row">
<div class="row">
<div class="dynamic-form-row">
<div class="col-md-5 col-xs-12">
<label for="import-type">Import Type:</label>
</div>
<div class="col-md-7 col-xs-12">
<select2 :options="options.importTypes" v-model="options.importType" required>
<option disabled value="0"></option>
</select2>
</div>
</div>
</div><!-- /dynamic-form-row -->
<div class="dynamic-form-row">
<div class="col-md-5 col-xs-12">
<label for="import-update">Update Existing Values?:</label>
@@ -19,7 +22,8 @@
<div class="col-md-7 col-xs-12">
<input type="checkbox" class="minimal" name="import-update" v-model="options.update">
</div>
</div>
</div><!-- /dynamic-form-row -->
<div class="dynamic-form-row">
<div class="col-md-5 col-xs-12">
<label for="send-welcome">Send Welcome Email for new Users?</label>
@@ -27,7 +31,8 @@
<div class="col-md-7 col-xs-12">
<input type="checkbox" class="minimal" name="send-welcome" v-model="options.send_welcome">
</div>
</div>
</div><!-- /dynamic-form-row -->
<div class="dynamic-form-row">
<div class="col-md-5 col-xs-12">
<label for="run-backup">Backup before importing?</label>
@@ -35,14 +40,15 @@
<div class="col-md-7 col-xs-12">
<input type="checkbox" class="minimal" name="run-backup" v-model="options.run_backup">
</div>
</div>
</div>
<div class="alert col-md-8 col-md-offset-2" style="text-align:left"
:class="alertClass"
v-if="statusText">
{{ this.statusText }}
</div>
</div>
</div><!-- /dynamic-form-row -->
<div class="alert col-md-8 col-md-offset-2" style="text-align:left"
:class="alertClass"
v-if="statusText">
{{ this.statusText }}
</div><!-- /alert -->
</div> <!-- /div row -->
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8" style="padding-top: 30px;">
@@ -50,7 +56,7 @@
<div class="col-md-4"><h4>Import Field</h4></div>
<div class="col-md-4"><h4>Sample Value</h4></div>
</div>
</div>
</div><!-- /div row -->
<template v-for="(header, index) in file.header_row">
<div class="row">
@@ -69,8 +75,8 @@
<div class="col-md-4">
<p class="form-control-static">{{ activeFile.first_row[index] }}</p>
</div>
</div>
</div>
</div><!-- /div col-md-8 -->
</div><!-- /div row -->
</template>
<div class="row">
@@ -79,17 +85,17 @@
<button type="submit" class="btn btn-sm btn-primary" @click="postSave">Import</button>
<br><br>
</div>
</div>
</div><!-- /div row -->
<div class="row">
<div class="alert col-md-8 col-md-offset-2" style="padding-top: 20px;"
:class="alertClass"
v-if="statusText">
{{ this.statusText }}
</div>
</div>
</div><!-- /div row -->
</div><!-- /div v-show -->
</div>
</template>
<script>
@@ -83,7 +83,7 @@
<div class="modal-header">
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">
<h2 class="modal-title">
Create Client
</h2>
</div>
@@ -153,7 +153,7 @@
<h4 class="modal-title">
Edit Client
</h2>
</h4>
</div>
<div class="modal-body">
+3 -3
View File
@@ -137,13 +137,13 @@ a.accordion-header {
width: 100%;
}
.error input {
color: #dd4b39;
border: 2px solid #dd4b39 !important;
color: #a94442;
border: 2px solid #a94442 !important;
}
.error label,
.alert-msg {
color: #dd4b39;
color: #a94442;
display: block;
}
+15 -3
View File
@@ -156,12 +156,12 @@ a.accordion-header {
width: 100%;
}
.error input {
color: #dd4b39;
border: 2px solid #dd4b39 !important;
color: #a94442;
border: 2px solid #a94442 !important;
}
.error label, .alert-msg {
color: #dd4b39;
color: #a94442;
display: block;
}
@@ -486,6 +486,7 @@ h4 {
th.css-barcode > .th-inner,
th.css-license > .th-inner,
th.css-consumable > .th-inner,
th.css-envelope > .th-inner,
th.css-accessory > .th-inner
{
font-size: 0px;
@@ -501,6 +502,7 @@ th.css-padlock > .th-inner::before,
th.css-barcode > .th-inner::before,
th.css-license > .th-inner::before,
th.css-consumable > .th-inner::before,
th.css-envelope > .th-inner::before,
th.css-accessory > .th-inner::before
{
@@ -530,6 +532,12 @@ th.css-consumable > .th-inner::before
content: "\f043";
}
th.css-envelope > .th-inner::before
{
content: "\f003";
}
th.css-accessory > .th-inner::before
{
content: "\f11c";
@@ -552,3 +560,7 @@ th.css-accessory > .th-inner::before
padding: 6px 12px;
height: 34px;
}
.form-group.has-error label {
color: #a94442;
}
+2 -1
View File
@@ -1,7 +1,8 @@
<?php
return array(
'about_kits' => 'About Predefined Kits',
'about_kits_title' => 'About Predefined Kits',
'about_kits_text' => 'Predefined Kits let you quickly check out a collection of items (assets, licenses, etc) to a user. This can be helpful when your onboarding process is consistent across many users and all users receive the same items.',
'checkout' => 'Checkout Kit ',
'create_success' => 'Kit was successfully created.',
'create' => 'Create Predefined Kit',
+1 -1
View File
@@ -136,7 +136,7 @@
'licenses' => 'Licenses',
'list_all' => 'List All',
'loading' => 'Loading',
'lock_passwords' => 'This field cannot be edited in this installation.',
'lock_passwords' => 'This field value will not be saved in a demo installation.',
'feature_disabled' => 'This feature has been disabled for the demo installation.',
'location' => 'Location',
'locations' => 'Locations',
@@ -18,7 +18,7 @@
<div class="row">
<div class="col-md-9">
<div class="col-md-7">
<form class="form-horizontal" method="post" action="" autocomplete="off">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
@@ -37,7 +37,7 @@
@if ($accessory->name)
<!-- accessory name -->
<div class="form-group">
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
<label class="col-sm-3 control-label">{{ trans('admin/hardware/form.name') }}</label>
<div class="col-md-6">
<p class="form-control-static">{{ $accessory->name }}</p>
</div>
@@ -46,7 +46,7 @@
<!-- Note -->
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
<label for="note" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
<div class="col-md-7">
<textarea class="col-md-6 form-control" id="note" name="note">{{ old('note', $accessory->note) }}</textarea>
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
@@ -55,8 +55,8 @@
<!-- Checkout/Checkin Date -->
<div class="form-group{{ $errors->has('checkin_at') ? ' has-error' : '' }}">
{{ Form::label('checkin_at', trans('admin/hardware/form.checkin_date'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-8">
<div class="input-group col-md-5 required">
<div class="col-md-7">
<div class="input-group col-md-5 required" style="padding-left: 0px;">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkin_at" id="checkin_at" value="{{ Request::old('checkin_at', date('Y-m-d')) }}">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+1 -1
View File
@@ -13,7 +13,7 @@
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true','category_type' => 'accessory'])
@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', 'required' => 'true'])
@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.order_number')
@@ -41,7 +41,7 @@ Accept assets {{ $user->present()->fullName() }}
<tbody>
@foreach ($acceptances as $acceptance)
<tr>
<td>{{ $acceptance->checkoutable->present()->name }}</td>
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">Accept/Decline</a></td>
</tr>
@endforeach
+1 -1
View File
@@ -11,7 +11,7 @@
@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')])
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'consumable'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
@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')
@@ -60,7 +60,7 @@
</td>
<td>
@foreach($fieldset->models as $model)
<a href="{{ route('models.show', $model->id) }}" class="label label-default">{{ $model->name }}</a>
<a href="{{ route('models.show', $model->id) }}" class="label label-default">{{ $model->name }}{{ ($model->model_number) ? ' ('.$model->model_number.')' : '' }}</a>
@endforeach
</td>
@@ -140,7 +140,7 @@
<tr>
<td>{{ $field->name }}</td>
<td>{{ $field->help_text }}</td>
<td>{!! ($field->show_in_email=='1') ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>' !!}</td>
<td>{!! ($field->show_in_email=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"><span class="sr-only">'.trans('general.yes').'</span></i>' : '<i class="fa fa-times text-danger" aria-hidden="true"><span class="sr-only">'.trans('general.no').'</span></i>' !!}</td>
<td>
<code>{{ $field->convertUnicodeDbSlug() }}</code>
@if ($field->convertUnicodeDbSlug()!=$field->db_column)
-2
View File
@@ -178,8 +178,6 @@
<table
data-cookie-id-table="dashActivityReport"
data-height="400"
data-pagination="true"
data-side-pagination="server"
data-sort-order="desc"
data-sort-name="created_at"
id="dashActivityReport"
+2 -2
View File
@@ -33,7 +33,7 @@
<label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>
<div class="input-group col-md-3">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date') }}">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ old('purchase_date') }}">
<span class="input-group-addon"><i class="fa fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
@@ -44,7 +44,7 @@
<label for="expected_checkin" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
<div class="input-group col-md-3">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ old('expected_checkin') }}">
<span class="input-group-addon"><i class="fa fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('expected_checkin', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
+3 -1
View File
@@ -1,12 +1,14 @@
@extends('layouts/edit-form', [
'createText' => trans('admin/kits/general.create'),
'updateText' => trans('admin/kits/general.update'),
'helpTitle' => trans('admin/kits/table.about_kits_title'),
'helpText' => trans('admin/kits/table.about_kits_text'),
'formAction' => (isset($item->id)) ? route('kits.update', ['kit' => $item->id]) : route('kits.store'),
])
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => 'Name']) {{-- TODO: trans --}}
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
@stop
@section('content')
+3 -1
View File
@@ -1,4 +1,6 @@
@extends('layouts/default')
@extends('layouts/default', [
'helpTitle' => trans('admin/kits/general.about_kits_title'),
'helpText' => trans('admin/kits/general.about_kits_text')])
{{-- Web site Title --}}
@section('title')
+23 -1
View File
@@ -742,7 +742,17 @@
<section class="content-header" style="padding-bottom: 30px;">
<h1 class="pull-left">
@yield('title')
</h1>
@if (isset($helpText))
@include ('partials.more-info',
[
'helpText' => $helpText,
'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left'
])
@endif
<div class="pull-right">
@yield('header_right')
</div>
@@ -839,6 +849,10 @@
{{-- Javascript files --}}
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
<!-- v5-beta: This pGenerator call must remain here for v5 - until fixed - so that the JS password generator works for the user create modal. -->
<script src="{{ url('js/pGenerator.jquery.js') }}"></script>
{{-- Page level javascript --}}
@stack('js')
@@ -847,13 +861,21 @@
<script nonce="{{ csrf_token() }}">
// ignore: 'input[type=hidden]' is required here to validate the select2 lists
$.validate({
form : '#create-form',
modules : 'date, toggleDisabled',
disabledFormFilter : '#create-form',
showErrorDialogs : true
showErrorDialogs : true,
ignore: 'input[type=hidden]'
});
$(function () {
$('[data-toggle="tooltip"]').tooltip();
+20 -31
View File
@@ -24,48 +24,37 @@
<!-- row -->
<div class="row">
<!-- col-md-8 -->
<div class="col-md-8 col-md-offset-2">
<div class="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">
<!-- box -->
<div class="box box-default">
<!-- box-header -->
<div class="box-header{{ ($item->id) ? ' with-border' : '' }}">
<div class="box-header with-border text-right">
<div class="box-title col-md-12" style="min-height: 20px;">
<div class="col-md-12 box-title text-right" style="padding: 0px; margin: 0px;">
<div class="col-md-12">
@if (isset($helpText))
<div class="col-md-1 text-left" style="horiz-align: center;">
@include ('partials.more-info',
[
'helpText' => $helpText,
'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left'
])
</div>
@endif
@if ($item->id)
<div class="col-md-9">
<h2 class="box-title">
<div class="col-md-12" style="padding: 0px; margin: 0px;">
<div class="col-md-9 text-left">
@if ($item->id)
<h2 class="box-title text-left" style="padding-top: 8px;">
{{ $item->display_name }}
</h2>
</div>
@endif
@endif
</div>
<div class="col-md-3 text-right" style="padding-right: 10px;">
<a class="btn btn-link text-left" href="{{ URL::previous() }}">
{{ trans('button.cancel') }}
</a>
<button type="submit" class="btn btn-primary">
<i class="fa fa-check icon-white" aria-hidden="true"></i>
{{ trans('general.save') }}
</button>
</div>
</div>
</div>
@if ((isset($topSubmit)) && ($topSubmit =='true'))
<div class="col-md-2 text-right">
@include('partials.forms.edit.submit-button')
</div>
@endif
</div> <!-- /div.row -->
</div><!-- /.box-header -->
</div><!-- /.box-header -->
<!-- box-body -->
+1 -1
View File
@@ -10,7 +10,7 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name')])
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name'), 'required' => 'true'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
@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.model_number')
@@ -11,7 +11,6 @@
| | |
| ------------- | ------------- |
| **{{ trans('mail.asset_name') }}** | {{ $item->name }} |
| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} |
@if (isset($item->manufacturer))
| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} |
@endif
@@ -391,8 +391,8 @@
function createdAtFormatter(value) {
if ((value) && (value.date)) {
return value.date;
if ((value) && (value.formatted)) {
return value.formatted;
}
}
@@ -27,8 +27,7 @@
<div class="col-md-7">
{{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state')) }}
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
{{Form::text('state', Request::old('state', $item->state), array('class' => 'form-control')) }}
{!! $errors->first('state', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
@@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}">
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
@if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
@@ -3,7 +3,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-6{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}">
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
@if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
{{ (\App\Models\Location::find($location_id)) ? \App\Models\Location::find($location_id)->name : '' }}
@@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}">
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
@if ($manufacturer_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $manufacturer_id }}" selected="selected" role="option" aria-selected="true" role="option">
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
@@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" data-validation="required" required>
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $model_id }}" selected="selected">
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
@@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}" />
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' data-validation="required" required' : '' !!} />
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@@ -4,7 +4,7 @@
<label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" />
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' data-validation="required" required' : '' !!}/>
</div>
{!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
@@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
<div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id')) }}
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'data-validation' => "required")) }}
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="col-md-2 col-sm-2 text-left">
@@ -14,6 +14,10 @@
<p class="help-block" id="{{ $logoId }}-status">
{{ $helpBlock }}
</p>
@if (config('app.lock_passwords')===true)
<p class="text-warning"><i class="fa fa-warning"></i>{{ trans('general.feature_disabled') }}</p>
@endif
{!! $errors->first($logoVariable, '<span class="alert-msg">:message</span>') !!}
</div>
+3 -1
View File
@@ -1 +1,3 @@
<a href="#" class="text-dark-gray pull-left" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-placement="{{ (isset($helpPosition)) ? $helpPosition : 'right' }}" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Info Missing' }}"><i class="fa fa-life-ring fa-2x"></i></a>
<a style="padding-left: 10px; font-size: 18px;" class="text-dark-gray" data-trigger="focus" tabindex="0" role="button" data-toggle="popover" title="More Info" data-placement="right" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Help Info Missing' }}">
<i class="fa fa-life-ring" aria-hidden="true"><span class="sr-only">More Info</span></i>
</a>
@@ -35,7 +35,7 @@
}'>
<thead>
<tr>
<th data-field="company" data-sortable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
<th data-field="company" data-sortable="false" data-visible="false" data-formatter="companiesLinkObjFormatter">{{ trans('admin/companies/table.title') }}</th>
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
<th data-sortable="true" data-field="asset_tag" data-formatter="assetTagLinkFormatter" data-visible="false">{{ trans('general.asset_tag') }}</th>
<th data-sortable="false" data-field="asset_name" data-formatter="assetNameLinkFormatter">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
+6 -3
View File
@@ -49,6 +49,7 @@
<div class="col-md-7 required">
@if (config('app.lock_passwords')===true)
{{ Form::text('site_name', Request::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }}
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::text('site_name',
Request::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management', 'data-validation' => 'required')) }}
@@ -170,7 +171,7 @@
@if (config('app.lock_passwords')===true)
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled', 'aria-label'=>'custom_css')) }}
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS', 'aria-label'=>'custom_css')) }}
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@@ -188,11 +189,12 @@
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
@endif
<p class="help-block">{{ trans('admin/settings/general.support_footer_help') }}</p>
{!! $errors->first('support_footer', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
@@ -206,6 +208,7 @@
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
@endif
@@ -223,7 +226,7 @@
<div class="col-md-9">
@if (config('app.lock_passwords')===true)
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => 'Optional footer text','disabled'=>'disabled')) }}
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => 'Optional footer text')) }}
@endif
+1 -1
View File
@@ -45,7 +45,7 @@
'class' => 'form-inline',
'id' => 'bulkForm']) }}
@if (Input::get('status')!='deleted')
@if (request('status')!='deleted')
@can('delete', \App\Models\User::class)
<div id="toolbar">
<label for="bulk_actions" class="sr-only">Bulk Actions</label>
+106 -71
View File
@@ -262,30 +262,34 @@
@endif
<tr>
<td class="text-nowrap">{{ trans('general.login_enabled') }}</td>
<td>{{ ($user->activated=='1') ? trans('general.yes') : trans('general.no') }}</td>
<td>
{!! ($user->activated=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</tr>
@if ($user->ldap_import!='1')
<tr>
<td class="text-nowrap">LDAP</td>
<td>{{ trans('general.yes') }}</td>
<td>
{!! ($user->ldap_import=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</td>
</tr>
@endif
@if ($user->activated=='1')
<tr>
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_active') }}</td>
<td>{{ ($user->two_factor_active()) ? trans('general.yes') : trans('general.no') }}</td>
<td>
{!! ($user->two_factor_active()) ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</td>
</tr>
<tr>
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_enrolled') }}</td>
<td class="two_factor_resetrow">
<div class="row">
<div class="col-md-1" id="two_factor_reset_toggle">
{{ ($user->two_factor_active_and_enrolled()) ? trans('general.yes') : trans('general.no') }}
{!! ($user->two_factor_active_and_enrolled()) ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div>
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0'))
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
<div class="col-md-11">
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
<span id="two_factor_reseticon">
@@ -366,90 +370,79 @@
<div class="tab-pane" id="asset">
<!-- checked out assets table -->
<div class="table-responsive">
<table class="display table table-striped">
<thead>
<tr>
<th class="col-md-3">{{ trans('admin/hardware/table.asset_model') }}</th>
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
<th class="col-md-2">{{ trans('general.name') }}</th>
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
</tr>
</thead>
<tbody>
@if ($user->assets)
@foreach ($user->assets as $asset)
<tr>
<td>
@if (($asset->model) && ($asset->physical=='1'))
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
@endif
</td>
<td>
@can('view', $asset)
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
@endcan
</td>
<td>{!! $asset->present()->nameUrl() !!}</td>
<td class="hidden-print">
@can('checkin', $asset)
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
@if($settings->show_assigned_assets)
@foreach ($asset->assignedAssets as $asset)
<tr>
<td>
@if ($asset->physical=='1')
<a href="{{ route('models.show', $asset->model->id) }}">{{ ' '.$asset->model->name }}</a>
@endif
</td>
<td>
@can('view', $asset)
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
@endcan
</td>
<td>{!! $asset->present()->nameUrl() !!}</td>
<td class="hidden-print">
@can('checkin', $asset)
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
@endforeach
@endif
@endforeach
@endif
</tbody>
<div class="table-responsive table-striped">
<table
data-click-to-select="true"
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
data-cookie-id-table="userAssetsListingTable"
data-pagination="true"
data-id-table="userAssetsListingTable"
data-search="true"
data-side-pagination="server"
data-show-columns="true"
data-show-export="true"
data-show-footer="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
data-toolbar="#toolbar"
id="userAssetsListingTable"
class="table table-striped snipe-table"
data-url="{{ route('api.assets.index',['assigned_to' => e($user->id), 'assigned_type' => 'App\Models\User']) }}"
data-export-options='{
"fileName": "export-{{ str_slug($user->present()->fullName()) }}-assets-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
</table>
</div>
</div><!-- /asset -->
<div class="tab-pane" id="licenses">
<div class="table-responsive">
<table class="display table table-hover">
<table
data-cookie-id-table="userLicenseTable"
data-id-table="userLicenseTable"
id="userLicenseTable"
data-search="true"
data-pagination="true"
data-side-pagination="client"
data-show-columns="true"
data-show-export="true"
data-show-footer="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
class="table table-striped snipe-table table-hover"
data-export-options='{
"fileName": "export-license-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
}'>
<thead>
<tr>
<th class="col-md-5">{{ trans('general.name') }}</th>
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
</tr>
</thead>
<tbody>
@foreach ($user->licenses as $license)
<tr>
<td>
<td class="col-md-4">
{!! $license->present()->nameUrl() !!}
</td>
<td>
<td class="col-md-4">
@can('viewKeys', $license)
{!! $license->present()->serialUrl() !!}
@else
------------
@endcan
</td>
<td class="hidden-print">
<td class="col-md-2">
{!! $license->purchase_cost !!}
</td>
<td class="hidden-print col-md-2">
@can('update', $license)
<a href="{{ route('licenses.checkin', array('licenseSeatId'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
@@ -463,10 +456,28 @@
<div class="tab-pane" id="accessories">
<div class="table-responsive">
<table class="display table table-hover">
<table
data-cookie-id-table="userAccessoryTable"
data-id-table="userAccessoryTable"
id="userAccessoryTable"
data-search="true"
data-pagination="true"
data-side-pagination="client"
data-show-columns="true"
data-show-export="true"
data-show-footer="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
class="table table-striped snipe-table table-hover"
data-export-options='{
"fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
}'>
<thead>
<tr>
<th class="col-md-5">{{ trans('general.name') }}</th>
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
</tr>
</thead>
@@ -474,9 +485,12 @@
@foreach ($user->accessories as $accessory)
<tr>
<td>{!!$accessory->present()->nameUrl()!!}</td>
<td>
{!! $accessory->purchase_cost !!}
</td>
<td class="hidden-print">
@can('checkin', $accessory)
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
<a href="{{ route('checkin/accessory', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
@endcan
</td>
</tr>
@@ -488,10 +502,28 @@
<div class="tab-pane" id="consumables">
<div class="table-responsive">
<table class="display table table-striped">
<table
data-cookie-id-table="userConsumableTable"
data-id-table="userConsumableTable"
id="userConsumableTable"
data-search="true"
data-pagination="true"
data-side-pagination="client"
data-show-columns="true"
data-show-export="true"
data-show-footer="true"
data-show-refresh="true"
data-sort-order="asc"
data-sort-name="name"
class="table table-striped snipe-table table-hover"
data-export-options='{
"fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
}'>
<thead>
<tr>
<th class="col-md-8">{{ trans('general.name') }}</th>
<th class="col-md-6">{{ trans('general.name') }}</th>
<th class="col-md-2" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
<th class="col-md-4">{{ trans('general.date') }}</th>
</tr>
</thead>
@@ -499,6 +531,9 @@
@foreach ($user->consumables as $consumable)
<tr>
<td>{!! $consumable->present()->nameUrl() !!}</td>
<td>
{!! $consumable->purchase_cost !!}
</td>
<td>{{ $consumable->created_at }}</td>
</tr>
@endforeach
+11 -11
View File
@@ -1,13 +1,13 @@
<table class="panel" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-content">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-item">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="panel-content">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-item">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>
</table>
-2
View File
@@ -1,2 +0,0 @@
*
!.gitignore
-1
View File
@@ -27,7 +27,6 @@ mix
'./node_modules/ekko-lightbox/dist/ekko-lightbox.css',
'./node_modules/bootstrap-table/dist/bootstrap-table.css',
'./public/css/build/app.css',
//'./resources/assets/css/lib/select2.css',
'./node_modules/select2/dist/css/select2.css',
'./public/css/build/overrides.css'
],