Commits

Josh Berry  committed f2606b1

Remove importing/exporting from driver, remove placeholder text from rates field

  • Participants
  • Parent commits 7b20f8b
  • Branches zipcode_tax

Comments (0)

Files changed (2)

File Drivers/ZipCodeTaxPartDriver.cs

             // User will input a percentage
             return Editor(part, shapeHelper);
         }
-
-        protected override void Importing(ZipCodeTaxPart part, ImportContentContext context) {
-            var el = context.Data.Element(typeof(ZipCodeTaxPart).Name);
-            if (el == null) return;
-            el.With(part)
-                .FromAttr(p => p.Priority);
-        }
-
-        protected override void Exporting(ZipCodeTaxPart part, ExportContentContext context) {
-            context.Element(typeof(ZipCodeTaxPart).Name)
-                .With(part)
-                .ToAttr(p => p.Priority);
-        }
     }
 }

File Views/EditorTemplates/Parts/ZipCodeTax.cshtml

     @Html.TextBox("Name", zipCodeTaxPart.Name, new { @class = "text text-large" })<br />
     <span class="hint">@T("Title displayed to users at checkout.")</span><br />
     <label class="sub" for="@Html.Id("Rates")">@T("Zip Code Rates")</label><br />
-    @Html.TextArea("Rates", zipCodeTaxPart.Rates, new { placeholder = "52411, .07" })<br />
+    @Html.TextArea("Rates", zipCodeTaxPart.Rates)<br />
     <span class="hint">@T("One line for each zip/rate with the values seperated by a comma or tab. Tab seperated values are also supported to allow copying and pasting from spreadsheets.")</span><br />
     <label class="sub" for="@Html.Id("Priority")">@T("Priority")</label><br />
     @Html.TextBox("Priority", zipCodeTaxPart.Priority, new { @class = "text text-small" })<br />