0

因此,使用 Orchard CMS 1.6,当客户创建帐户时,他们会提示输入发票地址和送货地址。

我想要发票地址下方的复选框,它将使用相同的发票地址详细信息更新送货地址,而不必输入两次相同的地址。

不知道怎么做,任何帮助将不胜感激)复选框的一个例子是

<div class="checkbox">@Html.CheckBoxFor(m => signup.SameAddress)</div>
<div class="label">@Html.LabelFor(m => signup.SameAddress, T(Use same address as billing"))</div>

到目前为止,我的代码看起来像这样(如下)。ATM 他们必须两次输入相同的详细信息。

<article class="addresses form">
    <fieldset>
        <div class="span5">
        <h2>@T("Invoice Address")</h2>

        <table class="table-bordered table-striped table">
            <colgroup>
                <col id="Col1" />
                <col id="Col2" />
            </colgroup>
            <thead>
                <tr>
                    <th scope="col">@T("Name")</th>
                    <td>@invoiceAddress.Name.Value</td>
                </tr>
                <tr>
                    <th scope="col">@T("AddressLine1")</th>
                    <td>@invoiceAddress.AddressLine1.Value<</td>
                </tr>              
            </thead>
        </table>
        </div>

        //insert checkbox here

        <div class="span5">
        <h2>@T("Billing Address")</h2>
        <table class="table-bordered table-striped table">
            <colgroup>
                <col id="Col1" />
                <col id="Col2" />
            </colgroup>
            <thead>
                <tr>
                    <th scope="col">@T("Name")</th>
                    <td>@shippingAddress.Name.Value</td>
                </tr>
                <tr>
                    <th scope="col">@T("AddressLine1")</th>
                    <td>@shippingAddress.AddressLine1.Value<</td>
                </tr>               
            </thead>

        </table>
        </div>
    </fieldset>
    </article>
4

0 回答 0