mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Merge pull request #14499 from Godmartinz/remove_encrpyt_from_labels
Removed encrypted fields from label options
This commit is contained in:
commit
685f1cbfb8
|
@ -14,6 +14,7 @@ use App\Models\Setting;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\View\Label as LabelView;
|
use App\View\Label as LabelView;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class LabelsController extends Controller
|
class LabelsController extends Controller
|
||||||
|
@ -21,9 +22,9 @@ class LabelsController extends Controller
|
||||||
/**
|
/**
|
||||||
* Returns the Label view with test data
|
* Returns the Label view with test data
|
||||||
*
|
*
|
||||||
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
|
* @param string $labelName
|
||||||
* @param string $labelName
|
|
||||||
* @return \Illuminate\Contracts\View\View
|
* @return \Illuminate\Contracts\View\View
|
||||||
|
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
|
||||||
*/
|
*/
|
||||||
public function show(string $labelName)
|
public function show(string $labelName)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +67,7 @@ class LabelsController extends Controller
|
||||||
$exampleAsset->model->category->id = 999999;
|
$exampleAsset->model->category->id = 999999;
|
||||||
$exampleAsset->model->category->name = trans('admin/labels/table.example_category');
|
$exampleAsset->model->category->name = trans('admin/labels/table.example_category');
|
||||||
|
|
||||||
$customFieldColumns = CustomField::all()->pluck('db_column');
|
$customFieldColumns = CustomField::where('field_encrypted', '=', 0)->pluck('db_column');
|
||||||
|
|
||||||
collect(explode(';', Setting::getSettings()->label2_fields))
|
collect(explode(';', Setting::getSettings()->label2_fields))
|
||||||
->filter()
|
->filter()
|
||||||
|
|
|
@ -804,10 +804,9 @@ class SettingsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function getLabels()
|
public function getLabels()
|
||||||
{
|
{
|
||||||
return view('settings.labels', [
|
return view('settings.labels')
|
||||||
'setting' => Setting::getSettings(),
|
->with('setting', Setting::getSettings())
|
||||||
'customFields' => CustomField::all(),
|
->with('customFields', CustomField::where('field_encrypted', '=', 0)->get());
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -351,6 +351,7 @@
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup label="Custom Fields">
|
<optgroup label="Custom Fields">
|
||||||
@foreach($customFields as $customField)
|
@foreach($customFields as $customField)
|
||||||
|
|
||||||
<option value="{{ $customField->db_column }}">{{ $customField->name }}</option>
|
<option value="{{ $customField->db_column }}">{{ $customField->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</optgroup>
|
</optgroup>
|
||||||
|
|
Loading…
Reference in a new issue