Пример #1
0
        break;
    case 'edit':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_ORDERS_STATUS . '</b>');
        $contents = array('form' => zen_draw_form_admin('status', FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&orders_status_id=' . $oInfo->orders_status_id . '&action=save'));
        $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
        $orders_status_inputs_string = '';
        $languages = zen_get_languages();
        for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
            $orders_status_inputs_string .= '<div class="input-group">
					' . zen_draw_input_field('orders_status_name[' . $languages[$i]['id'] . ']', zen_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id'])) . '
					<span class="input-group-addon">' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '</span>
				</div>';
        }
        $contents[] = array('text' => '<br>' . TEXT_INFO_ORDERS_STATUS_NAME . $orders_status_inputs_string);
        if (DEFAULT_ORDERS_STATUS_ID != $oInfo->orders_status_id) {
            $contents[] = array('text' => '<br>' . zen_draw_selection_field(array('type' => 'checkbox', 'name' => 'default', 'label' => TEXT_SET_DEFAULT)));
        }
        $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . zen_href_link_admin(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&orders_status_id=' . $oInfo->orders_status_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
        break;
    case 'delete':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDERS_STATUS . '</b>');
        $contents = array('form' => zen_draw_form_admin('status', FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&orders_status_id=' . $oInfo->orders_status_id . '&action=deleteconfirm'));
        $contents[] = array('text' => 'Are you sure you want to delete this order status?');
        $contents[] = array('text' => '<br><b>' . $oInfo->orders_status_name . '</b>');
        if ($remove_status) {
            $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link_admin(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&orders_status_id=' . $oInfo->orders_status_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
        }
        break;
    default:
        if (isset($oInfo) && is_object($oInfo)) {
            $heading[] = array('text' => '<b>' . $oInfo->orders_status_name . '</b>');
Пример #2
0
function zen_draw_radio_field($name, $value = '', $checked = false, $parameters = '')
{
    return zen_draw_selection_field($name, 'radio', $value, $checked, $parameters);
}
Пример #3
0
function zen_draw_radio_field($name, $value = '', $checked = false, $parameters = '', $label = '', $help = '')
{
    return zen_draw_selection_field(array('name' => $name, 'type' => 'radio', 'value' => $value, 'checked' => $checked, 'label' => $label, 'parameters' => $parameters));
}