mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Remove auto-link from from manufacturer warranty
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
73d45bb587
commit
deff312381
|
@ -56,7 +56,7 @@ class ManufacturerPresenter extends Presenter
|
|||
'switchable' => true,
|
||||
'title' => trans('admin/manufacturers/table.support_url'),
|
||||
'visible' => true,
|
||||
'formatter' => 'linkFormatter',
|
||||
'formatter' => 'externalLinkFormatter',
|
||||
],
|
||||
|
||||
[
|
||||
|
@ -85,7 +85,7 @@ class ManufacturerPresenter extends Presenter
|
|||
'switchable' => true,
|
||||
'title' => trans('admin/manufacturers/table.warranty_lookup_url'),
|
||||
'visible' => false,
|
||||
'formatter' => 'linkFormatter',
|
||||
'formatter' => 'externalLinkFormatter',
|
||||
],
|
||||
|
||||
[
|
||||
|
|
|
@ -511,8 +511,12 @@
|
|||
}
|
||||
|
||||
function externalLinkFormatter(value) {
|
||||
|
||||
if (value) {
|
||||
return '<a href="' + value + '" target="_blank">' + value + '</a>';
|
||||
if ((value.indexOf("{") === -1) || (value.indexOf("}") ===-1)) {
|
||||
return '<a href="' + value + '" target="_blank">' + value + ' <i class="fa fa-external-link"><span class="sr-only">{{ trans('hardware/general.mfg_warranty_lookup') }}</span></i></a>';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue