Index: admin/user_profiles.php @@ -281,6 +281,12 @@ $smarty->assign('address_fields', $address_fields); /** + * Additional address fields + */ +$additional_address_fields = func_get_additional_fields('', '', 'B'); +$smarty->assign('additional_address_fields', $additional_address_fields); + +/** * Additional fields */ $additional_fields = func_get_additional_fields(); @@ -310,7 +316,8 @@ // Sections $sections = array( 'A' => func_get_langvar_by_name('lbl_additional_information'), - 'P' => func_get_langvar_by_name('lbl_personal_information') + 'P' => func_get_langvar_by_name('lbl_personal_information'), + 'B' => func_get_langvar_by_name('lbl_address_book') ); // Field types Index: include/address_book.php @@ -68,9 +68,32 @@ && $main == 'checkout' ) { // Update request from customer area - if (!$is_anonymous) + if (!$is_anonymous) { $address_book = func_customer_save_address_book_indb($address_book, @$ship2diff, @$existing_address, @$new_address); + // Add additional address values + if (isset($address_book['S']['id']) && isset($additional_values['address']['S'])) { + func_save_additional_address_fields($logged_userid, $address_book['S']['id'], $additional_values['address']['S']); + } + if (isset($address_book['B']['id']) && isset($additional_values['address']['B'])) { + func_save_additional_address_fields($logged_userid, $address_book['B']['id'], $additional_values['address']['B']); + } + + // Update additional address values + if (isset($address_book['S']['id']) && isset($additional_values['address'][@$new_address['S']])) { + func_save_additional_address_fields($logged_userid, $address_book['S']['id'], $additional_values['address'][$new_address['S']]); + } + elseif (isset($address_book['S']['id']) && isset($additional_values['address'][@$existing_address['S']])) { + func_save_additional_address_fields($logged_userid, $address_book['S']['id'], $additional_values['address'][$existing_address['S']]); + } + if (isset($address_book['B']['id']) && isset($additional_values['address'][@$new_address['B']])) { + func_save_additional_address_fields($logged_userid, $address_book['B']['id'], $additional_values['address'][$new_address['B']]); + } + elseif (isset($address_book['B']['id']) && isset($additional_values['address'][@$existing_address['B']])) { + func_save_additional_address_fields($logged_userid, $address_book['B']['id'], $additional_values['address'][$existing_address['B']]); + } + } + $cart = func_customer_save_address_book_insession($cart, $address_book, @$ship2diff); } elseif ($current_area != 'C') { @@ -84,6 +107,17 @@ // Mark default address(es) func_admin_mark_default_addresses($logged_userid, $new_addressid); + // Update additional address value + foreach ($address_book as $__addressid => $__address_data) { + if (isset($additional_values['address'][$__addressid])) { + func_save_additional_address_fields($logged_userid, $__addressid, $additional_values['address'][$__addressid]); + } + } + + // Add additional address values + if (isset($additional_values['address']) && $new_addressid) { + func_save_additional_address_fields($logged_userid, $new_addressid, $additional_values['address']); + } } } Index: include/func/func.user.php @@ -618,7 +507,8 @@ $email = $userinfo['email']; // Get additional fields - $additional_fields = func_get_additional_fields($profile_area, $user); + $additional_fields = func_get_additional_fields($profile_area, $user, '', 0); + $userinfo['additional_fields'] = $additional_fields; // Get default fields @@ -721,10 +710,21 @@ function func_userinfo($user, $usertype ) { // Adjust addresses for logged in customer ($cart can be changed) list($cart, $userinfo) = func_adjust_customer_address($cart, $userinfo); } + if (isset($userinfo['address']['B']['id'])) { + $userinfo['additional_fields']['address']['B'] = func_get_additional_fields($userinfo['usertype'], $user, 'B', $userinfo['address']['B']['id']); + } else { + $userinfo['additional_fields']['address']['B'] = func_get_additional_fields($userinfo['usertype'], $user, 'B', 'B'); + } + if (isset($userinfo['address']['S']['id'])) { + $userinfo['additional_fields']['address']['S'] = func_get_additional_fields($userinfo['usertype'], $user, 'B', $userinfo['address']['S']['id']); + } else { + $userinfo['additional_fields']['address']['S'] = func_get_additional_fields($userinfo['usertype'], $user, 'B', 'S'); + } + // Add these fields for backward compatibility with 43x code like payment gateways $userinfo['phone'] = empty($userinfo['b_phone']) ? @$userinfo['s_phone'] : $userinfo['b_phone']; $userinfo['fax'] = empty($userinfo['b_fax']) ? @$userinfo['s_fax'] : $userinfo['b_fax']; if (empty($userinfo['language']) && (!empty($shop_language))) { @@ -1186,12 +1086,20 @@ /** * Get additional register fields settings */ -function func_get_additional_fields($area = '', $user = '') +function func_get_additional_fields($area = '', $user = '', $section = null, $address = null) { global $sql_tbl, $shop_language, $is_anonymous; $_anonymous_userinfo = func_get_anonymous_userinfo(); + $section_condition = empty($section) ? "$sql_tbl[register_fields].section <> ''" : "$sql_tbl[register_fields].section = '$section'"; + $address_condition = empty($address) ? "$sql_tbl[register_field_values].addressid = '0'" : "$sql_tbl[register_field_values].addressid = '$address'"; + + $_address_exists = func_query_first_cell("SELECT COUNT(id) FROM $sql_tbl[address_book] WHERE userid='$user' AND id='$address'") == 0 ? false : true; + $_value_exists = func_query_first_cell("SELECT COUNT(fieldid) FROM $sql_tbl[register_field_values] WHERE userid='$user' AND addressid='$address'") == 0 ? false : true; + + $join_type = (!$_address_exists || !$_value_exists) ? "LEFT JOIN" : "INNER JOIN"; + if ($area) { if (!is_array($area)) @@ -1201,11 +1109,11 @@ $required_condition = "($sql_tbl[register_fields].required LIKE '%" . implode("%' OR $sql_tbl[register_fields].required LIKE '%", $area) . "%')"; - $fields = func_query("SELECT $sql_tbl[register_fields].*, IF($avail_condition, 'Y', '') as avail, IF($required_condition, 'Y', '') as required, $sql_tbl[register_field_values].value FROM $sql_tbl[register_fields] LEFT JOIN $sql_tbl[register_field_values] ON $sql_tbl[register_fields].fieldid = $sql_tbl[register_field_values].fieldid AND $sql_tbl[register_field_values].userid = '$user' ORDER BY $sql_tbl[register_fields].section, $sql_tbl[register_fields].orderby"); + $fields = func_query("SELECT $sql_tbl[register_fields].*, IF($avail_condition, 'Y', '') as avail, IF($required_condition, 'Y', '') as required, $sql_tbl[register_field_values].value, $sql_tbl[register_field_values].addressid FROM $sql_tbl[register_fields] $join_type $sql_tbl[register_field_values] ON $sql_tbl[register_fields].fieldid = $sql_tbl[register_field_values].fieldid AND $sql_tbl[register_field_values].userid = '$user' AND $address_condition WHERE $section_condition ORDER BY $sql_tbl[register_fields].section, $sql_tbl[register_fields].orderby"); } else { - $fields = func_query("SELECT * FROM $sql_tbl[register_fields] ORDER BY section, orderby"); + $fields = func_query("SELECT * FROM $sql_tbl[register_fields] WHERE $section_condition ORDER BY section, orderby"); } @@ -1220,7 +1128,14 @@ ) { // Anonymous profile $fields[$k]['value'] = stripslashes($_anonymous_userinfo['additional_values'][$v['fieldid']]); - } + } + + if ( + ($address == 'B' || $address == 'S') + && isset($_anonymous_userinfo['additional_values']['address'][$address][$v['fieldid']]) + ) { + $fields[$k]['value'] = $_anonymous_userinfo['additional_values']['address'][$address][$v['fieldid']]; + } $fields[$k]['title'] = func_get_languages_alt("lbl_register_field_" . $v['fieldid'], $shop_language); @@ -1440,6 +1355,7 @@ if ( $v['required'] == "Y" && empty($userinfo['additional_fields'][$k]["value"]) + && $v['section'] != 'B' ) { return false; @@ -1448,6 +1364,28 @@ } + foreach (@$userinfo['additional_fields']['address']['B'] as $k => $v) { + if ( + @$v['required']['C'] == "Y" + && empty($v['value']) + ) { + + return false; + + } + } + + foreach (@$userinfo['additional_fields']['address']['S'] as $k => $v) { + if ( + @$v['required']['C'] == "Y" + && empty($v['value']) + ) { + + return false; + + } + } + } // Do not take required county fields into account if the county feature is disabled bt:89518 @@ -2162,6 +2100,86 @@ } /** + * Check address book additional field entries + * + * @param mixed $data Posted data + * @param mixed $fields_area Fields area + * + * @return array + * @see ____func_see____ + */ +function func_check_additional_address_fields($data, $fields_area) +{ + if (empty($data)) { + return false; + } + + $result = array('status' => true, 'errors' => array()); + + $additional_address_fields = func_get_additional_fields($fields_area, null, 'B'); + + foreach($additional_address_fields as $field) { + if ( + $field['avail'] == 'Y' + && $field['required'] == 'Y' + && ( + !isset($data[$field['fieldid']]) + || empty($data[$field['fieldid']]) + ) + ) { + $result['status'] = false; + $result['errors'][] = func_reg_error(14); + + return $result; + } + } + + return $result; +} + +/** + * Save additional address fields + * + * @param int $userid User ID + * @param int $addressid Address ID + * @param array $data + * + * @return mixed + * @see ____func_see____ + */ +function func_save_additional_address_fields($userid, $addressid, $data=array()) { + + if (empty($data) || !is_array($data)) { + return false; + } + + if ( + abs(intval($userid)) != $userid + || $userid <= 0 + ) { + return false; + } + + $saved_data = array(); + + foreach ($data as $key => $value) { + $saved_data[] = array ( + 'userid' => $userid, + 'fieldid' => $key, + 'value' => $value, + 'addressid' => $addressid + ); + } + + // Perform add/update + foreach ($saved_data as $key => $value) { + func_array2insert('register_field_values', $value, true); + } + + return $saved_data; +} + +/** * Delete address entry * * @param int $addressid Address ID @@ -2179,7 +2197,10 @@ } - return db_query("DELETE FROM $sql_tbl[address_book] WHERE id='$addressid'"); + $result1 = db_query("DELETE FROM $sql_tbl[register_field_values] WHERE addressid='$addressid'"); + $result2 = db_query("DELETE FROM $sql_tbl[address_book] WHERE id='$addressid'"); + + return $result1 && $result2; } /** Index: include/register.php @@ -184,6 +184,17 @@ $default_fields = func_get_default_fields($fields_area); $address_fields = func_get_default_fields($fields_area, 'address_book'); +if (isset($userinfo['address']['B']['id'])) { + $additional_b_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', $userinfo['address']['B']['id']); +} else { + $additional_b_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', 'B'); +} +if (isset($userinfo['address']['S']['id'])) { + $additional_s_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', $userinfo['address']['S']['id']); +} else { + $additional_s_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', 'S'); +} + $name_fields = array(); $is_areas = func_get_profile_areas($fields_area); @@ -498,6 +509,7 @@ foreach ($additional_fields as $v) { if ( $v['required'] == 'Y' + && $v['section'] != 'B' && empty($additional_values[$v['fieldid']]) && $v['avail'] == 'Y' && !$is_admin_editor @@ -506,6 +518,31 @@ break; } } + + if ( + $ship2diff + && isset($additional_values['address']['S']) + ) { + $additional_address_fields_check_result = func_check_additional_address_fields($additional_values['address']['S'], $fields_area); + } + elseif ( + !$ship2diff + && isset($additional_values['address']['B']) + ) { + $additional_address_fields_check_result = func_check_additional_address_fields($additional_values['address']['B'], $fields_area); + } + + if ( + !empty($additional_address_fields_check_result['errors']) + ) { + $fillerror = true; + } + elseif ( + !$ship2diff + && isset($additional_values['address']['B']) + ) { + $additional_values['address']['S'] = $additional_values['address']['B']; + } } // Check email @@ -833,18 +870,21 @@ ); } - db_query("DELETE FROM $sql_tbl[register_field_values] WHERE userid = '$logged_userid'"); + db_query("DELETE FROM $sql_tbl[register_field_values] WHERE userid = '$logged_userid' AND addressid = 0"); if (!empty($additional_values)) { foreach ($additional_values as $k => $v) { - func_array2insert( - 'register_field_values', - array( - 'fieldid' => $k, - 'userid' => $logged_userid, - 'value' => $v, - ) - ); + if ($k != 'address') { + func_array2insert( + 'register_field_values', + array( + 'fieldid' => $k, + 'userid' => $logged_userid, + 'value' => $v, + 'addressid' => 0 + ) + ); + } } } @@ -1044,20 +1084,21 @@ $new_user_flag = true; - db_query("DELETE FROM $sql_tbl[register_field_values] WHERE userid = '$newuserid'"); - - if ($additional_values) { + db_query("DELETE FROM $sql_tbl[register_field_values] WHERE userid = '$newuserid' AND addressid = 0"); + if (!empty($additional_values)) { foreach ($additional_values as $k => $v) { - - func_array2insert( - 'register_field_values', - array( - 'fieldid' => $k, - 'userid' => $newuserid, - 'value' => $v, - ) - ); + if ($k != 'address') { + func_array2insert( + 'register_field_values', + array( + 'fieldid' => $k, + 'userid' => $newuserid, + 'value' => $v, + 'addressid' => 0 + ) + ); + } } } @@ -1846,6 +1887,23 @@ $smarty->assign('additional_fields', $additional_fields); $smarty->assign('is_areas', $is_areas); +$smarty->assign('additional_b_address_fields', $additional_b_address_fields); +$smarty->assign('additional_s_address_fields', $additional_s_address_fields); + +if (!empty($address_book)) { + $additional_address_fields = array(); + $additional_address_fields['0'] = func_get_additional_fields(@$userinfo['usertype'], @$userinfo['id'], 'B'); + foreach($address_book as $_ab_record) { + $additional_address_fields[$_ab_record['id']] = func_get_additional_fields(@$userinfo['usertype'], @$userinfo['id'], 'B', $_ab_record['id']); + } + $additional_address_fields['avail'] = 'Y'; + $smarty->assign('additional_address_fields', $additional_address_fields); +} else { + $additional_address_fields['B'] = $additional_b_address_fields; + $additional_address_fields['S'] = $additional_s_address_fields; +} + + if (!empty($av_error)) $smarty->assign('av_error', $av_error); Index: modules/One_Page_Checkout/func.php @@ -87,6 +87,20 @@ $smarty->assign('need_address_info', true); $smarty->assign('force_change_address', true); $smarty->assign('address_fields', func_get_default_fields('H', 'address_book')); + + if (isset($userinfo['address']['B']['id'])) { + $additional_b_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', $userinfo['address']['B']['id']); + } else { + $additional_b_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', 'B'); + } + if (isset($userinfo['address']['S']['id'])) { + $additional_s_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', $userinfo['address']['S']['id']); + } else { + $additional_s_address_fields = func_get_additional_fields($fields_area, $logged_userid, 'B', 'S'); + } + + $smarty->assign('additional_b_address_fields', $additional_b_address_fields); + $smarty->assign('additional_s_address_fields', $additional_s_address_fields); } $smarty->assign( Index: popup_address.php @@ -170,8 +170,10 @@ if (($mode == 'update' || $mode == 'add') && !empty($posted_data)) { $result = func_check_address($posted_data, 'C'); + $additional_result = func_check_additional_address_fields($additional_values, 'C'); + + if (!empty($result['errors']) || !empty($additional_result['errors'])) { - if (!empty($result['errors'])) { $errors = $result['errors']; // Prepare errors data @@ -184,9 +186,20 @@ $reg_error = func_prepare_error($errors); $reg_error['saved_data'] = func_stripslashes($posted_data); + + $reg_error['additional_data'] = func_stripslashes($additional_values); + + $reg_error['address_id'] = $id; } else { $result = func_save_address($logged_userid, $id, $posted_data); + + // Add/update additional address fields + $_aid = !empty($id) ? $id : $result['addressid']; + func_save_additional_address_fields($logged_userid, $_aid, $additional_values); + + $reg_error = array(); + $res = true; } } @@ -245,15 +258,7 @@ func_close_window(); } - // Assign error data - if (!empty($reg_error)) { - $smarty->assign('reg_error', $reg_error); - $smarty->assign('address', func_prepare_address($reg_error['saved_data'])); - $reg_error = array(); - } else { - $smarty->assign('address', $address); - } - + $smarty->assign('address', $address); $smarty->assign('id', $id); } else { @@ -263,6 +268,12 @@ $smarty->assign('is_address_book_empty', $is_address_book_empty); } +// Assign error data +if (!empty($reg_error) && $reg_error['address_id'] == $id ) { + $smarty->assign('reg_error', $reg_error); + $smarty->assign('address', func_prepare_address($reg_error['saved_data'])); +} + // Address validation error for anonymous customers if ( $av_error @@ -306,6 +317,25 @@ $default_fields = func_get_default_fields('C', 'address_book'); $smarty->assign('default_fields', $default_fields); +/** + * Additional address fields + */ +$additional_address_fields = func_get_additional_fields('C', $logged_userid, 'B', $id); + +if ( + !empty($reg_error['additional_data']) && $reg_error['address_id'] == $id +) { + foreach($additional_address_fields as $_a_key => $_a_field) { + if ( + isset($reg_error['additional_data'][$_a_field['fieldid']]) + ) { + $additional_address_fields[$_a_key]['value'] = $reg_error['additional_data'][$_a_field['fieldid']]; + } + } +} + +$smarty->assign('additional_address_fields', $additional_address_fields); + // Assign smarty variables $smarty->assign('mode', $mode); $smarty->assign('for', $for); Index: skin/common_files/admin/main/user_profiles.tpl @@ -81,6 +81,12 @@ {/foreach} +{foreach from=$additional_address_fields item=v key=k} + {if $v.section eq "B"} + {include file="admin/main/user_profiles_row.tpl" title=$v.title|default:$v.field name_prefix="add" field=$v.fieldid idprefix="ab" required=$v.required avail=$v.avail} + {/if} +{/foreach} + {*** / Address book ***} {foreach from=$additional_fields item=v key=k} Index: skin/common_files/customer/main/address_fields.tpl @@ -134,6 +134,15 @@ {/if} + + {if $address_type eq 'B'} + {include file="main/additional_address_fields.tpl" ex_additional_address_fields=$additional_b_address_fields type=$address_type require_aid='Y'} + {elseif $address_type eq 'S'} + {include file="main/additional_address_fields.tpl" ex_additional_address_fields=$additional_s_address_fields type=$address_type require_aid='Y'} + {else} + {include file="main/additional_address_fields.tpl" ex_additional_address_fields=$additional_address_fields} + {/if} + {if $update_address_book eq 'Y' and $login ne ''}   Index: skin/common_files/mail/html/order_invoice.tpl @@ -227,13 +227,11 @@ {/if} - {foreach from=$_userinfo.additional_fields item=v} - {if $v.section eq 'B'} + {foreach from=$order.extra.additional_fields.address.B item=v} {$v.title}: {$v.value} - {/if} {/foreach} @@ -321,13 +319,11 @@ {/if} - {foreach from=$_userinfo.additional_fields item=v} - {if $v.section eq 'S'} + {foreach from=$order.extra.additional_fields.address.S item=v} {$v.title}: {$v.value} - {/if} {/foreach} Index: skin/common_files/mail/order_invoice.tpl @@ -71,9 +71,9 @@ {/if} {if $_userinfo.default_address_fields.fax}{$lng.lbl_fax|mail_truncate}{$order.b_fax} {/if} -{foreach from=$_userinfo.additional_fields item=v}{if $v.section eq 'B'} +{foreach from=$order.extra.additional_fields.address.B item=v} {$v.title|mail_truncate}{$v.value} -{/if}{/foreach} +{/foreach} {$lng.lbl_shipping_address}: ----------------- @@ -101,9 +101,10 @@ {/if} {if $_userinfo.default_address_fields.fax}{$lng.lbl_fax|mail_truncate}{$order.s_fax} {/if} -{foreach from=$_userinfo.additional_fields item=v}{if $v.section eq 'S'} +{foreach from=$order.extra.additional_fields.address.S item=v} {$v.title|mail_truncate}{$v.value} -{/if}{/foreach}{assign var="is_header" value=""} +{/foreach}{assign var="is_header" value=""} + {foreach from=$_userinfo.additional_fields item=v}{if $v.section eq 'A'} {if $is_header ne 'Y'} Index: skin/common_files/main/address_fields.tpl @@ -147,6 +147,16 @@ {/if} + {if $additional_address_fields.avail ne 'Y'} + {assign var=ex_additional_address_fields value=$additional_address_fields} + {elseif $additional_address_fields.$id ne ''} + {assign var=ex_additional_address_fields value=$additional_address_fields.$id} + {else} + {assign var=ex_additional_address_fields value=$additional_address_fields.0} + {/if} + + {include file="main/additional_address_fields.tpl" ex_additional_address_fields=$ex_additional_address_fields require_aid='Y'} + Index: skin/common_files/main/order_info.tpl @@ -465,7 +465,7 @@ {/if} -{foreach from=$customer.additional_fields item=v} +{foreach from=$order.extra.additional_fields.address.B item=v} {if $v.section eq 'B'}   {$v.title} @@ -560,8 +560,8 @@ {/if} -{foreach from=$customer.additional_fields item=v} -{if $v.section eq 'S'} +{foreach from=$order.extra.additional_fields.address.S item=v} +{if $v.section eq 'B'}   {$v.title} {$v.value} @@ -569,6 +569,10 @@ {/if} {/foreach} + +   + + {assign var="is_header" value=""} {foreach from=$customer.additional_fields item=v} {if $v.section eq 'A'} Index: skin/common_files/modules/Advanced_Order_Management/edit_customer.tpl @@ -217,20 +217,8 @@ {$customer.s_fax} {/if} -{foreach from=$cart_customer.additional_fields item=v key=k} -{if $v.section eq 'B'} - - {$v.title} - - - - - - - {$v.value} - -{/if} -{/foreach} + +{include file="main/additional_address_fields.tpl" ex_additional_address_fields=$cart_customer.additional_fields.address.B type='B'}   @@ -338,21 +326,7 @@ {/if} - -{foreach from=$cart_customer.additional_fields item=v key=k} -{if $v.section eq 'S'} - - - - - -{$v.title} - - - {$v.value} - -{/if} -{/foreach} +{include file="main/additional_address_fields.tpl" ex_additional_address_fields=$cart_customer.additional_fields.address.S type='S'} {assign var="is_header" value=""} {foreach from=$cart_customer.additional_fields item=v key=k} Index: skin/common_files/modules/One_Page_Checkout/profile/address_fields.tpl @@ -76,6 +76,14 @@ {/if} +{if $type eq 'S'} + {assign var=ex_additional_address_fields value=$additional_s_address_fields} +{else} + {assign var=ex_additional_address_fields value=$additional_b_address_fields} +{/if} + +{include file="main/additional_address_fields.tpl" ex_additional_address_fields=$ex_additional_address_fields require_aid='Y' ex_list_view='Y'} + {if $type eq 'S'} Index: skin/common_files/main/additional_address_fields.tpl new file mode 100644 @@ -0,0 +1,78 @@ +{* +$Id: additional_address_fields.tpl,v 1.1 2012/01/04 13:32:40 mixon Exp $ +vim: set ts=2 sw=2 sts=2 et: +*} +{foreach from=$ex_additional_address_fields item=v key=k} + + {if $main eq 'order_edit' and $type ne ''} {* for AOM order edit *} + + + + + + {$v.title} + + {$v.value} + + + {else} {* for all other places *} + + {if $v.section eq 'B' and $v.avail eq 'Y'} + + {if $require_aid and $v.addressid eq ''} + {if $usertype ne 'C'} + {assign var="ex_address_id" value='address_'} + {assign var="ex_address_name" value='[address]'} + {else} + {assign var="ex_address_id" value='address_'|cat:$type|cat:'_'} + {assign var="ex_address_name" value='[address]['|cat:$type|cat:']'} + {/if} + {else} + {assign var="ex_address_id" value='address_'|cat:$v.addressid|cat:'_'} + {assign var="ex_address_name" value='[address]['|cat:$v.addressid|cat:']'} + {/if} + + {if $ex_list_view eq 'Y'} +
  • +
    +
    + {else} + + + {/if} + + {if $ex_list_view eq 'Y'} + {if $v.required eq 'Y'}*{else} {/if}
    + {else} + + *{else}> {/if} + {/if} + {if $ex_list_view eq 'Y'} +
    + {else} + + {/if} + {if $v.type eq 'T'} + + {elseif $v.type eq 'C'} + + {elseif $v.type eq 'S'} + + {/if} + {if $ex_list_view eq 'Y'} +
    +
    +
  • + {else} + + + {/if} + + {/if} + + {/if} +{/foreach}