Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{var $pls = $_modx->getPlaceholders()}
<form id="msOrder" class="form-horizontal ms2_form msczone-order" method="post">
{var $tmp = ['city','country']}
{foreach $tmp as $field}
<input type="hidden" id="{$field}" name="{$field}" value="{$form[$field]}">
{/foreach}
<input type="hidden" name="msczone_process_blocks" value="{$pls.msczone_processBlocks | htmlentities}">
<input type="hidden" name="msczone_settlement" value="{$order.msczone_settlement}">
<div class="row">
<div class="col-md-12" id="deliveries">
<h4>{'msczone_deliveries'|lexicon} {'!mscZone.Settlement' | snippet}</h4>
<div class="form-group">
<label class="col-md-4 control-label">
<span class="required-star">*</span> {'ms2_frontend_delivery_select' | lexicon}
</label>
<div class="col-sm-12">
<div class="btn-group msczone-buttons-group" data-toggle="buttons">
{foreach $deliveries as $delivery index=$index}
{var $checked = !$order.delivery && $index == 0 || $delivery.id == $order.delivery}
<label class="delivery btn btn-primary {$checked ? 'active' : ''} input-parent">
<input type="radio" name="delivery" value="{$delivery.id}" id="delivery_{$delivery.id}"
data-payments="{$delivery.payments | json_encode}"
data-properties="{$delivery.properties | json_encode | htmlentities}"
{$checked ? 'checked' : ''}>
{if $delivery.logo?}
<img src="{$delivery.logo}" alt="{$delivery.name}" title="{$delivery.name}"/>
{else}
{$delivery.name}
{/if}
</label>
{/foreach}
</div>
</div>
</div>
{*
<div class="msczone-hidden" name="msczone_error" style="display: none;">
<div class="msczone msczone-error">
</div>
</div>
*}
</div>
</div>
<div class="row">
<div class="col-md-3">
<h4>{'msczone_credentials' | lexicon}</h4>
{foreach ['email','receiver','phone'] as $field}
<div class="form-group input-parent">
<div class="col-sm-12">
<label class="control-label" for="{$field}">
<span class="required-star">*</span> {('ms2_frontend_' ~ $field) | lexicon}
</label>
<input type="text" id="{$field}" placeholder="{('ms2_frontend_' ~ $field) | lexicon}"
name="{$field}" value="{$form[$field]}"
class="form-control{($field in list $errors) ? ' error' : ''}">
</div>
</div>
{/foreach}
<div class="form-group input-parent">
<div class="col-sm-12">
<label class="control-label" for="comment">
<span class="required-star">*</span> {'ms2_frontend_comment' | lexicon}</label>
<textarea name="comment" id="comment" placeholder="{'ms2_frontend_comment' | lexicon}"
class="form-control{('comment' in list $errors) ? ' error' : ''}">{$form.comment}</textarea>
</div>
</div>
</div>
<div class="col-md-3" name="delivery_address">
<h4>{'msczone_address' | lexicon}</h4>
{set $field = 'city'}
<div class="form-group input-parent">
<div class="col-sm-12">
<label class="control-label" for="{$field~'name'}">
<span class="required-star">*</span> {('ms2_frontend_' ~ $field) | lexicon}
</label>
<input type="text" id="{$field~'name'}" placeholder="{('ms2_frontend_' ~ $field) | lexicon}"
name="{$field~'name'}" value="{$form[$field]}"
class="form-control{($field in list $errors) ? ' error' : ''} msczone"
data-msczone-mode="settlement.field"
data-windowload>
</div>
</div>
{foreach ['index','region','street'] as $field}
<div class="form-group input-parent">
<div class="col-sm-12">
<label class="control-label" for="{$field}">
<span class="required-star">*</span> {('ms2_frontend_' ~ $field) | lexicon}
</label>
<input type="text" id="{$field}" placeholder="{('ms2_frontend_' ~ $field) | lexicon}"
name="{$field}" value="{$form[$field]}"
class="form-control{($field in list $errors) ? ' error' : ''}">
</div>
</div>
{/foreach}
<div class="form-group input-parent">
<div class="col-md-12">
<label class="control-label" for="street">
<span class="required-star">*</span> {'ms2_frontend_building' | lexicon}</label>
<div class="form-group row">
{foreach ['building','room'] as $field}
<div class="col-md-6 col-sm-6 col-xs-6">
<input type="text" id="{$field}" placeholder="{('ms2_frontend_' ~ $field) | lexicon}"
name="{$field}" value="{$form[$field]}"
class="form-control{($field in list $errors) ? ' error' : ''}">
</div>
{/foreach}
</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-3 col-xs-3 msczone-hidden" name="msczone_delivery_info" style="display: none;">
<h4>{'msczone_info' | lexicon}</h4>
<div class="msczone msczone-delivery-info">
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-6 pull-right">
<div id="payments">
<h4>{'msczone_payments' | lexicon}</h4>
<div class="form-group">
<label class="col-md-12 control-label"><span class="required-star">*</span>
{'ms2_frontend_payment_select' | lexicon}</label>
<div class="col-sm-12">
{foreach $payments as $payment index=$index}
{var $checked = !$order.payment && $index == 0 || $payment.id == $order.payment}
<div class="radio input-parent">
<label class="payment">
<input type="radio" name="payment" value="{$payment.id}" id="payment_{$payment.id}"
{$checked ? 'checked' : ''}>
{if $payment.logo?}
<img src="{$payment.logo}" alt="{$payment.name}" title="{$payment.name}"/>
{else}
{$payment.name}
{/if}
{if $payment.description?}
<p class="small">
{$payment.description}
</p>
{/if}
</label>
</div>
{/foreach}
</div>
</div>
</div>
<div>
<h3 class="msczone-mg-0">
<span id="ms2_order_cost">{$order.cost ?: 0}</span> {'ms2_frontend_currency' | lexicon}
</h3>
<p>
<small>{'msczone_order_cost' | lexicon}</small>
</p>
<button type="submit" name="ms2_action" value="order/submit"
class="btn btn-default btn-primary ms2_link">
{'msczone_order_submit' | lexicon}
</button>
</div>
</div>
</div>
<hr>
<div>
<button type="button" name="ms2_action" value="order/clean" class="btn btn-default ms2_link">
<i class="glyphicon glyphicon-remove"></i> {'ms2_frontend_order_cancel' | lexicon}
</button>
</div>
</form>
@vgrish

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment