Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b6276f281 | |||
| 0715791229 | |||
| 0a0661bf41 | |||
| 6ee939d29b | |||
| c3afbc0e53 | |||
| 38326314ca | |||
| 865950e766 | |||
| d49b67d033 | |||
| 6b63808e34 | |||
| 34dfcb5add | |||
| 30019a144a |
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use League\Csv\Reader;
|
||||
use Symfony\Component\HttpFoundation\File\Exception\FileException;
|
||||
use Artisan;
|
||||
|
||||
class ImportController extends Controller
|
||||
{
|
||||
@@ -94,6 +95,8 @@ class ImportController extends Controller
|
||||
public function process(ItemImportRequest $request, $import_id)
|
||||
{
|
||||
$this->authorize('create', Asset::class);
|
||||
// Run a backup immediately before processing
|
||||
Artisan::call('backup:run');
|
||||
$errors = $request->import(Import::find($import_id));
|
||||
$redirectTo = "hardware.index";
|
||||
switch ($request->get('import-type')) {
|
||||
|
||||
@@ -82,7 +82,7 @@ class AssetModelsController extends Controller
|
||||
$model->manufacturer_id = $request->input('manufacturer_id');
|
||||
$model->category_id = $request->input('category_id');
|
||||
$model->notes = $request->input('notes');
|
||||
$model->user_id = Auth::guard('api')->user();
|
||||
$model->user_id = Auth::id();
|
||||
$model->requestable = Input::has('requestable');
|
||||
|
||||
if ($request->input('custom_fieldset')!='') {
|
||||
|
||||
@@ -338,7 +338,10 @@ class SettingsController extends Controller
|
||||
$setting->email_format = $request->input('email_format');
|
||||
$setting->username_format = $request->input('username_format');
|
||||
$setting->require_accept_signature = $request->input('require_accept_signature');
|
||||
$setting->login_note = $request->input('login_note');
|
||||
if (config('app.lock_passwords')) {
|
||||
$setting->login_note = $request->input('login_note');
|
||||
}
|
||||
|
||||
$setting->default_eula_text = $request->input('default_eula_text');
|
||||
$setting->thumbnail_max_h = $request->input('thumbnail_max_h');
|
||||
|
||||
@@ -992,6 +995,8 @@ class SettingsController extends Controller
|
||||
{
|
||||
if (!config('app.lock_passwords')) {
|
||||
if (Input::get('confirm_purge')=='DELETE') {
|
||||
// Run a backup immediately before processing
|
||||
Artisan::call('backup:run');
|
||||
Artisan::call('snipeit:purge', ['--force'=>'true','--no-interaction'=>true]);
|
||||
$output = Artisan::output();
|
||||
return view('settings/purge')
|
||||
|
||||
@@ -262,11 +262,12 @@ class Asset extends Depreciable
|
||||
return $this->assignedTo();
|
||||
}
|
||||
if ($this->assignedType() == self::USER) {
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
return $this->assignedTo->userLoc();
|
||||
}
|
||||
if (!$this->assignedTo) {
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
|
||||
}
|
||||
return $this->defaultLoc();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ return [
|
||||
base_path('public/uploads'),
|
||||
base_path('config'),
|
||||
base_path('storage/private_uploads'),
|
||||
base_path('storage/oauth-private.key'),
|
||||
base_path('storage/oauth-public.key'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v4.0',
|
||||
'build_version' => '1',
|
||||
'hash_version' => 'g998c4a5',
|
||||
'full_hash' => 'v4.0-1-g998c4a5',
|
||||
'app_version' => 'v4.0.1',
|
||||
'build_version' => '12',
|
||||
'hash_version' => 'g0715791',
|
||||
'full_hash' => 'v4.0.1-12-g0715791',
|
||||
);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="{{ asset('js/plugins/select2/select2.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(asset('js/plugins/select2/select2.min.css')) }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="{{ asset('js/plugins/select2/select2.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(asset('js/plugins/select2/select2.min.css')) }}">
|
||||
|
||||
<!-- iCheck for checkboxes and radio inputs -->
|
||||
<link rel="stylesheet" href="{{ asset('js/plugins/iCheck/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(asset('js/plugins/iCheck/all.css')) }}">
|
||||
|
||||
<!-- bootstrap tables CSS -->
|
||||
<link rel="stylesheet" href="{{ asset('css/bootstrap-table.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(asset('css/bootstrap-table.css')) }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
|
||||
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
|
||||
<link rel="shortcut icon" type="image/ico" href="{{ url(asset('favicon.ico')) }}">
|
||||
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
|
||||
@else
|
||||
<script src="{{ asset('js/html5shiv.js') }}"></script>
|
||||
<script src="{{ asset('js/respond.js') }}"></script>
|
||||
<script src="{{ url(asset('js/html5shiv.js')) }}"></script>
|
||||
<script src="{{ url(asset('js/respond.js')) }}"></script>
|
||||
@endif
|
||||
<![endif]-->
|
||||
</head>
|
||||
@@ -662,7 +662,7 @@
|
||||
|
||||
|
||||
|
||||
<script src="{{ mix('js/dist/all.js') }}"></script>
|
||||
<script src="{{ url(mix('js/dist/all.js')) }}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@show
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ asset(mix('js/dist/all.js')) }}"></script>
|
||||
<script src="{{ url(mix('js/dist/all.js')) }}"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
@@ -165,9 +165,9 @@
|
||||
{{ Form::label('login_note', trans('admin/settings/general.login_note')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
@if (config('app.lock_passwords'))
|
||||
|
||||
<textarea class="form-control" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ Input::old('login_note', $setting->login_note) }}</textarea>
|
||||
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" readonly>{{ Input::old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('login_note', '<span class="alert-msg">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
@else
|
||||
|
||||
Reference in New Issue
Block a user