= settingsSectionStart('how', 'How it works', 'An asset is looked up by its make - Dell, HP or Lenovo - or, with no make, by its model: Latitude, ThinkPad, EliteBook. Only empty dates are filled in: a warranty or purchase date already on an asset is never changed.') ?>
On one asset - the button beside Warranty expires on its Purchase tab, before you save.
On many - select them on Assets, then Bulk Action > Look Up Warranty.
The warranty date is when the last of the manufacturer's coverage for it ends; the purchase date, when its warranty began - for Dell, the day it shipped.
= settingsSectionEnd() ?>
= settingsSectionStart('dell', 'Dell', $state($ready['dell'], 'Not set up') . 'TechDirect\'s Warranty API, by service tag. Ask for a key at
techdirect.dell.com under Services > APIs - Dell approves it, usually within a few days.') ?>
= settingsInput('config_warranty_dell_client_id', $warranty['config_warranty_dell_client_id'], ['icon' => 'fa-id-badge', 'label' => 'Client ID', 'maxlength' => 200,
'help' => 'Empty switches Dell lookups off, and forgets its secret.']) ?>
= settingsInput('config_warranty_dell_client_secret', '', ['icon' => 'fa-key', 'type' => 'password', 'label' => 'Client secret', 'maxlength' => 500,
'autocomplete' => 'new-password', 'placeholder' => $saved_secret($warranty['config_warranty_dell_client_secret'])]) ?>
= $test_field('dell', 'A service tag to try') ?>
= settingsSectionEnd() ?>
= settingsSectionStart('lenovo', 'Lenovo', $state($ready['lenovo'], 'Off') . 'Lenovo\'s support site, asked the way its own pages ask it - no key needed. It isn\'t an API Lenovo offers, so it can stop working when Lenovo changes the site.') ?>
= settingsSwitch('config_warranty_lenovo', $warranty['config_warranty_lenovo'], ['label' => 'Look up Lenovo serial numbers on Lenovo\'s support site']) ?>
= $test_field('lenovo', 'A serial number to try') ?>
= settingsSectionEnd() ?>
= settingsSectionStart('hp', 'HP', $state($ready['hp'], 'Not set up') . 'HP Inc.\'s Warranty API, by serial number. Register at
developers.hp.com, then email warrantyapi.customers@hp.com for access - HP approves each by hand and doesn\'t give every IT company one. Not for HP Enterprise (HPE) servers, which have no such API.') ?>
= settingsInput('config_warranty_hp_client_id', $warranty['config_warranty_hp_client_id'], ['icon' => 'fa-id-badge', 'label' => 'API key', 'maxlength' => 200,
'help' => 'Empty switches HP lookups off, and forgets its secret.']) ?>
= settingsInput('config_warranty_hp_client_secret', '', ['icon' => 'fa-key', 'type' => 'password', 'label' => 'API secret', 'maxlength' => 500,
'autocomplete' => 'new-password', 'placeholder' => $saved_secret($warranty['config_warranty_hp_client_secret']),
'help' => 'HP works through each lookup as a job, so its answers can take a few minutes.']) ?>
= $test_field('hp', 'A serial number to try') ?>
= settingsSectionEnd() ?>
= settingsSaveBar('edit_warranty_settings') ?>