fix: hide certain custorder settings if not applicable

This commit is contained in:
Lance Edgar 2024-06-14 19:59:52 -05:00
parent da4450b574
commit 0212e52b66

View file

@ -24,29 +24,38 @@
</b-checkbox>
</b-field>
<b-field message="Only applies if user is allowed to choose contact info.">
<b-checkbox name="rattail.custorders.new_orders.allow_contact_info_create"
v-model="simpleSettings['rattail.custorders.new_orders.allow_contact_info_create']"
native-value="true"
@input="settingsNeedSaved = true">
Allow user to enter new contact info
</b-checkbox>
</b-field>
<div v-show="simpleSettings['rattail.custorders.new_orders.allow_contact_info_choice']"
style="padding-left: 2rem;">
<p class="block">
If you allow users to enter new contact info, the default action
when the order is submitted, is to send email with details of
the new contact info.&nbsp; Settings for these are at:
</p>
<b-field message="Only applies if user is allowed to choose contact info.">
<b-checkbox name="rattail.custorders.new_orders.allow_contact_info_create"
v-model="simpleSettings['rattail.custorders.new_orders.allow_contact_info_create']"
native-value="true"
@input="settingsNeedSaved = true">
Allow user to enter new contact info
</b-checkbox>
</b-field>
<ul class="list">
<li class="list-item">
${h.link_to("New Phone Request", url('emailprofiles.view', key='new_phone_requested'))}
</li>
<li class="list-item">
${h.link_to("New Email Request", url('emailprofiles.view', key='new_email_requested'))}
</li>
</ul>
<div v-show="simpleSettings['rattail.custorders.new_orders.allow_contact_info_create']"
style="padding-left: 2rem;">
<p class="block">
If you allow users to enter new contact info, the default action
when the order is submitted, is to send email with details of
the new contact info.&nbsp; Settings for these are at:
</p>
<ul class="list">
<li class="list-item">
${h.link_to("New Phone Request", url('emailprofiles.view', key='new_phone_requested'))}
</li>
<li class="list-item">
${h.link_to("New Email Request", url('emailprofiles.view', key='new_email_requested'))}
</li>
</ul>
</div>
</div>
</div>
<h3 class="block is-size-3">Product Handling</h3>