checker sell-trucks: add Company name field prefilled from the carrier record
Separate from the contact's first/last name; defaults to data.legal_name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ae52c63983
commit
17b16087a4
1 changed files with 3 additions and 1 deletions
|
|
@ -326,6 +326,7 @@ Send reset link
|
|||
h += '<p id="sell-note" style="display:none;font-size:13px;color:#166534;margin:12px 0 0;font-weight:600">No problem - your wrap-up handles the DOT side. We’re here if you change your mind.</p>';
|
||||
h += '<div id="sell-form" style="display:none;margin-top:14px;padding-top:14px;border-top:1px solid #dcfce7">';
|
||||
h += '<p id="sell-intro" style="font-size:13px;color:#374151;margin:0 0 10px"></p>';
|
||||
h += '<input type="text" id="sell-company" placeholder="Company name" value="' + (data.legal_name || '') + '" style="' + inStyle + '">';
|
||||
h += '<input type="text" id="sell-name" placeholder="Your first & last name" style="' + inStyle + '">';
|
||||
h += '<input type="tel" id="sell-phone" placeholder="Phone number" value="' + (data.telephone || '') + '" style="' + inStyle + '">';
|
||||
h += '<input type="email" id="sell-email" placeholder="Email address" style="' + inStyle + '">';
|
||||
|
|
@ -421,6 +422,7 @@ Send reset link
|
|||
if (sBtn) sBtn.addEventListener("click", function() {
|
||||
if (!current) return;
|
||||
var m = MODE[current];
|
||||
var company = document.getElementById("sell-company").value.trim();
|
||||
var name = document.getElementById("sell-name").value.trim();
|
||||
var phone = document.getElementById("sell-phone").value.trim();
|
||||
var email = document.getElementById("sell-email").value.trim();
|
||||
|
|
@ -436,7 +438,7 @@ Send reset link
|
|||
btn: sBtn, statusEl: statusEl, okMsg: m.ok,
|
||||
subject: m.subj + " - " + data.legal_name + " (DOT " + data.dot_number + ")",
|
||||
message: [m.subj + " lead from DOT Compliance Checker.", "",
|
||||
"Carrier: " + data.legal_name, "DOT#: " + data.dot_number, "Location: " + loc, "Fleet: " + fleet,
|
||||
"Carrier: " + (company || data.legal_name), "DOT#: " + data.dot_number, "Location: " + loc, "Fleet: " + fleet,
|
||||
(m.truck ? "Vehicle(s): " + (truck || "not specified") : null), "",
|
||||
"Contact: " + name, "Email: " + email, "Phone: " + (phone || data.telephone || "not provided")]
|
||||
.filter(function(x) { return x !== null; }).join("\n"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue