A free open source IT asset/license management system
Merge branch 'develop' into develop
Grant Le Rouxb1464e028ca1
diff --cc app/Helpers/Helper.phpindex 83961ffd75,f0f2f5e13e..b4c8f5605d--- a/app/Helpers/Helper.php+++ b/app/Helpers/Helper.php@@@ -1126,63 -1161,77 +1161,118 @@@ class Helpereturn $settings;}- public static function AgeFormat($date) {- $year = Carbon::parse($date)- ->diff(now())->y;- $month = Carbon::parse($date)- ->diff(now())->m;- $days = Carbon::parse($date)- ->diff(now())->d;- $age='';- if ($year) {- $age .= $year.'y ';- }- if ($month) {- $age .= $month.'m ';+++ /**+ * Generic helper (largely used by livewire right now) that returns the font-awesome icon+ * for the object type.+ *+ * @author A. Gianotto <[email protected]>+ * @since 6.1.0+ *+ * @return string+ */+ public static function iconTypeByItem($item) {++ switch ($item) {+ case 'asset':+ return 'fas fa-barcode';+ break;+ case 'accessory':+ return 'fas fa-keyboard';+ break;+ case 'component':+ return 'fas fa-hdd';+ break;+ case 'consumable':+ return 'fas fa-tint';+ break;+ case 'license':+ return 'far fa-save';+ break;+ case 'location':+ return 'fas fa-map-marker-alt';+ break;+ case 'user':+ return 'fas fa-user';+ break;}- if ($days) {- $age .= $days.'d';++ }+++ /*+ * This is a shorter way to see if the app is in demo mode.+ *+ * This makes it cleanly available in blades and in controllers, e.g.+ *+ * Blade:+ * {{ Helper::isDemoMode() ? ' disabled' : ''}} for form blades where we need to disable a form+ *+ * Controller:+ * if (Helper::isDemoMode()) {+ * // don't allow the thing+ * }+ * @todo - use this everywhere else in the app where we have very long if/else config('app.lock_passwords') stuff+ */+ public static function isDemoMode() {+ if (config('app.lock_passwords') === true) {+ return true;+ \Log::debug('app locked!');}+- return $age;++ return false;+ }++++ /**+ * Conversion between units of measurement+ *+ * @author Grant Le Roux <[email protected]>+ * @since 5.0+ * @param float $value Measurement value to convert+ * @param string $srcUnit Source unit of measurement+ * @param string $dstUnit Destination unit of measurement+ * @param int $round Round the result to decimals (Default false - No rounding)+ * @return float+ */+ public static function convertUnit($value, $srcUnit, $dstUnit, $round=false) {+ $srcFactor = static::getUnitConversionFactor($srcUnit);+ $dstFactor = static::getUnitConversionFactor($dstUnit);+ $output = $value * $srcFactor / $dstFactor;+ return ($round !== false) ? round($output, $round) : $output;+ }-+++ /**+ * Get conversion factor from unit of measurement to mm+ *+ * @author Grant Le Roux <[email protected]>+ * @since 5.0+ * @param string $unit Unit of measurement+ * @return float+ */+ public static function getUnitConversionFactor($unit) {+ switch (strtolower($unit)) {+ case 'mm': return 1.0;+ case 'cm': return 10.0;+ case 'm': return 1000.0;+ case 'in': return 25.4;+ case 'ft': return 12 * static::getUnitConversionFactor('in');+ case 'yd': return 3 * static::getUnitConversionFactor('ft');+ case 'pt': return (1/72) * static::getUnitConversionFactor('in');+ default: throw new \InvalidArgumentException('Unit: \''.$unit.'\' is not supported');++ return false;+ }+++ /*+ * I know it's gauche to return a shitty HTML string, but this is just a helper and since it will be the same every single time,+ * it seemed pretty safe to do here. Don't you judge me.+ */+ public static function showDemoModeFieldWarning() {+ if (Helper::isDemoMode()) {+ return "<p class=\"text-warning\"><i class=\"fas fa-lock\"></i>" . trans('general.feature_disabled') . "</p>";}}}diff --cc app/Http/Controllers/Assets/AssetsController.phpindex dddaa51ba5,74b3dffa1c..e699779a34--- a/app/Http/Controllers/Assets/AssetsController.php+++ b/app/Http/Controllers/Assets/AssetsController.php@@@ -12,8 -12,8 +12,9 @@@ use App\Models\CheckoutRequestuse App\Models\Company;use App\Models\Location;use App\Models\Setting;+ use App\Models\Statuslabel;use App\Models\User;+use App\View\Label;use Auth;use Carbon\Carbon;use DB;diff --cc app/Http/Controllers/Assets/BulkAssetsController.phpindex b9a3a39cf5,80d17f1b30..8419098936--- a/app/Http/Controllers/Assets/BulkAssetsController.php+++ b/app/Http/Controllers/Assets/BulkAssetsController.php@@@ -45,7 -44,8 +45,8 @@@ class BulkAssetsController extends Contif ($request->filled('bulk_actions')) {switch ($request->input('bulk_actions')) {case 'labels':+ $this->authorize('view', Asset::class);- return view('hardware/labels')+ return (new Label)->with('assets', Asset::find($asset_ids))->with('settings', Setting::getSettings())->with('bulkedit', true)diff --cc composer.jsonindex ccddd5ab2f,2b127f907d..bb9acd9b1d--- a/composer.json+++ b/composer.json@@@ -67,8 -68,8 +68,9 @@@"pragmarx/google2fa-laravel": "^1.3","rollbar/rollbar-laravel": "^7.0","spatie/laravel-backup": "^6.16",+ "symfony/polyfill-mbstring": "^1.22","tecnickcom/tc-lib-barcode": "^1.15",+ "tecnickcom/tcpdf": "^6.5.0","unicodeveloper/laravel-password": "^1.0","watson/validating": "^6.1"},diff --cc package.jsonindex b3b5f99999,774fa63b4a..1c97f0fadc--- a/package.json+++ b/package.json@@@ -24,12 -24,11 +24,12 @@@"vue-template-compiler": "2.4.4"},"dependencies": {- "@fortawesome/fontawesome-free": "^6.2.1",- "acorn": "^8.8.0",- "acorn-import-assertions": "^1.8.0",+ "@fortawesome/fontawesome-free": "^6.4.0",+ "acorn": "^8.9.0",+ "acorn-import-assertions": "^1.9.0","admin-lte": "^2.4.18","ajv": "^6.12.6",+ "alpinejs": "^3.10.5","blueimp-file-upload": "^9.34.0","bootstrap": "^3.4.1","bootstrap-colorpicker": "^2.5.3",diff --cc public/mix-manifest.jsonindex 293f8dc3ae,957e6e556e..f9faf4e818--- a/public/mix-manifest.json+++ b/public/mix-manifest.json@@@ -1,54 -1,51 +1,52 @@@{- "/js/build/app.js": "/js/build/app.js?id=f05cc05b9000ba73e1949bcf137d4301",+ "/js/build/app.js": "/js/build/app.js?id=82ddaa718cced6fb0be6e8db6f16a0c0","/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",- "/css/build/overrides.css": "/css/build/overrides.css?id=0465141b9ecb0662ba6790c1460f391f",- "/css/build/app.css": "/css/build/app.css?id=c3a896cab26e2093f8be24336b7db1b9",+ "/css/build/overrides.css": "/css/build/overrides.css?id=5166569ede5a36802eadeea982686ca6",+ "/css/build/app.css": "/css/build/app.css?id=b612c48e78fece2e1e8042ae24cc5f1e","/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=dc383f8560a8d4adb51d44fb4043e03b","/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",- "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=f343f659ca1d45534d2c2c3cc30fb619",- "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=57e634d63101d3613f4c73aaa2e3f50a",- "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=5120ce6a4b70d11bbc84a5125aa31949",+ "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=e6e53eef152bba01a4c666a4d8b01117",+ "/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=07273f6ca3c698a39e8fc2075af4fa07",+ "/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=c1f33574ecb9d3e69d9b8fe5bd68e101","/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",- "/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=713b1205aa2d7c9db282f8cd5754c0e4",+ "/css/dist/skins/skin-purple-dark.css": "/css/dist/skins/skin-purple-dark.css?id=7d92dea45d94be7e1d4e427c728d335d","/css/dist/skins/skin-purple.css": "/css/dist/skins/skin-purple.css?id=6fe68325d5356197672c27bc77cedcb4",- "/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=6ea1eecb7f939256c373c92f58749e72",- "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=1c0f59079342d1a10099bf41d2e46f59",+ "/css/dist/skins/skin-red-dark.css": "/css/dist/skins/skin-red-dark.css?id=8ca888bbc050d9680cbb65021382acba",+ "/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=bdfc704731682c67645a2248b0b8d2d7","/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=76482123f6c70e866d6b971ba91de7bb",- "/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e",+ "/css/dist/skins/skin-green-dark.css": "/css/dist/skins/skin-green-dark.css?id=e36e83c2aa3c3afdbb8ebe2c0309e91d","/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",- "/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=8e538625ebd4b8096e150d1aa483547b",+ "/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=da6c7997d9de2f8329142399f0ce50da","/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898",- "/css/dist/all.css": "/css/dist/all.css?id=ef030b613d45620b907cf0184a14e868",- "/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f2122815b2e4b150",- "/css/[email protected]": "/css/[email protected]?id=51135dd4d24f88f5de0b2414bd51dac5",+ "/css/dist/all.css": "/css/dist/all.css?id=ae5d0ce9886bbe4ad4b021c6be19ec36","/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",- "/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=0b834d6c0ecc5bf275a83414eb38efd4",- "/css/webfonts/fa-brands-400.woff2": "/css/webfonts/fa-brands-400.woff2?id=a46924ee2a2a7702ef7fe7ead62fca18",- "/css/webfonts/fa-regular-400.ttf": "/css/webfonts/fa-regular-400.ttf?id=93d1ca4fec25c46c9ac67b07058b3f72",- "/css/webfonts/fa-regular-400.woff2": "/css/webfonts/fa-regular-400.woff2?id=d8373194363409c201ee33fcd48ba574",- "/css/webfonts/fa-solid-900.ttf": "/css/webfonts/fa-solid-900.ttf?id=a7d60e1f645d1b80e0879b2c8e72ed06",- "/css/webfonts/fa-solid-900.woff2": "/css/webfonts/fa-solid-900.woff2?id=3e1cccc95e0dadb2168d67c2f0f23bf3",- "/css/webfonts/fa-v4compatibility.ttf": "/css/webfonts/fa-v4compatibility.ttf?id=ee335846f3552dc6af2ef7c8cafae1dc",- "/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=1ad361f755ce9c96dadb8da2d7318975",- "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=ee4896df8b8f008ce73a9a0c2549aefd",- "/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",- "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",- "/js/dist/all.js": "/js/dist/all.js?id=4f9355ac85d380301f6f62e55b1a6e5e",+ "/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=e2e2b1797606a266ed55549f5bb5a179",+ "/css/webfonts/fa-brands-400.woff2": "/css/webfonts/fa-brands-400.woff2?id=fe912d1c4a7e0e1db87a64eb7e54c945",+ "/css/webfonts/fa-regular-400.ttf": "/css/webfonts/fa-regular-400.ttf?id=31a6b5ecfc8d018d0e3a294f0c80e9e9",+ "/css/webfonts/fa-regular-400.woff2": "/css/webfonts/fa-regular-400.woff2?id=bf8eabe300a00a3adb0293596987abc4",+ "/css/webfonts/fa-solid-900.ttf": "/css/webfonts/fa-solid-900.ttf?id=cd687455c6d6c058e2e9f84f409e2965",+ "/css/webfonts/fa-solid-900.woff2": "/css/webfonts/fa-solid-900.woff2?id=eea38615e7b5dbbaf88c263f2230cc32",+ "/css/webfonts/fa-v4compatibility.ttf": "/css/webfonts/fa-v4compatibility.ttf?id=6ebbf5afc34f54463abc2b81ca637364",+ "/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=67b8a78b7e80e805cfa4ee0421895ba4",+ "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=f5935cf8eaf9c1f71da0c9245d730471",+ "/js/build/vendor.js": "/js/build/vendor.js?id=3592e07ae9a6d1805a4ea3bd3c034aef",+ "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=40e2dc8b5b29e244bb545f78e2a3242b",+ "/js/dist/all.js": "/js/dist/all.js?id=ba07d399f23b294f7c4983030b757423",+ "/js/dist/all-defer.js": "/js/dist/all-defer.js?id=7d1b362ddda912bce36f333cd492191b","/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",- "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e",+ "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=e36e83c2aa3c3afdbb8ebe2c0309e91d","/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",- "/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=1c0f59079342d1a10099bf41d2e46f59",+ "/css/dist/skins/skin-black-dark.min.css": "/css/dist/skins/skin-black-dark.min.css?id=bdfc704731682c67645a2248b0b8d2d7","/css/dist/skins/skin-blue.min.css": "/css/dist/skins/skin-blue.min.css?id=f677207c6cf9678eb539abecb408c374",- "/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=57e634d63101d3613f4c73aaa2e3f50a",+ "/css/dist/skins/skin-blue-dark.min.css": "/css/dist/skins/skin-blue-dark.min.css?id=07273f6ca3c698a39e8fc2075af4fa07","/css/dist/skins/skin-yellow.min.css": "/css/dist/skins/skin-yellow.min.css?id=7b315b9612b8fde8f9c5b0ddb6bba690",- "/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=5120ce6a4b70d11bbc84a5125aa31949",+ "/css/dist/skins/skin-yellow-dark.min.css": "/css/dist/skins/skin-yellow-dark.min.css?id=c1f33574ecb9d3e69d9b8fe5bd68e101","/css/dist/skins/skin-red.min.css": "/css/dist/skins/skin-red.min.css?id=44bf834f2110504a793dadec132a5898",- "/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=6ea1eecb7f939256c373c92f58749e72",+ "/css/dist/skins/skin-red-dark.min.css": "/css/dist/skins/skin-red-dark.min.css?id=8ca888bbc050d9680cbb65021382acba","/css/dist/skins/skin-purple.min.css": "/css/dist/skins/skin-purple.min.css?id=6fe68325d5356197672c27bc77cedcb4",- "/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=713b1205aa2d7c9db282f8cd5754c0e4",+ "/css/dist/skins/skin-purple-dark.min.css": "/css/dist/skins/skin-purple-dark.min.css?id=7d92dea45d94be7e1d4e427c728d335d","/css/dist/skins/skin-orange.min.css": "/css/dist/skins/skin-orange.min.css?id=6f0563e726c2fe4fab4026daaa5bfdf2",- "/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=f343f659ca1d45534d2c2c3cc30fb619",- "/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=8e538625ebd4b8096e150d1aa483547b"+ "/css/dist/skins/skin-orange-dark.min.css": "/css/dist/skins/skin-orange-dark.min.css?id=e6e53eef152bba01a4c666a4d8b01117",+ "/css/dist/skins/skin-contrast.min.css": "/css/dist/skins/skin-contrast.min.css?id=da6c7997d9de2f8329142399f0ce50da"}diff --cc resources/lang/en/admin/settings/general.phpindex 2ae3dba996,92faf85c5f..9c038a87be--- a/resources/lang/en/admin/settings/general.php+++ b/resources/lang/en/admin/settings/general.php@@@ -323,28 -330,9 +330,30 @@@ return'setup_migration_create_user' => 'Next: Create User','ldap_settings_link' => 'LDAP Settings Page','slack_test' => 'Test <i class="fab fa-slack"></i> Integration',-+ 'label2_enable' => 'New Label Engine',+ 'label2_enable_help' => 'Switch to the new label engine. <b>Note: You will need to save this setting before setting others.</b>',+ 'label2_template' => 'Template',+ 'label2_template_help' => 'Select which template to use for label generation',+ 'label2_title' => 'Title',+ 'label2_title_help' => 'The title to show on labels that support it',+ 'label2_title_help_phold' => 'The placeholder <code>:company</code> will be replaced with the asset's company name',+ 'label2_asset_logo' => 'Use Asset Logo',+ 'label2_asset_logo_help' => 'Use the logo of the asset's assigned company, rather than the value at <code>:setting_name</code>',+ 'label2_1d_type' => '1D Barcode Type',+ 'label2_1d_type_help' => 'Format for 1D barcodes',+ 'label2_2d_type' => '2D Barcode Type',+ 'label2_2d_type_help' => 'Format for 2D barcodes',+ 'label2_2d_target' => '2D Barcode Target',+ 'label2_2d_target_help' => 'The URL the 2D barcode points to when scanned',+ 'label2_fields' => 'Field Definitions',+ 'label2_fields_help' => 'Fields can be added, removed, and reordered in the left column. For each field, multiple options for Label and DataSource can be added, removed, and reordered in the right column.',-+ 'help_asterisk_bold' => 'Text entered as <code>**text**</code> will be displayed as bold',+ 'help_blank_to_use' => 'Leave blank to use the value from <code>:setting_name</code>',+ 'help_default_will_use' => '<code>:default</code> will use the value from <code>:setting_name</code>',+ 'default' => 'Default',+ 'none' => 'None',+ 'google_callback_help' => 'This should be entered as the callback URL in your Google OAuth app settings in your organization's <strong><a href="https://console.cloud.google.com/" target="_blank">Google developer console <i class="fa fa-external-link" aria-hidden="true"></i></a></strong>.',+ 'google_login' => 'Google Workspace Login Settings',+ 'enable_google_login' => 'Enable users to login with Google Workspace',+ 'enable_google_login_help' => 'Users will not be automatically provisioned. They must have an existing account here AND in Google Workspace, and their username here must match their Google Workspace email address. ',-];diff --cc resources/views/layouts/default.blade.phpindex 5a64054376,d11d3c541f..3dcbfc0ea6--- a/resources/views/layouts/default.blade.php+++ b/resources/views/layouts/default.blade.php@@@ -889,82 -944,79 +944,79 @@@</div></div></div>- </div>- {{-- Javascript files --}}- <script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>- <script defer src="{{ url(mix('js/dist/all-defer.js')) }}" nonce="{{ csrf_token() }}"></script>+ {{-- Javascript files --}}+ <script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>++ <script defer src="{{ url(mix('js/dist/all-defer.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>+ <!-- 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')+ {{-- Page level javascript --}}+ @stack('js')- @section('moar_scripts')- @show+ @section('moar_scripts')+ @show- <script nonce="{{ csrf_token() }}">+ <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,- ignore: 'input[type=hidden]'- });+ // ignore: 'input[type=hidden]' is required here to validate the select2 lists+ $.validate({+ form: '#create-form',+ modules: 'date, toggleDisabled',+ disabledFormFilter: '#create-form',+ showErrorDialogs: true,+ ignore: 'input[type=hidden]'+ });+ $(function () {+ $('[data-tooltip="true"]').tooltip();+ $('[data-toggle="popover"]').popover();+ $('.select2 span').addClass('needsclick');+ $('.select2 span').removeAttr('title');+ // This javascript handles saving the state of the menu (expanded or not)+ $('body').bind('expanded.pushMenu', function () {+ $.ajax({+ type: 'GET',+ url: "{{ route('account.menuprefs', ['state'=>'open']) }}",+ _token: "{{ csrf_token() }}"+ });- $(function () {-- $('[data-toggle="tooltip"]').tooltip();- $('[data-toggle="popover"]').popover();- $('.select2 span').addClass('needsclick');- $('.select2 span').removeAttr('title');+ });- // This javascript handles saving the state of the menu (expanded or not)- $('body').bind('expanded.pushMenu', function() {- $.ajax({- type: 'GET',- url: "{{ route('account.menuprefs', ['state'=>'open']) }}",- _token: "{{ csrf_token() }}"+ $('body').bind('collapsed.pushMenu', function () {+ $.ajax({+ type: 'GET',+ url: "{{ route('account.menuprefs', ['state'=>'close']) }}",+ _token: "{{ csrf_token() }}"+ });});});- $('body').bind('collapsed.pushMenu', function() {- $.ajax({- type: 'GET',- url: "{{ route('account.menuprefs', ['state'=>'close']) }}",- _token: "{{ csrf_token() }}"- });+ // Initiate the ekko lightbox+ $(document).on('click', '[data-toggle="lightbox"]', function (event) {+ event.preventDefault();+ $(this).ekkoLightbox();});- });- // Initiate the ekko lightbox- $(document).on('click', '[data-toggle="lightbox"]', function(event) {- event.preventDefault();- $(this).ekkoLightbox();- });+ </script>+ @if ((Session::get('topsearch')=='true') || (Request::is('/')))+ <script nonce="{{ csrf_token() }}">+ $("#tagSearch").focus();+ </script>+ @endif+ @include('partials.bpay')- </script>-- @if ((Session::get('topsearch')=='true') || (Request::is('/')))- <script nonce="{{ csrf_token() }}">- $("#tagSearch").focus();- </script>- @endif+ @livewireScripts- @livewireScripts-- </body>-+ </body></html>diff --cc resources/views/settings/labels.blade.phpindex 5b398c8d6a,e214ce0f41..ae9bfc3a61--- a/resources/views/settings/labels.blade.php+++ b/resources/views/settings/labels.blade.php@@@ -52,354 -50,148 +52,353 @@@</div></div>- <div class="form-group {{ $errors->has('labels_fontsize') ? 'error' : '' }}">- <div class="col-md-3">- {{ Form::label('labels_fontsize', trans('admin/settings/general.labels_fontsize')) }}- </div>- <div class="col-md-2">- <div class="input-group">- {{ Form::text('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control', 'aria-label'=>'labels_fontsize']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.text_pt') }}</div>+ @if ($setting->label2_enable)+ <!-- New Settings -->++ <!-- Template -->+ <div class="form-group {{ $errors->has('label2_template') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_template', trans('admin/settings/general.label2_template')) }}+ @include('partials.label2-preview')+ </div>+ <div class="col-md-9">+ <table+ data-click-to-select="true"+ data-columns="{{ \App\Presenters\LabelPresenter::dataTableLayout() }}"+ data-cookie="true"+ data-cookie-id-table="label2TemplateTable"+ data-id-table="label2TemplateTable"+ data-pagination="true"+ data-search="true"+ data-select-item-name="label2_template"+ data-id-field="name"+ data-show-columns="true"+ data-show-fullscreen="true"+ data-show-refresh="true"+ data-side-pagination="server"+ data-sort-name="name"+ data-sort-order="asc"+ data-url="{{ route('api.labels.index') }}"+ id="label2TemplateTable"+ class="table table-striped snipe-table"+ ></table>+ <script>+ document.addEventListener('DOMContentLoaded', () => {+ $('#label2TemplateTable').on('load-success.bs.table', (e) => {+ let form = document.getElementById('settingsForm');+ form.dispatchEvent(new Event('change'));+ });+ });+ </script></div></div>- <div class="col-md-9 col-md-offset-3">- {!! $errors->first('labels_fontsize', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}++ <!-- Title -->+ <div class="form-group {{ $errors->has('label2_title') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_title', trans('admin/settings/general.label2_title')) }}+ </div>+ <div class="col-md-9">+ {{ Form::text('label2_title', old('label2_title', $setting->label2_title), [ 'class'=>'form-control', 'placeholder'=>$setting->qr_text, 'aria-label'=>'label2_title' ]) }}+ {!! $errors->first('label2_title', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ <p class="help-block">{!! trans('admin/settings/general.label2_title_help') !!}</p>+ <p class="help-block">+ {!! trans('admin/settings/general.label2_title_help_phold') !!}.<br />+ {!! trans('admin/settings/general.help_asterisk_bold') !!}.<br />+ {!!+ trans('admin/settings/general.help_blank_to_use', [+ 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.qr_text')+ ])+ !!}+ </p>+ </div></div>- </div>- <div class="form-group {{ $errors->has('labels_width') ? 'error' : '' }}">- <div class="col-md-3">- {{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }}+ <!-- Use Asset Logo -->+ <div class="form-group {{ $errors->has('label2_asset_logo') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_asset_logo', trans('admin/settings/general.label2_asset_logo')) }}+ </div>+ <div class="col-md-9">+ {{ Form::checkbox('label2_asset_logo', '1', old('label2_asset_logo', $setting->label2_asset_logo, [ 'class'=>'minimal', 'aria-label'=>'label2_asset_logo' ])) }}+ {{ trans('general.yes') }}+ {!! $errors->first('label2_asset_logo', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ <p class="help-block">{!! trans('admin/settings/general.label2_asset_logo_help', ['setting_name' => trans('admin/settings/general.brand').' > '.trans('admin/settings/general.label_logo')]) !!}</p>+ </div></div>- <div class="col-md-3">- <div class="input-group">- {{ Form::text('labels_width', old('labels_width', $setting->labels_width), ['class' => 'form-control', 'aria-label'=>'labels_width']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>++ <!-- 1D Barcode Type -->+ <div class="form-group{{ $errors->has('label2_1d_type') ? ' has-error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_1d_type', trans('admin/settings/general.label2_1d_type')) }}+ </div>+ <div class="col-md-9">+ @php+ $select1DValues = [+ 'default' => trans('admin/settings/general.default').' [ '.$setting->alt_barcode.' ]',+ 'none' => trans('admin/settings/general.none'),+ 'C128' => 'C128',+ 'C39' => 'C39',+ 'EAN5' => 'EAN5',+ 'EAN13' => 'EAN13',+ 'UPCA' => 'UPCA',+ 'UPCE' => 'UPCE'+ ];+ @endphp+ {{ Form::select('label2_1d_type', $select1DValues, old('label2_1d_type', $setting->label2_1d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_1d_type' ]) }}+ {!! $errors->first('label2_1d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ <p class="help-block">+ {{ trans('admin/settings/general.label2_1d_type_help') }}.+ {!!+ trans('admin/settings/general.help_default_will_use', [+ 'default' => trans('admin/settings/general.default'),+ 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.alt_barcode_type'),+ ])+ !!}+ </p></div></div>- <div class="col-md-3">- <div class="input-group">- {{ Form::text('labels_height', old('labels_height', $setting->labels_height), ['class' => 'form-control', 'aria-label'=>'labels_height']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>++ <!-- 2D Barcode Type -->+ <div class="form-group{{ $errors->has('label2_2d_type') ? ' has-error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_2d_type', trans('admin/settings/general.label2_2d_type')) }}+ </div>+ <div class="col-md-9">+ @php+ $select2DValues = [+ 'default' => trans('admin/settings/general.default').' [ '.$setting->barcode_type.' ]',+ 'none' => trans('admin/settings/general.none'),+ 'QRCODE' => 'QRCODE',+ 'DATAMATRIX' => 'DATAMATRIX',+ 'PDF417' => 'PDF417',+ ];+ @endphp+ {{ Form::select('label2_2d_type', $select2DValues, old('label2_2d_type', $setting->label2_2d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_type' ]) }}+ {!! $errors->first('label2_2d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ <p class="help-block">+ {{ trans('admin/settings/general.label2_2d_type_help', ['current' => $setting->barcode_type]) }}.+ {!!+ trans('admin/settings/general.help_default_will_use', [+ 'default' => trans('admin/settings/general.default'),+ 'setting_name' => trans('admin/settings/general.barcodes').' > '.trans('admin/settings/general.barcode_type'),+ ])+ !!}+ </p></div></div>- <div class="col-md-9 col-md-offset-3">- {!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- {!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}++ <!-- 2D Barcode Target -->+ <div class="form-group{{ $errors->has('label2_2d_target') ? ' has-error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_2d_target', trans('admin/settings/general.label2_2d_target')) }}+ </div>+ <div class="col-md-9">+ {{ Form::select('label2_2d_target', ['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')', 'ht_tag'=>'/ht/{asset_tag}'], old('label2_2d_target', $setting->label2_2d_target), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_target' ]) }}+ {!! $errors->first('label2_2d_target', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ <p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>+ </div></div>- </div>- <div class="form-group {{ $errors->has('labels_display_sgutter') ? 'error' : '' }}">- <div class="col-md-3">- {{ Form::label('labels_display_sgutter', trans('admin/settings/general.label_gutters')) }}- </div>- <div class="col-md-3">- <div class="input-group">- {{ Form::text('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_sgutter']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.horizontal') }}</div>+ <!-- Fields -->+ <div class="form-group {{ $errors->has('label2_fields') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('label2_fields', trans('admin/settings/general.label2_fields')) }}+ </div>+ <div class="col-md-9">+ @include('partials.label2-field-definitions', [ 'name' => 'label2_fields', 'value' => old('label2_fields', $setting->label2_fields) ])+ {!! $errors->first('label2_fields', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ <p class="help-block">{{ trans('admin/settings/general.label2_fields_help') }}</p></div></div>- <div class="col-md-3">- <div class="input-group">- {{ Form::text('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_bgutter']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.vertical') }}</div>++ @include('partials.bootstrap-table')++ @else+ <!-- Hidden version of new settings -->+ {{ Form::hidden('label2_template', old('label2_template', $setting->label2_template)) }}+ {{ Form::hidden('label2_title', old('label2_title', $setting->label2_title)) }}+ {{ Form::hidden('label2_asset_logo', old('label2_asset_logo', $setting->label2_asset_logo)) }}+ {{ Form::hidden('label2_1d_type', old('label2_1d_type', $setting->label2_1d_type)) }}+ {{ Form::hidden('label2_2d_type', old('label2_2d_type', $setting->label2_2d_type)) }}+ {{ Form::hidden('label2_2d_target', old('label2_2d_target', $setting->label2_2d_target)) }}+ {{ Form::hidden('label2_fields', old('label2_fields', $setting->label2_fields)) }}+ @endif++ @if ($setting->label2_enable && ($setting->label2_template != 'DefaultLabel'))+ <!-- Hidden version of legacy settings -->+ {{ Form::hidden('labels_per_page', old('labels_per_page', $setting->labels_per_page)) }}+ {{ Form::hidden('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize)) }}+ {{ Form::hidden('labels_width', old('labels_width', $setting->labels_width)) }}+ {{ Form::hidden('labels_height', old('labels_height', $setting->labels_height)) }}+ {{ Form::hidden('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter)) }}+ {{ Form::hidden('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter)) }}+ {{ Form::hidden('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top)) }}+ {{ Form::hidden('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom)) }}+ {{ Form::hidden('labels_pmargin_left', old('labels_pmargin_left', $setting->labels_pmargin_left)) }}+ {{ Form::hidden('labels_pmargin_right', old('labels_pmargin_right', $setting->labels_pmargin_right)) }}+ {{ Form::hidden('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth)) }}+ {{ Form::hidden('labels_pageheight', old('labels_pageheight', $setting->labels_pageheight)) }}+ {{ Form::hidden('labels_display_name', old('labels_display_name', $setting->labels_display_name)) }}+ {{ Form::hidden('labels_display_serial', old('labels_display_serial', $setting->labels_display_serial)) }}+ {{ Form::hidden('labels_display_tag', old('labels_display_tag', $setting->labels_display_tag)) }}+ {{ Form::hidden('labels_display_model', old('labels_display_model', $setting->labels_display_model)) }}+ {{ Form::hidden('labels_display_company_name', old('labels_display_company_name', $setting->labels_display_company_name)) }}+ @else++ <!-- Legacy settings -->+ <div class="form-group {{ $errors->has('labels_per_page') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_per_page', trans('admin/settings/general.labels_per_page')) }}+ </div>+ <div class="col-md-9">+ {{ Form::text('labels_per_page', old('labels_per_page', $setting->labels_per_page), ['class' => 'form-control','style' => 'width: 100px;', 'aria-label'=>'labels_per_page']) }}+ {!! $errors->first('labels_per_page', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}</div></div>- <div class="col-md-9 col-md-offset-3">- {!! $errors->first('labels_display_sgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- {!! $errors->first('labels_display_bgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}++ <div class="form-group {{ $errors->has('labels_fontsize') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_fontsize', trans('admin/settings/general.labels_fontsize')) }}+ </div>- <div class="col-md-2 form-group">++ <div class="col-md-2">+ <div class="input-group">+ {{ Form::text('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control', 'aria-label'=>'labels_fontsize']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.text_pt') }}</div>+ </div>+ </div>+ <div class="col-md-9 col-md-offset-3">+ {!! $errors->first('labels_fontsize', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ </div></div>- </div>- <div class="form-group {{ $errors->has('labels_pmargin_top') ? 'error' : '' }}">- <div class="col-md-3">- {{ Form::label('labels_pmargin_top', trans('admin/settings/general.page_padding')) }}+ <div class="form-group {{ $errors->has('labels_width') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }}+ </div>- <div class="col-md-3 form-group">++ <div class="col-md-3">+ <div class="input-group">+ {{ Form::text('labels_width', old('labels_width', $setting->labels_width), ['class' => 'form-control', 'aria-label'=>'labels_width']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>+ </div>+ </div>- <div class="col-md-3 form-group" style="margin-left: 10px">++ <div class="col-md-3">+ <div class="input-group">+ {{ Form::text('labels_height', old('labels_height', $setting->labels_height), ['class' => 'form-control', 'aria-label'=>'labels_height']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>+ </div>+ </div>+ <div class="col-md-9 col-md-offset-3">+ {!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ {!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ </div></div>- <div class="col-md-3">- <div class="input-group" style="margin-bottom: 15px;">- {{ Form::text('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_top']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.top') }}</div>++ <div class="form-group {{ $errors->has('labels_display_sgutter') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_display_sgutter', trans('admin/settings/general.label_gutters')) }}+ </div>- <div class="col-md-3 form-group">++ <div class="col-md-3">+ <div class="input-group">+ {{ Form::text('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_sgutter']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.horizontal') }}</div>+ </div>+ </div>- <div class="col-md-3 form-group" style="margin-left: 10px">++ <div class="col-md-3">+ <div class="input-group">+ {{ Form::text('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_bgutter']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.vertical') }}</div>+ </div></div>- <div class="input-group">- {{ Form::text('labels_pmargin_right', old('labels_pmargin_right', $setting->labels_pmargin_right), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_right']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.right') }}</div>+ <div class="col-md-9 col-md-offset-3">+ {!! $errors->first('labels_display_sgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ {!! $errors->first('labels_display_bgutter', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}</div></div>- <div class="col-md-3" style="margin-left: 10px; ">- <div class="input-group" style="margin-bottom: 15px;">- {{ Form::text('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_bottom']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.bottom') }}</div>++ <div class="form-group {{ $errors->has('labels_pmargin_top') ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_pmargin_top', trans('admin/settings/general.page_padding')) }}</div>- <div class="col-md-3 form-group">- <div class="input-group">- {{ Form::text('labels_pmargin_left', old('labels_pmargin_left', $setting->labels_pmargin_left), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_left']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.left') }}</div>++ <div class="col-md-3">+ <div class="input-group" style="margin-bottom: 15px;">+ {{ Form::text('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_top']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.top') }}</div>+ </div>+ <div class="input-group">+ {{ Form::text('labels_pmargin_right', old('labels_pmargin_right', $setting->labels_pmargin_right), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_right']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.right') }}</div>+ </div></div>- <div class="col-md-3 form-group" style="margin-left: 10px; ">++ <div class="col-md-3" style="margin-left: 10px; ">+ <div class="input-group" style="margin-bottom: 15px;">+ {{ Form::text('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_bottom']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.bottom') }}</div>+ </div>+ <div class="input-group">+ {{ Form::text('labels_pmargin_left', old('labels_pmargin_left', $setting->labels_pmargin_left), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_left']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.left') }}</div>+ </div>+ </div>+ <div class="col-md-9 col-md-offset-3">+ {!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ {!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ </div></div>- <div class="col-md-9 col-md-offset-3">- {!! $errors->first('labels_width', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- {!! $errors->first('labels_height', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- </div>- </div>- <div class="form-group {{ (($errors->has('labels_pageheight')) || $errors->has('labels_pagewidth')) ? 'error' : '' }}">- <div class="col-md-3">- {{ Form::label('labels_pagewidth', trans('admin/settings/general.page_dimensions')) }}- </div>- <div class="col-md-3">- <div class="input-group">- {{ Form::text('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control', 'aria-label'=>'labels_pagewidth']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>+ <div class="form-group {{ (($errors->has('labels_pageheight')) || $errors->has('labels_pagewidth')) ? 'error' : '' }}">+ <div class="col-md-3">+ {{ Form::label('labels_pagewidth', trans('admin/settings/general.page_dimensions')) }}</div>- <div class="col-md-3 form-group">- </div>- <div class="col-md-3 form-group" style="margin-left: 10px">- <div class="input-group">- {{ Form::text('labels_pageheight', old('labels_pageheight', $setting->labels_pageheight), ['class' => 'form-control', 'aria-label'=>'labels_pageheight']) }}- <div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>++ <div class="col-md-3">+ <div class="input-group">+ {{ Form::text('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control', 'aria-label'=>'labels_pagewidth']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>+ </div>+ </div>+ <div class="col-md-3 form-group" style="margin-left: 10px">+ <div class="input-group">+ {{ Form::text('labels_pageheight', old('labels_pageheight', $setting->labels_pageheight), ['class' => 'form-control', 'aria-label'=>'labels_pageheight']) }}+ <div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>+ </div>+ </div>+ <div class="col-md-9 col-md-offset-3">+ {!! $errors->first('labels_pagewidth', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}+ {!! $errors->first('labels_pageheight', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}</div></div>- <div class="col-md-9 col-md-offset-3">- {!! $errors->first('labels_pagewidth', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- {!! $errors->first('labels_pageheight', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}- </div>- </div>- <div class="form-group">- <div class="col-md-3">- {{ Form::label('labels_display', trans('admin/settings/general.label_fields')) }}- </div>- <div class="col-md-9">- <label class="form-control">- {{ Form::checkbox('labels_display_name', '1', old('labels_display_name', $setting->labels_display_name),['class' => 'minimal', 'aria-label'=>'labels_display_name']) }}- {{ trans('admin/hardware/form.name') }}- </label>- <label class="form-control">- {{ Form::checkbox('labels_display_serial', '1', old('labels_display_serial', $setting->labels_display_serial),['class' => 'minimal', 'aria-label'=>'labels_display_serial']) }}- {{ trans('admin/hardware/form.serial') }}- </label>- <label class="form-control">- {{ Form::checkbox('labels_display_tag', '1', old('labels_display_tag', $setting->labels_display_tag),['class' => 'minimal', 'aria-label'=>'labels_display_tag']) }}- {{ trans('admin/hardware/form.tag') }}- </label>- <label class="form-control">- {{ Form::checkbox('labels_display_model', '1', old('labels_display_model', $setting->labels_display_model),['class' => 'minimal', 'aria-label'=>'labels_display_model']) }}- {{ trans('admin/hardware/form.model') }}- </label>- <label class="form-control">- {{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}- {{ trans('admin/companies/table.name') }}- </label>-- </div> <!--/.col-md-9-->- </div> <!--/.form-group-->+ <div class="form-group">+ <div class="col-md-3">- {{ Form::label('labels_display', trans('admin/settings/general.label_fields')) }}++ {{ Form::label('labels_display', trans('admin/settings/general.label_fields')) }}+ </div>+ <div class="col-md-9">- <div class="checkbox">- <label for="labels_display_name">++ <label class="form-control">+ {{ Form::checkbox('labels_display_name', '1', old('labels_display_name', $setting->labels_display_name),['class' => 'minimal', 'aria-label'=>'labels_display_name']) }}+ {{ trans('admin/hardware/form.name') }}+ </label>- <label for="labels_display_serial">++ <label class="form-control">+ {{ Form::checkbox('labels_display_serial', '1', old('labels_display_serial', $setting->labels_display_serial),['class' => 'minimal', 'aria-label'=>'labels_display_serial']) }}+ {{ trans('admin/hardware/form.serial') }}+ </label>- <label for="labels_display_tag">++ <label class="form-control">+ {{ Form::checkbox('labels_display_tag', '1', old('labels_display_tag', $setting->labels_display_tag),['class' => 'minimal', 'aria-label'=>'labels_display_tag']) }}+ {{ trans('admin/hardware/form.tag') }}+ </label>- <label for="labels_display_model">++ <label class="form-control">+ {{ Form::checkbox('labels_display_model', '1', old('labels_display_model', $setting->labels_display_model),['class' => 'minimal', 'aria-label'=>'labels_display_model']) }}+ {{ trans('admin/hardware/form.model') }}+ </label>- <label for="labels_display_company_name">++ <label class="form-control">+ {{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}+ {{ trans('admin/companies/table.name') }}+ </label>- </div> <!--/.CHECKBOX-->++ </div> <!--/.col-md-9-->+ </div> <!--/.form-group-->+ @endif</div>diff --cc routes/web.phpindex ca7a5beac2,5de6ef9025..4bc8b3bb58--- a/routes/web.php+++ b/routes/web.php@@@ -40,32 -39,38 +40,41 @@@ Route::group(['middleware' => 'auth'],Route::resource('categories', CategoriesController::class, ['parameters' => ['category' => 'category_id'],]);---+++ /*+ * Labels+ */+ Route::get(+ 'labels/{labelName}',+ [LabelsController::class, 'show']+ )->where('labelName', '.*')->name('labels.show');/*- * Locations- */+ * Locations+ */++ Route::group(['prefix' => 'locations', 'middleware' => ['auth']], function () {++ Route::get('{locationId}/clone',+ [LocationsController::class, 'getClone']+ )->name('clone/location');++ Route::get(+ '{locationId}/printassigned',+ [LocationsController::class, 'print_assigned']+ )->name('locations.print_assigned');++ Route::get(+ '{locationId}/printallassigned',+ [LocationsController::class, 'print_all_assigned']+ )->name('locations.print_all_assigned');+ });+Route::resource('locations', LocationsController::class, ['parameters' => ['location' => 'location_id'],]);- Route::get(- 'locations/{locationId}/printassigned',- [LocationsController::class, 'print_assigned']- )->name('locations.print_assigned');-- Route::get(- 'locations/{locationId}/printallassigned',- [LocationsController::class, 'print_all_assigned']- )->name('locations.print_all_assigned');---/** Manufacturers*/diff --cc routes/web/hardware.phpindex 9f28434107,690d8e0d1c..1643e5794e--- a/routes/web/hardware.php+++ b/routes/web/hardware.php@@@ -182,7 -187,3 +187,7 @@@ Route::resource('hardware''parameters' => ['asset' => 'asset_id'],]);++Route::get('ht/{any?}',+ [AssetsController::class, 'getAssetByTag']- )->where('any', '.*')->name('ht/assetTag');++)->where('any', '.*')->name('ht/assetTag');