mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Switch back to “normal” url for support
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
54a766c4f9
commit
7974c172fd
|
@ -24,7 +24,7 @@ class Manufacturer extends SnipeModel
|
||||||
'name' => 'required|min:2|max:255|unique:manufacturers,name,NULL,id,deleted_at,NULL',
|
'name' => 'required|min:2|max:255|unique:manufacturers,name,NULL,id,deleted_at,NULL',
|
||||||
'url' => 'url|nullable',
|
'url' => 'url|nullable',
|
||||||
'support_email' => 'email|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'
|
'warranty_lookup_url' => 'starts_with:http://,https://,afp://,facetime://,file://,irc://','nullable'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -538,7 +538,7 @@ class AssetPresenter extends Presenter
|
||||||
* Used to take user created warranty URL and dynamically fill in the needed values per asset
|
* Used to take user created warranty URL and dynamically fill in the needed values per asset
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function dynamicVariableUrl()
|
public function dynamicWarrantyUrl()
|
||||||
{
|
{
|
||||||
$warranty_lookup_url = $this->model->model->manufacturer->warranty_lookup_url;
|
$warranty_lookup_url = $this->model->model->manufacturer->warranty_lookup_url;
|
||||||
$url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale,$warranty_lookup_url));
|
$url = (str_replace('{LOCALE}',\App\Models\Setting::getSettings()->locale,$warranty_lookup_url));
|
||||||
|
|
|
@ -596,7 +596,7 @@
|
||||||
{{ trans('admin/hardware/form.months') }}
|
{{ trans('admin/hardware/form.months') }}
|
||||||
|
|
||||||
@if (($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!=''))
|
@if (($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!=''))
|
||||||
<a href="{{ $asset->present()->dynamicVariableUrl() }}" target="_blank">
|
<a href="{{ $asset->present()->dynamicWarrantyUrl() }}" target="_blank">
|
||||||
<i class="fa fa-external-link"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
|
<i class="fa fa-external-link"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control" type="text" name="support_url" id="support_url" value="{{ old('support_url', $item->support_url) }}" />
|
<input class="form-control" type="text" name="support_url" id="support_url" value="{{ old('support_url', $item->support_url) }}" />
|
||||||
<p class="help-block">{!! trans('admin/manufacturers/message.support_url_help') !!}</p>
|
|
||||||
{!! $errors->first('support_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
{!! $errors->first('support_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue