Przeglądaj źródła

Move blue envelope questions off the purple screen onto their own

Purple and blue envelope details were getting mixed up on both the
order form and the confirmation email. The purple screen no longer
asks about blue envelopes at all; the blue screen now owns the
provider question and always shows its permit questions (not just
when buying from KCI), and the order-confirmation email keeps purple
and blue answers in separate sections.

Also drop the blue page's visibleIf tied to the purple envelope
stock choice - it was hiding all blue questions for anyone using
their own purple stock, which is unrelated to blue envelope needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
master
Daniel Covington 2 dni temu
rodzic
commit
b2108fa1ed
3 zmienionych plików z 29 dodań i 39 usunięć
  1. +2
    -4
      app/models/OrderDetailsAnswersMapper.asp
  2. +9
    -9
      app/models/OrderMailer.asp
  3. +18
    -26
      app/views/Order/continue.asp

+ 2
- 4
app/models/OrderDetailsAnswersMapper.asp Wyświetl plik

@@ -26,7 +26,6 @@ Function ValidateOrderDetailsAnswers(answers)
RequireBoolean errors, answers, "MailingNonprofitAuthCodeUnknown"

RequireBoolean errors, answers, "PurpleWantsQuote"
RequireBoolean errors, answers, "PurpleWantsBlueEnvelopes"
RequireBoolean errors, answers, "PurpleTrackMIBallot"
RequireBoolean errors, answers, "BlueWantsQuote"
RequireBoolean errors, answers, "BluePrintPermit"
@@ -59,9 +58,6 @@ Sub MapOrderDetailsAnswers(ByRef model, answers)
model.PurpleWantsQuote = DictValue(answers, "PurpleWantsQuote")
model.PurpleEnvelopeStock = DictValue(answers, "PurpleEnvelopeStock")
model.PurplePrintOption = DictValue(answers, "PurplePrintOption")
model.PurpleWantsBlueEnvelopes = DictValue(answers, "PurpleWantsBlueEnvelopes")
model.PurpleBlueProvider = DictValue(answers, "PurpleBlueProvider")
model.PurpleBlueProviderOther = DictValue(answers, "PurpleBlueProviderOther")
model.PurplePrintStyle = DictValue(answers, "PurplePrintStyle")
model.PurpleColorCodingBy = DictValue(answers, "PurpleColorCodingBy")
model.PurplePrecinctCount = DictValue(answers, "PurplePrecinctCount")
@@ -72,6 +68,8 @@ Sub MapOrderDetailsAnswers(ByRef model, answers)

' Blue envelope
model.BlueWantsQuote = DictValue(answers, "BlueWantsQuote")
model.PurpleBlueProvider = DictValue(answers, "PurpleBlueProvider")
model.PurpleBlueProviderOther = DictValue(answers, "PurpleBlueProviderOther")
model.BluePrintPermit = DictValue(answers, "BluePrintPermit")
model.BluePermitOwnership = DictValue(answers, "BluePermitOwnership")
model.BlueHasNonprofitStatus = DictValue(answers, "BlueHasNonprofitStatus")


+ 9
- 9
app/models/OrderMailer.asp Wyświetl plik

@@ -71,18 +71,10 @@ Class OrderMailer_Class
EmailRow("Phone", model.Phone))

If IsTrue(model.PurpleWantsQuote) Then
Dim purpleBlueProviderLine
purpleBlueProviderLine = LabelPurpleBlueProvider(model.PurpleBlueProvider)
If purpleBlueProviderLine = "Other" And Len(Trim(model.PurpleBlueProviderOther & "")) > 0 Then
purpleBlueProviderLine = model.PurpleBlueProviderOther
End If

html = html & EmailSection("Purple Ballot Envelopes", _
EmailRow("Permanent ballot list count", model.PurplePermanentBallotListCount) & _
EmailRow("Envelope stock", LabelEnvelopeStock(model.PurpleEnvelopeStock)) & _
EmailRow("Print option", LabelPrintOption(model.PurplePrintOption)) & _
EmailRow("Also wants KCI blue envelopes", EmailYesNo(model.PurpleWantsBlueEnvelopes)) & _
EmailRow("Blue envelope provider", purpleBlueProviderLine) & _
EmailRow("Print style", LabelPrintStyle(model.PurplePrintStyle)) & _
EmailRow("Color coding by", LabelColorCodingBy(model.PurpleColorCodingBy)) & _
EmailRow("Number of precincts", model.PurplePrecinctCount) & _
@@ -91,7 +83,13 @@ Class OrderMailer_Class
EmailRow("Extra envelopes requested", model.PurpleExtraEnvelopeQty))
End If

If IsTrue(model.BlueWantsQuote) Then
If Not IsNull(model.BlueWantsQuote) Then
Dim blueProviderLine
blueProviderLine = LabelPurpleBlueProvider(model.PurpleBlueProvider)
If blueProviderLine = "Other" And Len(Trim(model.PurpleBlueProviderOther & "")) > 0 Then
blueProviderLine = model.PurpleBlueProviderOther
End If

' City/permit number are collected for an own-organization permit - a permit
' lookup can't be done from the nonprofit authorization code alone.
Dim bluePermitLine
@@ -103,6 +101,8 @@ Class OrderMailer_Class
End If

html = html & EmailSection("Blue AV Envelopes", _
EmailRow("Purchasing blue envelopes from KCI", EmailYesNo(model.BlueWantsQuote)) & _
EmailRow("Blue envelope provider", blueProviderLine) & _
EmailRow("Print permit", EmailYesNo(model.BluePrintPermit)) & _
EmailRow("Permit ownership", LabelPermitOwnership(model.BluePermitOwnership)) & _
EmailRow("Confirmed nonprofit status with USPS", LabelNonprofitStatus(model.BlueHasNonprofitStatus)) & _


+ 18
- 26
app/views/Order/continue.asp Wyświetl plik

@@ -124,30 +124,6 @@
{ value: "PermitOnly", text: "State of Michigan permit only" }
]
},
{
type: "boolean", name: "PurpleWantsBlueEnvelopes", labelTrue: "Yes", labelFalse: "No",
title: "Are you planning to use KCI blue envelopes?",
visibleIf: "{PurplePrintOption} = 'AddressesAndPermit'",
isRequired: true
},
{
type: "radiogroup", name: "PurpleBlueProvider",
title: "Who is your blue envelope provider?",
visibleIf: "{PurpleWantsBlueEnvelopes} = false",
isRequired: true,
choices: [
{ value: "ElectionSource", text: "ElectionSource" },
{ value: "PSI", text: "PSI" },
{ value: "Spectrum", text: "Spectrum" },
{ value: "Other", text: "Other" }
]
},
{
type: "text", name: "PurpleBlueProviderOther",
title: "Please specify your blue envelope provider",
visibleIf: "{PurpleBlueProvider} = 'Other'",
isRequired: true
},
{
type: "radiogroup", name: "PurplePrintStyle",
title: "Would you like your envelopes printed with color coding or black ink only?",
@@ -209,17 +185,33 @@
{
name: "blueEnvelope",
title: "3. Blue AV Envelope Order Form",
visibleIf: "{PurpleEnvelopeStock} <> 'OwnStock'",
elements: [
{
type: "boolean", name: "BlueWantsQuote", labelTrue: "Yes", labelFalse: "No",
title: "Would you like to purchase blue AV envelopes from KCI?",
isRequired: true
},
{
type: "radiogroup", name: "PurpleBlueProvider",
title: "Who is your blue envelope provider?",
visibleIf: "{BlueWantsQuote} = false",
isRequired: true,
choices: [
{ value: "ElectionSource", text: "ElectionSource" },
{ value: "PSI", text: "PSI" },
{ value: "Spectrum", text: "Spectrum" },
{ value: "Other", text: "Other" }
]
},
{
type: "text", name: "PurpleBlueProviderOther",
title: "Please specify your blue envelope provider",
visibleIf: "{PurpleBlueProvider} = 'Other'",
isRequired: true
},
{
type: "boolean", name: "BluePrintPermit", labelTrue: "Yes", labelFalse: "No",
title: "Would you like KCI to print a permit on your blue envelope?",
visibleIf: "{BlueWantsQuote} = true",
isRequired: true
},
{


Ładowanie…
Anuluj
Zapisz

Powered by TurnKey Linux.