From 7974c172fdae15e86e12d3011d7545727f6ca981 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 26 Apr 2023 16:48:38 -0700 Subject: [PATCH] =?UTF-8?q?Switch=20back=20to=20=E2=80=9Cnormal=E2=80=9D?= =?UTF-8?q?=20url=20for=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- app/Models/Manufacturer.php | 2 +- app/Presenters/AssetPresenter.php | 2 +- resources/views/hardware/view.blade.php | 2 +- resources/views/manufacturers/edit.blade.php | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Models/Manufacturer.php b/app/Models/Manufacturer.php index 4f11708248..eb91b3b8f2 100755 --- a/app/Models/Manufacturer.php +++ b/app/Models/Manufacturer.php @@ -24,7 +24,7 @@ class Manufacturer extends SnipeModel 'name' => 'required|min:2|max:255|unique:manufacturers,name,NULL,id,deleted_at,NULL', 'url' => 'url|nullable', 'support_email' => 'email|nullable', - 'support_url' => 'starts_with:http://,https://,afp://,facetime://,file://,irc://','nullable', + 'support_url' => 'nullable|url', 'warranty_lookup_url' => 'starts_with:http://,https://,afp://,facetime://,file://,irc://','nullable' ]; diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index ef8ae632a6..ce476d082c 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -538,7 +538,7 @@ class AssetPresenter extends Presenter * Used to take user created warranty URL and dynamically fill in the needed values per asset * @return string */ - public function dynamicVariableUrl() + public function dynamicWarrantyUrl() { $warranty_lookup_url = $this->model->model->manufacturer->warranty_lookup_url; $url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale,$warranty_lookup_url)); diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 673488960c..e29c9da3af 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -596,7 +596,7 @@ {{ trans('admin/hardware/form.months') }} @if (($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!='')) - + {{ trans('hardware/general.mfg_warranty_lookup') }} @endif diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 01d7c696d6..6e87344053 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -26,7 +26,6 @@
-

{!! trans('admin/manufacturers/message.support_url_help') !!}

{!! $errors->first('support_url', '') !!}