Skip to content

Commit

Permalink
Merge pull request #359 from erw13n/development
Browse files Browse the repository at this point in the history
Fix #292 - Affiliate & Category (drilldown) views don't work
  • Loading branch information
WillStrohl authored Dec 1, 2021
2 parents 983bbdf + 9223019 commit 569512a
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,7 @@
<data name="AffiliateIdHelp.Text" xml:space="preserve">
<value>Letters and numbers only, please</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@
</label>
<div class="col-sm-6 offset-sm-0">
<div class="form-check dnnFormRequired">
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class="form-check-input" })
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class = "form-check-input" })
<label class="form-check-label" for="ConfirmTerms">@Localization.GetString("lblIAgreeTo")</label>
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-outline-info btn-sm hc-popup">
<i class="fas fa-book"></i>@Localization.GetString("lblAffiliateTerms")
Expand Down Expand Up @@ -218,7 +220,9 @@
</div>
}
else{
Html.Raw(Model.AgreementText);
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<p class="text-right mt-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@
<data name="lblLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
</label>
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "dnnFormMessage hcFormError" })
@Html.HiddenFor(model => model.IsTrue)
</label>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="hc-popup">@Localization.GetString("lblAffiliateTerms") </a>
</div>
Expand Down Expand Up @@ -164,7 +166,16 @@
@* Affiliate Terms Popup *@
<div id="hcAffiliateTermsPopup" style="display: none;">
<div class="hc-affiliate-terms">
@Html.Raw(@Model.AgreementText)
@if (Model.AgreementText == ""){
<div class="alert alert-warning">
@Localization.GetString("NoAgreement")
</div>
}
else{
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<ul class="dnnActions dnnRight">
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@
<div class="checkbox dnnFormRequired">
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</label>
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-default btn-sm hc-popup">
Expand Down Expand Up @@ -214,7 +216,9 @@
</div>
}
else{
Html.Raw(Model.AgreementText);
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<p class="text-right margin-top-md">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,7 @@
<data name="AffiliateIdHelp.Text" xml:space="preserve">
<value>Letters and numbers only, please</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@
<div class="form-check dnnFormRequired">
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class="form-check-input" })
<label class="form-check-label" for="ConfirmTerms">@Localization.GetString("lblIAgreeTo")</label>
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-outline-info btn-sm hc-popup">
<i class="fas fa-book"></i>@Localization.GetString("lblAffiliateTerms")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@
<data name="lblLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
</label>
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "dnnFormMessage hcFormError" })
@Html.HiddenFor(model => model.IsTrue)
</label>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="hc-popup">@Localization.GetString("lblAffiliateTerms") </a>
</div>
Expand Down Expand Up @@ -164,7 +166,16 @@
@* Affiliate Terms Popup *@
<div id="hcAffiliateTermsPopup" style="display: none;">
<div class="hc-affiliate-terms">
@Html.Raw(@Model.AgreementText)
@if (Model.AgreementText == ""){
<div class="alert alert-warning">
@Localization.GetString("NoAgreement")
</div>
}
else{
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<ul class="dnnActions dnnRight">
<li>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Hotcakes.Shipping/USPSAddressProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Hotcakes.Shipping
{
public class USPSAddressProvider : IAddressProvider
{
private const string _url = "http://production.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=";
private const string _url = "https://production.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=";
private readonly string _userID;

public USPSAddressProvider(string userID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,12 @@ public string ToJson()
[RegularExpression(@"[-\w]*", ErrorMessage = "Only alpha-numeric and '-', '_' characters are allowed")]
public string ReferralAffiliateId { get; set; }

public bool IsTrue { get { return true; } }

/// <summary>
/// Checkbox to confirm the terms
/// </summary>
[Compare(nameof(IsTrue), ErrorMessage = "Please agree to Terms and Conditions")]
public bool ConfirmTerms { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,7 @@
<data name="AffiliateIdHelp.Text" xml:space="preserve">
<value>Letters and numbers only, please</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@
</label>
<div class="col-sm-6 offset-sm-0">
<div class="form-check dnnFormRequired">
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class="form-check-input" })
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class = "form-check-input" })
<label class="form-check-label" for="ConfirmTerms">@Localization.GetString("lblIAgreeTo")</label>
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-outline-info btn-sm hc-popup">
<i class="fas fa-book"></i>@Localization.GetString("lblAffiliateTerms")
Expand Down Expand Up @@ -218,7 +220,9 @@
</div>
}
else{
Html.Raw(Model.AgreementText);
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<p class="text-right mt-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,7 @@
<data name="AffiliateIdHelp.Text" xml:space="preserve">
<value>Letters and numbers only, please</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@
</label>
<div class="col-sm-6 offset-sm-0">
<div class="form-check dnnFormRequired">
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class="form-check-input" })
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", @class = "form-check-input" })
<label class="form-check-label" for="ConfirmTerms">@Localization.GetString("lblIAgreeTo")</label>
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-outline-info btn-sm hc-popup">
<i class="fas fa-book"></i>@Localization.GetString("lblAffiliateTerms")
Expand Down Expand Up @@ -218,7 +220,9 @@
</div>
}
else{
Html.Raw(Model.AgreementText);
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<p class="text-right mt-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@
<data name="lblLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
</label>
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "dnnFormMessage hcFormError" })
@Html.HiddenFor(model => model.IsTrue)
</label>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="hc-popup">@Localization.GetString("lblAffiliateTerms") </a>
</div>
Expand Down Expand Up @@ -164,7 +166,18 @@
@* Affiliate Terms Popup *@
<div id="hcAffiliateTermsPopup" style="display: none;">
<div class="hc-affiliate-terms">
@Html.Raw(@Model.AgreementText)
@if (Model.AgreementText == "")
{
<div class="alert alert-warning">
@Localization.GetString("NoAgreement")
</div>
}
else
{
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<ul class="dnnActions dnnRight">
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,7 @@
<data name="lblLastName.Text" xml:space="preserve">
<value>Last Name:</value>
</data>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
</label>
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "dnnFormMessage hcFormError" })
@Html.HiddenFor(model => model.IsTrue)
</label>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="hc-popup">@Localization.GetString("lblAffiliateTerms") </a>
</div>
Expand Down Expand Up @@ -164,7 +166,18 @@
@* Affiliate Terms Popup *@
<div id="hcAffiliateTermsPopup" style="display: none;">
<div class="hc-affiliate-terms">
@Html.Raw(@Model.AgreementText)
@if (Model.AgreementText == "")
{
<div class="alert alert-warning">
@Localization.GetString("NoAgreement")
</div>
}
else
{
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<ul class="dnnActions dnnRight">
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,7 @@
<data name="AffiliateIdHelp.Text" xml:space="preserve">
<value>Letters and numbers only, please</value>
</data>
</root>
<data name="ValMessage_ConfirmTerms.Text" xml:space="preserve">
<value>Please agree to the Terms and Conditions</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@
<div class="col-offset-0 col-xs-6">
<div class="checkbox dnnFormRequired">
<label>
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms" })
@Localization.GetString("lblIAgreeTo")
@Html.CheckBoxFor(model => model.ConfirmTerms, new { data_bind = "checked: model.confirmterms", ID = "chkConfirmTerms" })
@Localization.GetString("lblIAgreeTo")
@Html.ValidationMessageFor(model => model.ConfirmTerms, Localization.GetString("ValMessage_ConfirmTerms"), new { @class = "alert alert-danger" })
@Html.HiddenFor(model => model.IsTrue)
</label>
</div>
<a href="#hcAffiliateTermsPopup" data-min-width="600" data-min-height="350" title="@Localization.GetString("TermsTitle")" class="btn btn-default btn-sm hc-popup">
Expand Down Expand Up @@ -214,7 +216,9 @@
</div>
}
else{
Html.Raw(Model.AgreementText);
<text>
@Html.Raw(Model.AgreementText)
</text>
}
</div>
<p class="text-right margin-top-md">
Expand Down

0 comments on commit 569512a

Please sign in to comment.