/** * Displays field according to definition. * * @param array $field Field parameters. * * @return string Field output to display. */ public function displayField(array $field) { switch ($field['type']) { case 'user_defined': // Workaround for PHP pre-5.4 echo call_user_func($field['display'], $field); break; case 'text': Forms::text($field); break; case 'number': Forms::number($field); break; case 'select': Forms::select($field); break; case 'checkbox': Forms::checkbox($field); break; case 'constant': Forms::constant($field); break; case 'textarea': Forms::textarea($field); break; default: $this->wp->doAction('jigoshop\\admin\\settings\\form_field\\' . $field['type'], $field); } }
<noscript> <div class="alert alert-danger" role="alert"><?php _e('<strong>Warning</strong> Order panel will not work properly without JavaScript.', 'jigoshop'); ?> </div> </noscript> <div class="tab-content form-horizontal"> <div class="tab-pane active" id="order"> <?php Forms::select(array('name' => 'jigoshop_order[status]', 'label' => __('Order status', 'jigoshop'), 'value' => $order->getStatus(), 'options' => Status::getStatuses())); ?> <?php Forms::select(array('name' => 'jigoshop_order[customer]', 'label' => __('Customer', 'jigoshop'), 'value' => $order->getCustomer() ? $order->getCustomer()->getId() : '', 'options' => $customers)); ?> <?php Forms::textarea(array('name' => 'post_excerpt', 'label' => __("Customer's note", 'jigoshop'), 'value' => $order->getCustomerNote())); ?> </div> <div class="tab-pane" id="billing-address"> <?php foreach ($billingFields as $field) { ?> <?php Forms::field($field['type'], $field); ?> <?php } ?> </div> <?php if (!$billingOnly) {