Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #292 - Affiliate & Category (drilldown) views don't work #359

Merged
merged 10 commits into from
Dec 1, 2021
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; } }
Copy link
Contributor Author

@erw13n erw13n Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillStrohl It's been update in here.


/// <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