Merge branch 'develop' of https://github.com/snipe/snipe-it into develop

This commit is contained in:
snipe 2024-07-18 18:55:18 +01:00
commit 06efcd3c46
84 changed files with 166 additions and 60 deletions

View file

@ -64,6 +64,7 @@ class Helper
'nl' => 'nl-NL', // Dutch
'no' => 'no-NO', // Norwegian
'pl' => 'pl-PL', // Polish
'pt' => 'pt-PT', // Portuguese
'ro' => 'ro-RO', // Romanian
'ru' => 'ru-RU', // Russian
'sk' => 'sk-SK', // Slovak
@ -1440,7 +1441,6 @@ class Helper
foreach (self::$language_map as $legacy => $new) {
if ($language_code == $legacy) {
Log::debug('Current language is '.$legacy.', using '.$new.' instead');
return $new;
}
}
@ -1451,6 +1451,7 @@ class Helper
public static function mapBackToLegacyLocale($new_locale = null)
{
if (strlen($new_locale) <= 4) {
return $new_locale; //"new locale" apparently wasn't quite so new
}
@ -1458,12 +1459,21 @@ class Helper
// This does a *reverse* search against our new language map array - given the value, find the *key* for it
$legacy_locale = array_search($new_locale, self::$language_map);
if($legacy_locale !== false) {
if ($legacy_locale !== false) {
return $legacy_locale;
}
return $new_locale; // better that you have some weird locale that doesn't fit into our mappings anywhere than 'void'
}
public static function determineLanguageDirection() {
return in_array(app()->getLocale(),
[
'ar-SA',
'fa-IR',
'he-IL'
]) ? 'rtl' : 'ltr';
}
static public function getRedirectOption($request, $id, $table, $asset_id = null)
{

View file

@ -211,7 +211,7 @@ class CustomFieldsetsController extends Controller
return redirect()->route('fieldsets.show', [$id])->with('success', trans('admin/custom_fields/message.field.create.assoc_success'));
}
return redirect()->route('fieldsets.show', [$id])->with('error', 'No field selected.');
return redirect()->route('fieldsets.show', [$id])->with('error', trans('admin/custom_fields/message.field.none_selected'));
}
/**

View file

@ -94,14 +94,14 @@ class LicenseCheckoutController extends Controller
if (! $licenseSeat) {
if ($seatId) {
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'This Seat is not available for checkout.'));
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.unavailable')));
}
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'There are no available seats for this license.'));
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats')));
}
if (! $licenseSeat->license->is($license)) {
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'The license seat provided does not match the license.'));
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.mismatch')));
}
return $licenseSeat;

View file

@ -256,7 +256,7 @@ class ActionlogsTransformer
$clean_meta['rtd_location_id']['old'] = $clean_meta['rtd_location_id']['old'] ? "[id: ".$clean_meta['rtd_location_id']['old']."] ". $oldRtdName : '';
$clean_meta['rtd_location_id']['new'] = $clean_meta['rtd_location_id']['new'] ? "[id: ".$clean_meta['rtd_location_id']['new']."] ". $newRtdName : '';
$clean_meta['Default Location'] = $clean_meta['rtd_location_id'];
$clean_meta[trans('admin/hardware/form.default_location')] = $clean_meta['rtd_location_id'];
unset($clean_meta['rtd_location_id']);
}
@ -272,7 +272,7 @@ class ActionlogsTransformer
$clean_meta['location_id']['old'] = $clean_meta['location_id']['old'] ? "[id: ".$clean_meta['location_id']['old']."] ". $oldLocationName : '';
$clean_meta['location_id']['new'] = $clean_meta['location_id']['new'] ? "[id: ".$clean_meta['location_id']['new']."] ". $newLocationName : '';
$clean_meta['Current Location'] = $clean_meta['location_id'];
$clean_meta[trans('admin/locations/message.current_location')] = $clean_meta['location_id'];
unset($clean_meta['location_id']);
}
@ -287,7 +287,7 @@ class ActionlogsTransformer
$clean_meta['model_id']['old'] = "[id: ".$clean_meta['model_id']['old']."] ".$oldModelName;
$clean_meta['model_id']['new'] = "[id: ".$clean_meta['model_id']['new']."] ".$newModelName; /** model is required at asset creation */
$clean_meta['Model'] = $clean_meta['model_id'];
$clean_meta[trans('admin/hardware/form.model')] = $clean_meta['model_id'];
unset($clean_meta['model_id']);
}
if(array_key_exists('company_id', $clean_meta)) {
@ -300,7 +300,7 @@ class ActionlogsTransformer
$clean_meta['company_id']['old'] = $clean_meta['company_id']['old'] ? "[id: ".$clean_meta['company_id']['old']."] ". $oldCompanyName : trans('general.unassigned');
$clean_meta['company_id']['new'] = $clean_meta['company_id']['new'] ? "[id: ".$clean_meta['company_id']['new']."] ". $newCompanyName : trans('general.unassigned');
$clean_meta['Company'] = $clean_meta['company_id'];
$clean_meta[trans('general.company')] = $clean_meta['company_id'];
unset($clean_meta['company_id']);
}
if(array_key_exists('supplier_id', $clean_meta)) {
@ -313,7 +313,7 @@ class ActionlogsTransformer
$clean_meta['supplier_id']['old'] = $clean_meta['supplier_id']['old'] ? "[id: ".$clean_meta['supplier_id']['old']."] ". $oldSupplierName : trans('general.unassigned');
$clean_meta['supplier_id']['new'] = $clean_meta['supplier_id']['new'] ? "[id: ".$clean_meta['supplier_id']['new']."] ". $newSupplierName : trans('general.unassigned');
$clean_meta['Supplier'] = $clean_meta['supplier_id'];
$clean_meta[trans('general.supplier')] = $clean_meta['supplier_id'];
unset($clean_meta['supplier_id']);
}
if(array_key_exists('status_id', $clean_meta)) {
@ -326,11 +326,11 @@ class ActionlogsTransformer
$clean_meta['status_id']['old'] = $clean_meta['status_id']['old'] ? "[id: ".$clean_meta['status_id']['old']."] ". $oldStatusName : trans('general.unassigned');
$clean_meta['status_id']['new'] = $clean_meta['status_id']['new'] ? "[id: ".$clean_meta['status_id']['new']."] ". $newStatusName : trans('general.unassigned');
$clean_meta['Status'] = $clean_meta['status_id'];
$clean_meta[trans('general.status_label')] = $clean_meta['status_id'];
unset($clean_meta['status_id']);
}
if(array_key_exists('asset_eol_date', $clean_meta)) {
$clean_meta['EOL date'] = $clean_meta['asset_eol_date'];
$clean_meta[trans('admin/hardware/form.eol_date')] = $clean_meta['asset_eol_date'];
unset($clean_meta['asset_eol_date']);
}

View file

@ -51,7 +51,7 @@ class LicenseSeatsTransformer
];
if ($seat_count != 0) {
$array['name'] = 'Seat '.$seat_count;
$array['name'] = trans('admin/licenses/general.seat_count', ['count' => $seat_count]);
}
$permissions_array['available_actions'] = [

Binary file not shown.

BIN
public/js/dist/all.js vendored

Binary file not shown.

BIN
public/js/select2/i18n/af.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ar.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/az.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/bg.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/bn.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/bs.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/select2/i18n/ca.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/cs.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/da.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/de.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/dsb.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/el.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/en.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/es.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/et.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/eu.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/fa.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/fi.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/fr.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/gl.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/he.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/hi.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/hr.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/hsb.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/hu.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/hy.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/id.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/is.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/it.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ja.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ka.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/km.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ko.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/lt.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/lv.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/mk.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ms.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/nb.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ne.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/nl.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/pl.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ps.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/pt-BR.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/pt.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ro.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/ru.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sk.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sl.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sq.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sr-Cyrl.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sr.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/sv.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/th.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/tk.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/tr.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/uk.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/vi.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/zh-CN.js vendored Normal file

Binary file not shown.

BIN
public/js/select2/i18n/zh-TW.js vendored Normal file

Binary file not shown.

View file

@ -1,5 +1,5 @@
{
"/js/build/app.js": "/js/build/app.js?id=d47043e03f80612693d9b9034d94e28f",
"/js/build/app.js": "/js/build/app.js?id=842cc33168d973ac10d35eb664be2a2c",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=44bf834f2110504a793dadec132a5898",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
"/css/build/overrides.css": "/css/build/overrides.css?id=004835e70ed3ae2e2340162b7a37c752",
@ -21,6 +21,66 @@
"/css/dist/all.css": "/css/dist/all.css?id=0f9956c66f93c6417f69f0134c6ae128",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",
"/js/select2/i18n/ar.js": "/js/select2/i18n/ar.js?id=65aa8e36bf5da57ff4e3f22a835ab035",
"/js/select2/i18n/az.js": "/js/select2/i18n/az.js?id=270c257daf8140a0cf23ad5de6f8ed1b",
"/js/select2/i18n/bg.js": "/js/select2/i18n/bg.js?id=39b8be30d4f06779839cfaaa415d0690",
"/js/select2/i18n/bn.js": "/js/select2/i18n/bn.js?id=6d42b4dd5665d0fa28f06994eedb4899",
"/js/select2/i18n/bs.js": "/js/select2/i18n/bs.js?id=91624382358e95086b80f00fa0bd6955",
"/js/select2/i18n/build.txt": "/js/select2/i18n/build.txt?id=c9fb9399ed170dfbc76c0d3b26267c1f",
"/js/select2/i18n/ca.js": "/js/select2/i18n/ca.js?id=a166b745933a48ce3d0580a74210617d",
"/js/select2/i18n/cs.js": "/js/select2/i18n/cs.js?id=4f43e8e7d33aa1e6aadf3286c7e379e9",
"/js/select2/i18n/da.js": "/js/select2/i18n/da.js?id=766346afe4dd72c003242cfb1cbe2617",
"/js/select2/i18n/de.js": "/js/select2/i18n/de.js?id=8a1c222b0204c8faaf6d3c07c961d8aa",
"/js/select2/i18n/dsb.js": "/js/select2/i18n/dsb.js?id=56372c92d2f1bcb2b8e382981dca0546",
"/js/select2/i18n/el.js": "/js/select2/i18n/el.js?id=27097f071856a0f4e82298fe407d1eac",
"/js/select2/i18n/en.js": "/js/select2/i18n/en.js?id=cf932ba09a98fe11bde8e1f3dd5e2cfa",
"/js/select2/i18n/es.js": "/js/select2/i18n/es.js?id=66dbc2652fb1b769bf29058e707b43c8",
"/js/select2/i18n/et.js": "/js/select2/i18n/et.js?id=2b96fd98289dc3fc5e61f21e6e1a7d52",
"/js/select2/i18n/eu.js": "/js/select2/i18n/eu.js?id=adfe5c97b72c20bb0afbc0968b440e50",
"/js/select2/i18n/fa.js": "/js/select2/i18n/fa.js?id=3b5bd1961cfd0a6f96ac4cd2ea16c243",
"/js/select2/i18n/fi.js": "/js/select2/i18n/fi.js?id=614ec42aa9baaf687ab9ff44705dfd2e",
"/js/select2/i18n/fr.js": "/js/select2/i18n/fr.js?id=05e0542fcfe6df5ab074a377dc1a5a9b",
"/js/select2/i18n/gl.js": "/js/select2/i18n/gl.js?id=d99b1fedaa86d011818cfbab11dd355c",
"/js/select2/i18n/he.js": "/js/select2/i18n/he.js?id=e420ff6cd3ed77ab9271c9b3d441442c",
"/js/select2/i18n/hi.js": "/js/select2/i18n/hi.js?id=70640d41628f36284af78b22ea8b283b",
"/js/select2/i18n/hr.js": "/js/select2/i18n/hr.js?id=a2b092cc1147f07b978145d407c67fa1",
"/js/select2/i18n/hsb.js": "/js/select2/i18n/hsb.js?id=fa3b55265efe8f4182d5e65a1a506252",
"/js/select2/i18n/hu.js": "/js/select2/i18n/hu.js?id=6ec6039cb8a354e2bc6a1794f729caae",
"/js/select2/i18n/hy.js": "/js/select2/i18n/hy.js?id=c7babaeef5a625566434ea79b19d4c7e",
"/js/select2/i18n/id.js": "/js/select2/i18n/id.js?id=04debded514d3962bb74f05532e793d4",
"/js/select2/i18n/is.js": "/js/select2/i18n/is.js?id=3ddd9a6a97e93e1910210c9eefc1bca1",
"/js/select2/i18n/it.js": "/js/select2/i18n/it.js?id=be4fe8d365b5916432504d1f98e2e0af",
"/js/select2/i18n/ja.js": "/js/select2/i18n/ja.js?id=170ae885d74f1634271e1eb470cb4621",
"/js/select2/i18n/ka.js": "/js/select2/i18n/ka.js?id=2083264a54f0873f55468affa796d61e",
"/js/select2/i18n/km.js": "/js/select2/i18n/km.js?id=c23089cb06ca871153ba9bfe8458a378",
"/js/select2/i18n/ko.js": "/js/select2/i18n/ko.js?id=e7be6c20e67393698a0f05971e9720c1",
"/js/select2/i18n/lt.js": "/js/select2/i18n/lt.js?id=23c7ce903300fc118947994b9cdd16cb",
"/js/select2/i18n/lv.js": "/js/select2/i18n/lv.js?id=08e62128eac1d0e8ac32cfaf75f2ec9f",
"/js/select2/i18n/mk.js": "/js/select2/i18n/mk.js?id=dabbb90871300ce3a295969bc0260420",
"/js/select2/i18n/ms.js": "/js/select2/i18n/ms.js?id=4ba82c9a51ce975fe0e4eff5f6eece65",
"/js/select2/i18n/nb.js": "/js/select2/i18n/nb.js?id=da2fce143f2794208e36dc8520e4c36a",
"/js/select2/i18n/ne.js": "/js/select2/i18n/ne.js?id=3d79fd3f08dbfd0973cf91dd6a62bccd",
"/js/select2/i18n/nl.js": "/js/select2/i18n/nl.js?id=997868a37ed89062ad7b19c9a88f1bb0",
"/js/select2/i18n/pl.js": "/js/select2/i18n/pl.js?id=6031b4f164521f58dfec7d1e46238861",
"/js/select2/i18n/ps.js": "/js/select2/i18n/ps.js?id=38dfa47af9e086eece5a333d711abc79",
"/js/select2/i18n/pt-BR.js": "/js/select2/i18n/pt-BR.js?id=e1b294433e7fc3175842ce37b9f15014",
"/js/select2/i18n/pt.js": "/js/select2/i18n/pt.js?id=33b4a3b44d437614b83497e36c138ca9",
"/js/select2/i18n/ro.js": "/js/select2/i18n/ro.js?id=f75cb460ec3b98b4b9017e9513ca20cf",
"/js/select2/i18n/ru.js": "/js/select2/i18n/ru.js?id=934aa95f5b5f32c72c80857bb2622074",
"/js/select2/i18n/sk.js": "/js/select2/i18n/sk.js?id=33d02cef8d110f358acd1624f7f79ffe",
"/js/select2/i18n/sl.js": "/js/select2/i18n/sl.js?id=131a78bc075237a13750ead3807683d2",
"/js/select2/i18n/sq.js": "/js/select2/i18n/sq.js?id=5636b60d29c9bdd55f18a4585746b6d1",
"/js/select2/i18n/sr-Cyrl.js": "/js/select2/i18n/sr-Cyrl.js?id=f254bb8c4c7ce00d9d17e9e91945ad9b",
"/js/select2/i18n/sr.js": "/js/select2/i18n/sr.js?id=5ed85a48f483d17a7ad102832cb11ea1",
"/js/select2/i18n/sv.js": "/js/select2/i18n/sv.js?id=7a9c2f71e7779a263b2cf3520b1aa611",
"/js/select2/i18n/th.js": "/js/select2/i18n/th.js?id=f38c20b0221b68924d6c8f0773cb252d",
"/js/select2/i18n/tk.js": "/js/select2/i18n/tk.js?id=7c572a68c78fb798f11f7d8c78ebb9d6",
"/js/select2/i18n/tr.js": "/js/select2/i18n/tr.js?id=b5a0643d1545f4a3e1622e65e46ddc7c",
"/js/select2/i18n/uk.js": "/js/select2/i18n/uk.js?id=8cede7f4803c7dbd1e8261bfa1932b7c",
"/js/select2/i18n/vi.js": "/js/select2/i18n/vi.js?id=097a5b75b3e146e2d94ab8e1510be607",
"/js/select2/i18n/zh-CN.js": "/js/select2/i18n/zh-CN.js?id=2cff662ec5f972b4613566cf5988cda2",
"/js/select2/i18n/zh-TW.js": "/js/select2/i18n/zh-TW.js?id=04554a227c2ba0f3bb6ca3d2e01e5440",
"/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=0141634c24336be626e05c8b77d1fa27",
"/css/webfonts/fa-brands-400.woff2": "/css/webfonts/fa-brands-400.woff2?id=b3cf7a6dd618bd392f3ddcc61343a463",
"/css/webfonts/fa-regular-400.ttf": "/css/webfonts/fa-regular-400.ttf?id=9cf69d99de9d83f82466a647f5cb1f94",
@ -33,7 +93,7 @@
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=5f79123a6750afd34dbf565faec3dda3",
"/js/build/vendor.js": "/js/build/vendor.js?id=e27070bdbc5fce3bfd132b952d641fd6",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=e5918703a22f8992c4c98f1dbbecb8f7",
"/js/dist/all.js": "/js/dist/all.js?id=a12331d6be1bd143c3d24719ba56ff3f",
"/js/dist/all.js": "/js/dist/all.js?id=01108f9d8f4f67b20669f0c25a64eb5d",
"/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=553ee68741b5a392037abcf04da80adc",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",

View file

@ -219,6 +219,8 @@ $(document).ready(function () {
*/
placeholder: '',
allowClear: true,
language: $('meta[name="language"]').attr('content'),
dir: $('meta[name="language-direction"]').attr('content'),
ajax: {

View file

@ -5,6 +5,7 @@ return array(
'field' => array(
'invalid' => 'That field does not exist.',
'already_added' => 'Field already added',
'none_selected' => 'No field selected',
'create' => array(
'error' => 'Field was not created, please try again.',

View file

@ -2,8 +2,7 @@
return [
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable.
If this status has changed, please update the asset status.',
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable. If this status has changed, please update the asset status.',
'does_not_exist' => 'Asset does not exist.',
'does_not_exist_var'=> 'Asset with tag :asset_tag not found.',
'no_tag' => 'No asset tag provided.',
@ -52,6 +51,7 @@ return [
],
'import' => [
'import_button' => 'Process Import',
'error' => 'Some items did not import correctly.',
'errorDetail' => 'The following Items were not imported because of errors.',
'success' => 'Your file has been imported',

View file

@ -14,6 +14,7 @@ return array(
'info' => 'License Info',
'license_seats' => 'License Seats',
'seat' => 'Seat',
'seat_count' => 'Seat :count',
'seats' => 'Seats',
'software_licenses' => 'Software Licenses',
'user' => 'User',
@ -23,12 +24,12 @@ return array(
[
'checkin_all' => [
'button' => 'Checkin All Seats',
'modal' => 'This will action checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.',
'modal' => 'This action will checkin one seat. | This action will checkin all :checkedout_seats_count seats for this license.',
'enabled_tooltip' => 'Checkin ALL seats for this license from both users and assets',
'disabled_tooltip' => 'This is disabled because there are no seats currently checked out',
'disabled_tooltip_reassignable' => 'This is disabled because the License is not reassignable',
'success' => 'License successfully checked in! | All licenses were successfully checked in!',
'log_msg' => 'Checked in via bulk license checkout in license GUI',
'log_msg' => 'Checked in via bulk license checkin in license GUI',
],
'checkout_all' => [

View file

@ -44,6 +44,8 @@ return array(
'error' => 'There was an issue checking out the license. Please try again.',
'success' => 'The license was checked out successfully',
'not_enough_seats' => 'Not enough license seats available for checkout',
'mismatch' => 'The license seat provided does not match the license',
'unavailable' => 'This seat is not available for checkout.',
),
'checkin' => array(

View file

@ -94,7 +94,7 @@ return [
'ldap_login_sync_help' => 'This only tests that LDAP can sync correctly. If your LDAP Authentication query is not correct, users may still not be able to login. YOU MUST SAVE YOUR UPDATED LDAP SETTINGS FIRST.',
'ldap_manager' => 'LDAP Manager',
'ldap_server' => 'LDAP Server',
'ldap_server_help' => 'This should start with ldap:// (for unencrypted or TLS) or ldaps:// (for SSL)',
'ldap_server_help' => 'This should start with ldap:// (for unencrypted) or ldaps:// (for TLS or SSL)',
'ldap_server_cert' => 'LDAP SSL certificate validation',
'ldap_server_cert_ignore' => 'Allow invalid SSL Certificate',
'ldap_server_cert_help' => 'Select this checkbox if you are using a self signed SSL cert and would like to accept an invalid SSL certificate.',

View file

@ -556,5 +556,6 @@ return [
'something_went_wrong' => 'Something went wrong with your request.',
'close' => 'Close',
'expires' => 'Expires',
'map_fields'=> 'Map :item_type Field',
];

View file

@ -218,8 +218,16 @@ return [
/*
|--------------------------------------------------------------------------
| Generic Validation Messages
| Generic Validation Messages - we use these in the jquery validation where we don't have
| access to the :attribute
|--------------------------------------------------------------------------
*/
'generic' => [
'invalid_value_in_field' => 'Invalid value included in this field',
'required' => 'This field is required',
'email' => 'Please enter a valid email address',
],
];

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr' }}">
dir="{{ Helper::determineLanguageDirection() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -24,6 +24,8 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr'
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="language" content="{{ Helper::mapBackToLegacyLocale(app()->getLocale()) }}">
<meta name="language-direction" content="{{ Helper::determineLanguageDirection() }}">
<meta name="baseUrl" content="{{ config('app.url') }}/">
<script nonce="{{ csrf_token() }}">
@ -947,8 +949,11 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr'
</div>
</div>
{{-- Javascript files --}}
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
<script src="{{ url('js/select2/i18n/'.Helper::mapBackToLegacyLocale(app()->getLocale()).'.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>
@ -974,7 +979,7 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr'
});
// Reference: https://jqueryvalidation.org/validate/
$('#create-form').validate({
var validator = $('#create-form').validate({
ignore: 'input[type=hidden]',
errorClass: 'alert-msg',
errorElement: 'span',
@ -992,6 +997,12 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr'
onfocusout: function(element) {
return $(element).valid();
},
});
$.extend($.validator.messages, {
required: "{{ trans('validation.generic.required') }}",
email: "{{ trans('validation.generic.email') }}"
});

View file

@ -11,30 +11,30 @@
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license'])
<!-- Serial-->
@can('viewKeys', $item)
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
<label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
<textarea class="form-control" type="text" name="serial" id="serial">{{ old('serial', $item->serial) }}</textarea>
{!! $errors->first('serial', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@endcan
<!-- Seats -->
<div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
<label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}</label>
<div class="col-md-7 col-sm-12 required">
<div class="col-md-2" style="padding-left:0px">
<input class="form-control" type="text" name="seats" id="seats" value="{{ old('seats', $item->seats) }}" />
<div class="col-md-12" style="padding-left:0px">
<input class="form-control" type="text" name="seats" id="seats" value="{{ old('seats', $item->seats) }}" minlength="1" required style="width: 97px;">
</div>
</div>
{!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
@include ('partials.forms.edit.minimum_quantity')
<!-- Serial-->
@can('viewKeys', $item)
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
<label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
<textarea class="form-control" type="text" name="serial" id="serial">{{ old('serial', $item->serial) }}</textarea>
{!! $errors->first('serial', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@endcan
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id',])
@ -51,7 +51,7 @@
<div class="form-group {{ $errors->has('license_email') ? ' has-error' : '' }}">
<label for="license_email" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_email') }}</label>
<div class="col-md-7">
<input class="form-control" type="text" name="license_email" id="license_email" value="{{ old('license_email', $item->license_email) }}" />
<input class="form-control" type="email" name="license_email" id="license_email" value="{{ old('license_email', $item->license_email) }}" />
{!! $errors->first('license_email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

View file

@ -75,7 +75,7 @@
</div>
@endif
<div class="col-md-2 col-sm-5 col-xs-12 text-right pull-right">
<div class="col-md-4 col-sm-5 col-xs-12 text-right pull-right">
<!-- The fileinput-button span is used to style the file input field as button -->
@if (!config('app.lock_passwords'))
@ -198,7 +198,11 @@
@if ($activeFile->import_type)
<div class="form-group col-md-12">
<hr style="border-top: 1px solid lightgray">
<h3><i class="{{ Helper::iconTypeByItem($activeFile->import_type) }}"></i> Map {{ ucwords($activeFile->import_type) }} Import Fields</h3>
<h3>
<i class="{{ Helper::iconTypeByItem($activeFile->import_type) }}">
</i>
{{ trans('general.map_fields', ['item_type' => ucwords($activeFile->import_type)]) }}
</h3>
<hr style="border-top: 1px solid lightgray">
</div>
<div class="form-group col-md-12">
@ -254,7 +258,7 @@
<a href="#" wire:click.prevent="$set('activeFile',null)">{{ trans('general.cancel') }}</a>
</div>
<div class="col-md-9">
<button type="submit" class="btn btn-primary col-md-5" id="import">Import</button>
<button type="submit" class="btn btn-primary col-md-5" id="import">{{ trans('admin/hardware/message.import.import_button') }}</button>
<br><br>
</div>
</div>

View file

@ -106,9 +106,9 @@
{{ trans('general.location') }}
</label>
<label class="form-control">
<label class="form-control" style="margin-left: 25px;">
{{ Form::checkbox('location_address', '1', '1') }}
- {{ trans('general.address') }}
{{ trans('general.address') }}
</label>
<label class="form-control">
@ -116,9 +116,9 @@
{{ trans('admin/hardware/form.default_location') }}
</label>
<label class="form-control">
<label class="form-control" style="margin-left: 25px;">
{{ Form::checkbox('rtd_location_address', '1', '1') }}
- {{ trans('general.address') }}
{{ trans('general.address') }}
</label>
<label class="form-control">
@ -181,9 +181,9 @@
{{ trans('general.notes') }}
</label>
<label class="form-control">
<label class="form-control" style="margin-left: 25px;">
{{ Form::checkbox('url', '1', '1') }}
- {{ trans('general.url') }}
{{ trans('general.url') }}
</label>
@ -298,10 +298,10 @@
<!-- Purchase Date -->
<div class="form-group purchase-range{{ ($errors->has('purchase_start') || $errors->has('purchase_end')) ? ' has-error' : '' }}">
<label for="purchase_start" class="col-md-3 control-label">{{ trans('general.purchase_date') }} {{ trans('general.range') }}</label>
<label for="purchase_start" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="purchase_start" aria-label="purchase_start" value="{{ old('purchase_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="purchase_end" aria-label="purchase_end" value="{{ old('purchase_end') }}">
</div>
@ -316,10 +316,10 @@
<!-- Created Date -->
<div class="form-group purchase-range{{ ($errors->has('created_start') || $errors->has('created_end')) ? ' has-error' : '' }}">
<label for="created_start" class="col-md-3 control-label">{{ trans('general.created_at') }} {{ trans('general.range') }}</label>
<label for="created_start" class="col-md-3 control-label">{{ trans('general.created_at') }} </label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="created_start" aria-label="created_start" value="{{ old('created_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="created_end" aria-label="created_end" value="{{ old('created_end') }}">
</div>
@ -333,10 +333,10 @@
<!-- Checkout Date -->
<div class="form-group checkout-range{{ ($errors->has('checkout_date_start') || $errors->has('checkout_date_end')) ? ' has-error' : '' }}">
<label for="checkout_date" class="col-md-3 control-label">{{ trans('general.checkout') }} {{ trans('general.range') }}</label>
<label for="checkout_date" class="col-md-3 control-label">{{ trans('general.checkout') }} </label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="checkout_date_start" aria-label="checkout_date_start" value="{{ old('checkout_date_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="checkout_date_end" aria-label="checkout_date_end" value="{{ old('checkout_date_end') }}">
</div>
@ -371,7 +371,7 @@
<label for="expected_checkin_start" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="expected_checkin_start" aria-label="expected_checkin_start" value="{{ old('expected_checkin_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="expected_checkin_end" aria-label="expected_checkin_end" value="{{ old('expected_checkin_end') }}">
</div>
@ -389,7 +389,7 @@
<label for="last_audit_start" class="col-md-3 control-label">{{ trans('general.last_audit') }}</label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="last_audit_start" aria-label="last_audit_start" value="{{ old('last_audit_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="last_audit_end" aria-label="last_audit_end" value="{{ old('last_audit_end') }}">
</div>
@ -406,7 +406,7 @@
<label for="next_audit_start" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
<div class="input-daterange input-group col-md-7" id="datepicker">
<input type="text" class="form-control" name="next_audit_start" aria-label="next_audit_start" value="{{ old('next_audit_start') }}">
<span class="input-group-addon">to</span>
<span class="input-group-addon">{{ strtolower(trans('general.to')) }}</span>
<input type="text" class="form-control" name="next_audit_end" aria-label="next_audit_end" value="{{ old('next_audit_end') }}">
</div>

View file

@ -106,7 +106,7 @@
</label>
@if ($errors->has('pwd_secure_complexity.*'))
<span class="alert-msg">{{ trans('validation.invalid_value_in_field') }}</span>
<span class="alert-msg">{{ trans('validation.generic.invalid_value_in_field') }}</span>
@endif
<p class="help-block">
{{ trans('admin/settings/general.pwd_secure_complexity_help') }}

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\Department\Api;
namespace Tests\Feature\Departments\Api;
use App\Models\AssetModel;
use App\Models\Department;

View file

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\AssetModels\Ui;
namespace Tests\Feature\Locations\Ui;
use App\Models\User;
use Tests\TestCase;

View file

@ -40,7 +40,13 @@ mix
.minify("./public/css/dist/signature-pad.css");
/**
* Copy, minify and version signature-pad.css
* Copy and version select2
*/
mix
.copy("./node_modules/select2/dist/js/i18n", "./public/js/select2/i18n")
/**
* Copy and version fontawesome
*/
mix
.copy("./node_modules/@fortawesome/fontawesome-free/webfonts", "./public/css/webfonts")