示例#1
0
	function PrintPropsForm($arSource = array(), $locationTemplate = ".default")
	{
		if (!empty($arSource))
		{
			?>
				<div>
					<?
					foreach($arSource as $arProperties)
					{
						if ($arProperties["TYPE"] == "CHECKBOX")
						{
							?>
							<input type="hidden" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="">

							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r1x3 pt8"><input type="checkbox" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="Y"<?if ($arProperties["CHECKED"]=="Y") echo " checked";?>></div>

							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXT")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1"><input type="text" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"></div>
							<div style="clear: both;"></div><br/>
							<?
						}
						elseif ($arProperties["TYPE"] == "SELECT")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "MULTISELECT")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select multiple name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXTAREA")
						{
							$rows = ($arProperties["SIZE2"] > 10) ? 4 : $arProperties["SIZE2"];
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<textarea rows="<?php 
echo $rows;
?>
" cols="<?php 
echo $arProperties["SIZE1"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"><?php 
echo $arProperties["VALUE"];
?>
</textarea>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "LOCATION")
						{
							$value = 0;
							if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0)
							{
								foreach ($arProperties["VARIANTS"] as $arVariant)
								{
									if ($arVariant["SELECTED"] == "Y")
									{
										$value = $arVariant["ID"];
										break;
									}
								}
							}
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?
								$GLOBALS["APPLICATION"]->IncludeComponent(
									"bitrix:sale.ajax.locations",
									$locationTemplate,
									array(
										"AJAX_CALL" => "N",
										"COUNTRY_INPUT_NAME" => "COUNTRY",
										"REGION_INPUT_NAME" => "REGION",
										"CITY_INPUT_NAME" => $arProperties["FIELD_NAME"],
										"CITY_OUT_LOCATION" => "Y",
										"LOCATION_VALUE" => $value,
										"ORDER_PROPS_ID" => $arProperties["ID"],
										"ONCITYCHANGE" => ($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitForm()" : "",
										"SIZE1" => $arProperties["SIZE1"],
									),
									null,
									array('HIDE_ICONS' => 'Y')
								);
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "RADIO")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?
								if (is_array($arProperties["VARIANTS"]))
								{
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<input
											type="radio"
											name="<?php 
echo $arProperties["FIELD_NAME"];
?>
"
											id="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"
											value="<?php 
echo $arVariants["VALUE"];
?>
" <?if($arVariants["CHECKED"] == "Y") echo " checked";?> />

										<label for="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"><?php 
echo $arVariants["NAME"];
?>
</label></br>
									<?
									endforeach;
								}
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "FILE")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?php 
echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
?>
							</div>

							<div style="clear: both;"></div><br/>
							<?
						}
					}
					?>
				</div>
			<?
		}
	}
示例#2
0
    function PrintPropsForm($arSource = array(), $locationTemplate = ".default")
    {
        if (!empty($arSource)) {
            ?>
				<div>
					<?php 
            foreach ($arSource as $arProperties) {
                ?>
						<div data-property-id-row="<?php 
                echo intval(intval($arProperties["ID"]));
                ?>
">

						<?php 
                if ($arProperties["TYPE"] == "CHECKBOX") {
                    ?>
							<input type="hidden" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" value="">

							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r1x3 pt8">
								<input type="checkbox" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" value="Y"<?php 
                    if ($arProperties["CHECKED"] == "Y") {
                        echo " checked";
                    }
                    ?>
>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>

							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "TEXT") {
                    ?>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<input type="text" maxlength="250" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
" value="<?php 
                    echo $arProperties["VALUE"];
                    ?>
" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" />

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>
							<div style="clear: both;"></div><br/>
							<?php 
                } elseif ($arProperties["TYPE"] == "SELECT") {
                    ?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<select name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
">
									<?php 
                    foreach ($arProperties["VARIANTS"] as $arVariants) {
                        ?>
										<option value="<?php 
                        echo $arVariants["VALUE"];
                        ?>
"<?php 
                        if ($arVariants["SELECTED"] == "Y") {
                            echo " selected";
                        }
                        ?>
><?php 
                        echo $arVariants["NAME"];
                        ?>
</option>
									<?php 
                    }
                    ?>
								</select>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>
							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "MULTISELECT") {
                    ?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<select multiple name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
">
									<?php 
                    foreach ($arProperties["VARIANTS"] as $arVariants) {
                        ?>
										<option value="<?php 
                        echo $arVariants["VALUE"];
                        ?>
"<?php 
                        if ($arVariants["SELECTED"] == "Y") {
                            echo " selected";
                        }
                        ?>
><?php 
                        echo $arVariants["NAME"];
                        ?>
</option>
									<?php 
                    }
                    ?>
								</select>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>
							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "TEXTAREA") {
                    $rows = $arProperties["SIZE2"] > 10 ? 4 : $arProperties["SIZE2"];
                    ?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<textarea rows="<?php 
                    echo $rows;
                    ?>
" cols="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
"><?php 
                    echo $arProperties["VALUE"];
                    ?>
</textarea>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>
							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "LOCATION") {
                    ?>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">

								<?php 
                    $value = 0;
                    if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0) {
                        foreach ($arProperties["VARIANTS"] as $arVariant) {
                            if ($arVariant["SELECTED"] == "Y") {
                                $value = $arVariant["ID"];
                                break;
                            }
                        }
                    }
                    // here we can get '' or 'popup'
                    // map them, if needed
                    if (CSaleLocation::isLocationProMigrated()) {
                        $locationTemplateP = $locationTemplate == 'popup' ? 'search' : 'steps';
                        $locationTemplateP = $_REQUEST['PERMANENT_MODE_STEPS'] == 1 ? 'steps' : $locationTemplateP;
                        // force to "steps"
                    }
                    ?>

								<?php 
                    if ($locationTemplateP == 'steps') {
                        ?>
									<input type="hidden" id="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
                        echo intval($arProperties["ID"]);
                        ?>
]" name="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
                        echo intval($arProperties["ID"]);
                        ?>
]" value="<?php 
                        echo $_REQUEST['LOCATION_ALT_PROP_DISPLAY_MANUAL'][intval($arProperties["ID"])] ? '1' : '0';
                        ?>
" />
								<?php 
                    }
                    ?>

								<?php 
                    CSaleLocation::proxySaleAjaxLocationsComponent(array("AJAX_CALL" => "N", "COUNTRY_INPUT_NAME" => "COUNTRY", "REGION_INPUT_NAME" => "REGION", "CITY_INPUT_NAME" => $arProperties["FIELD_NAME"], "CITY_OUT_LOCATION" => "Y", "LOCATION_VALUE" => $value, "ORDER_PROPS_ID" => $arProperties["ID"], "ONCITYCHANGE" => $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" ? "submitForm()" : "", "SIZE1" => $arProperties["SIZE1"]), array("ID" => $value, "CODE" => "", "SHOW_DEFAULT_LOCATIONS" => "Y", "JS_CALLBACK" => "submitFormProxy", "JS_CONTROL_DEFERRED_INIT" => intval($arProperties["ID"]), "JS_CONTROL_GLOBAL_ID" => intval($arProperties["ID"]), "DISABLE_KEYBOARD_INPUT" => "Y", "PRECACHE_LAST_LEVEL" => "Y", "PRESELECT_TREE_TRUNK" => "Y", "SUPPRESS_ERRORS" => "Y"), $locationTemplateP, true, 'location-block-wrapper');
                    ?>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>

							</div>
							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "RADIO") {
                    ?>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<?php 
                    if (is_array($arProperties["VARIANTS"])) {
                        foreach ($arProperties["VARIANTS"] as $arVariants) {
                            ?>
										<input
											type="radio"
											name="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
"
											id="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
_<?php 
                            echo $arVariants["VALUE"];
                            ?>
"
											value="<?php 
                            echo $arVariants["VALUE"];
                            ?>
" <?php 
                            if ($arVariants["CHECKED"] == "Y") {
                                echo " checked";
                            }
                            ?>
 />

										<label for="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
_<?php 
                            echo $arVariants["VALUE"];
                            ?>
"><?php 
                            echo $arVariants["NAME"];
                            ?>
</label></br>
									<?php 
                        }
                    }
                    ?>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>
							<div style="clear: both;"></div>
							<?php 
                } elseif ($arProperties["TYPE"] == "FILE") {
                    ?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
                    echo $arProperties["NAME"];
                    ?>
								<?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
									<span class="bx_sof_req">*</span>
								<?php 
                    }
                    ?>
							</div>

							<div class="bx_block r3x1">
								<?php 
                    echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
                    ?>

								<?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
								<div class="bx_description">
									<?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
								</div>
								<?php 
                    }
                    ?>
							</div>

							<div style="clear: both;"></div><br/>
							<?php 
                }
                ?>
						</div>

						<?php 
                if (CSaleLocation::isLocationProEnabled()) {
                    ?>

							<?php 
                    $propertyAttributes = array('type' => $arProperties["TYPE"], 'valueSource' => $arProperties['SOURCE'] == 'DEFAULT' ? 'default' : 'form');
                    if (intval($arProperties['IS_ALTERNATE_LOCATION_FOR'])) {
                        $propertyAttributes['isAltLocationFor'] = intval($arProperties['IS_ALTERNATE_LOCATION_FOR']);
                    }
                    if (intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION'])) {
                        $propertyAttributes['altLocationPropId'] = intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION']);
                    }
                    if ($arProperties['IS_ZIP'] == 'Y') {
                        $propertyAttributes['isZip'] = true;
                    }
                    ?>

							<script>

								<?php 
                    // add property info to have client-side control on it
                    ?>
								(window.top.BX || BX).saleOrderAjax.addPropertyDesc(<?php 
                    echo CUtil::PhpToJSObject(array('id' => intval($arProperties["ID"]), 'attributes' => $propertyAttributes));
                    ?>
);

							</script>
						<?php 
                }
                ?>

						<?php 
            }
            ?>
				</div>
			<?php 
        }
    }
示例#3
0
	function PrintPropsForm($arSource = array(), $locationTemplate = ".default")
	{
		if (!empty($arSource))
		{
			?>
				<div>
					<?
					foreach ($arSource as $arProperties)
					{
						if(CSaleLocation::isLocationProMigrated())
						{
							$propertyAttributes = array(
								'type' => $arProperties["TYPE"],
								'valueSource' => $arProperties['SOURCE'] == 'DEFAULT' ? 'default' : 'form'
							);

							if(intval($arProperties['IS_ALTERNATE_LOCATION_FOR']))
								$propertyAttributes['isAltLocationFor'] = intval($arProperties['IS_ALTERNATE_LOCATION_FOR']);

							if(intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION']))
								$propertyAttributes['altLocationPropId'] = intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION']);

							if($arProperties['IS_ZIP'] == 'Y')
								$propertyAttributes['isZip'] = true;
						}
						?>
						<div data-property-id-row="<?php 
echo intval(intval($arProperties["ID"]));
?>
">

						<?
						if ($arProperties["TYPE"] == "CHECKBOX")
						{
							?>
							<input type="hidden" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="">

							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r1x3 pt8">
								<input type="checkbox" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="Y"<?if ($arProperties["CHECKED"]=="Y") echo " checked";?>>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>

							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXT")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<input type="text" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" />

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>
							<div style="clear: both;"></div><br/>
							<?
						}
						elseif ($arProperties["TYPE"] == "SELECT")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "MULTISELECT")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select multiple name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXTAREA")
						{
							$rows = ($arProperties["SIZE2"] > 10) ? 4 : $arProperties["SIZE2"];
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<textarea rows="<?php 
echo $rows;
?>
" cols="<?php 
echo $arProperties["SIZE1"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"><?php 
echo $arProperties["VALUE"];
?>
</textarea>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "LOCATION")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">

								<?
								$value = 0;
								if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0)
								{
									foreach ($arProperties["VARIANTS"] as $arVariant)
									{
										if ($arVariant["SELECTED"] == "Y")
										{
											$value = $arVariant["ID"];
											break;
										}
									}
								}

								// here we can get '' or 'popup'
								// map them, if needed
								if(CSaleLocation::isLocationProMigrated())
								{
									$locationTemplate = $locationTemplate == 'popup' ? 'search' : 'steps';
									$locationTemplate = $_REQUEST['PERMANENT_MODE_STEPS'] == 1 ? 'steps' : $locationTemplate; // force to "steps"
								}
								?>

								<?if($locationTemplate == 'steps'):?>
									<input type="hidden" id="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
echo intval($arProperties["ID"]);
?>
]" name="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
echo intval($arProperties["ID"]);
?>
]" value="<?php 
echo $_REQUEST['LOCATION_ALT_PROP_DISPLAY_MANUAL'][intval($arProperties["ID"])] ? '1' : '0';
?>
" />
								<?endif?>

								<?CSaleLocation::proxySaleAjaxLocationsComponent(array(
									"AJAX_CALL" => "N",
									"COUNTRY_INPUT_NAME" => "COUNTRY",
									"REGION_INPUT_NAME" => "REGION",
									"CITY_INPUT_NAME" => $arProperties["FIELD_NAME"],
									"CITY_OUT_LOCATION" => "Y",
									"LOCATION_VALUE" => $value,
									"ORDER_PROPS_ID" => $arProperties["ID"],
									"ONCITYCHANGE" => ($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitForm()" : "",
									"SIZE1" => $arProperties["SIZE1"],
								),
								array(
									"ID" => $value,
									"CODE" => "",
									"SHOW_DEFAULT_LOCATIONS" => "Y",

									// function called on each location change caused by user or by program
									// it may be replaced with global component dispatch mechanism coming soon
									"JS_CALLBACK" => "submitFormProxy", //($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitFormProxy" : "",

									// function window.BX.locationsDeferred['X'] will be created and lately called on each form re-draw.
									// it may be removed when sale.order.ajax will use real ajax form posting with BX.ProcessHTML() and other stuff instead of just simple iframe transfer
									"JS_CONTROL_DEFERRED_INIT" => intval($arProperties["ID"]),

									// an instance of this control will be placed to window.BX.locationSelectors['X'] and lately will be available from everywhere
									// it may be replaced with global component dispatch mechanism coming soon
									"JS_CONTROL_GLOBAL_ID" => intval($arProperties["ID"]),

									"DISABLE_KEYBOARD_INPUT" => 'Y',
									"PRECACHE_LAST_LEVEL" => "Y",
								),
								$locationTemplate,
								true,
								'location-block-wrapper'
								)?>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>

							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "RADIO")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?
								if (is_array($arProperties["VARIANTS"]))
								{
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<input
											type="radio"
											name="<?php 
echo $arProperties["FIELD_NAME"];
?>
"
											id="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"
											value="<?php 
echo $arVariants["VALUE"];
?>
" <?if($arVariants["CHECKED"] == "Y") echo " checked";?> />

										<label for="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"><?php 
echo $arVariants["NAME"];
?>
</label></br>
									<?
									endforeach;
								}
								?>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "FILE")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?php 
echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
?>

								<?
								if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
								?>
								<div class="bx_description">
									<?php 
echo $arProperties["DESCRIPTION"];
?>
								</div>
								<?
								endif;
								?>
							</div>

							<div style="clear: both;"></div><br/>
							<?
						}
						?>
						</div>

						<?if(CSaleLocation::isLocationProEnabled()):?>
							<script>

								(window.top.BX || BX).saleOrderAjax.addPropertyDesc(<?php 
echo CUtil::PhpToJSObject(array('id' => intval($arProperties["ID"]), 'attributes' => $propertyAttributes));
?>
);

							</script>
						<?endif?>

						<?
					}
					?>
				</div>
			<?
		}
	}
示例#4
0
    function PrintPropsForm($arSource = array(), $locationTemplate = ".default", $arResult)
    {
        if (!empty($arSource)) {
            ?>
                    <?php 
            foreach ($arSource as $arProperties) {
                ?>

                            <div class="order_form_<?php 
                echo $arProperties["TYPE"] == "TEXTAREA" ? 'textarea' : ($arProperties["TYPE"] == "LOCATION" ? 'select' : 'input');
                ?>
">
                                <?php 
                if ($arProperties["TYPE"] == "CHECKBOX") {
                    ?>
                                    <input type="hidden" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" value="">

                                    <div class="bx_block r1x3 pt8">
                                        <?php 
                    echo $arProperties["NAME"];
                    ?>
                                        <?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
                                            <span class="bx_sof_req">*</span>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <div class="bx_block r1x3 pt8">
                                        <input type="checkbox" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" value="Y"<?php 
                    if ($arProperties["CHECKED"] == "Y") {
                        echo " checked";
                    }
                    ?>
>

                                        <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                            <div class="bx_description">
                                                <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                            </div>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <div style="clear: both;"></div>
                                    <?php 
                } elseif ($arProperties["TYPE"] == "TEXT") {
                    $style = "";
                    if ($arProperties["IS_EMAIL"] == "Y" && $arResult["USER_VALS"]["FINAL_STEP"] == "Y" && check_email($arProperties["VALUE"]) == false) {
                        $style = "background-color: #F9D2D2;";
                    }
                    ?>

                                    <label><?php 
                    echo $arProperties["NAME"];
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
<span class="ico"></span><?php 
                    }
                    ?>
</label>	
                                         <input style="<?php 
                    echo $style;
                    ?>
" class="text <?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
req<?php 
                    }
                    ?>
" type="text" maxlength="250" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
" value="<?php 
                    echo $arProperties["VALUE"];
                    ?>
" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
">
																																								
                                        <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                            <i>
                                                <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                            </i>
                                        <?php 
                    }
                    ?>
                                    <?php 
                } elseif ($arProperties["TYPE"] == "SELECT") {
                    ?>
                                    <label><?php 
                    echo $arProperties["NAME"];
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
<span class="ico"></span><?php 
                    }
                    ?>
</label>
                                    <select name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
">
                                        <?php 
                    foreach ($arProperties["VARIANTS"] as $arVariants) {
                        ?>
                                            <option value="<?php 
                        echo $arVariants["VALUE"];
                        ?>
"<?php 
                        if ($arVariants["SELECTED"] == "Y") {
                            echo " selected";
                        }
                        ?>
><?php 
                        echo $arVariants["NAME"];
                        ?>
</option>
                                        <?php 
                    }
                    ?>
                                    </select>
                                    <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                        <i>
                                            <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                        </i>
                                    <?php 
                    }
                } elseif ($arProperties["TYPE"] == "MULTISELECT") {
                    ?>
                                    <label><?php 
                    echo $arProperties["NAME"];
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
<span class="ico"></span><?php 
                    }
                    ?>
</label>
                                    <select multiple name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" size="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
">
                                        <?php 
                    foreach ($arProperties["VARIANTS"] as $arVariants) {
                        ?>
                                            <option value="<?php 
                        echo $arVariants["VALUE"];
                        ?>
"<?php 
                        if ($arVariants["SELECTED"] == "Y") {
                            echo " selected";
                        }
                        ?>
><?php 
                        echo $arVariants["NAME"];
                        ?>
</option>
                                        <?php 
                    }
                    ?>
                                    </select>

                                    <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                        <i>
                                            <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                        </i>
                                    <?php 
                    }
                } elseif ($arProperties["TYPE"] == "TEXTAREA") {
                    $rows = $arProperties["SIZE2"] > 10 ? 4 : $arProperties["SIZE2"];
                    ?>
                                    <label><?php 
                    echo $arProperties["NAME"];
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
<span class="ico"></span><?php 
                    }
                    ?>
</label>
                                        <textarea rows="<?php 
                    echo $rows;
                    ?>
" cols="<?php 
                    echo $arProperties["SIZE1"];
                    ?>
" name="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
" id="<?php 
                    echo $arProperties["FIELD_NAME"];
                    ?>
"><?php 
                    echo $arProperties["VALUE"];
                    ?>
</textarea>

                                        <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                            <i>
                                                <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                            </i>
                                        <?php 
                    }
                    ?>
                                    <?php 
                } elseif ($arProperties["TYPE"] == "LOCATION") {
                    $value = 0;
                    if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0) {
                        foreach ($arProperties["VARIANTS"] as $arVariant) {
                            if ($arVariant["SELECTED"] == "Y") {
                                $value = $arVariant["ID"];
                                break;
                            }
                        }
                    }
                    ?>
<label>Ваше местоположение</label>
                                    <?php 
                    $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:sale.ajax.locations", $locationTemplate, array("AJAX_CALL" => "N", "COUNTRY_INPUT_NAME" => "COUNTRY", "REGION_INPUT_NAME" => "REGION", "CITY_INPUT_NAME" => $arProperties["FIELD_NAME"], "CITY_OUT_LOCATION" => "Y", "LOCATION_VALUE" => $value, "ORDER_PROPS_ID" => $arProperties["ID"], "ONCITYCHANGE" => "submitForm()", "SIZE1" => $arProperties["SIZE1"]), null, array('HIDE_ICONS' => 'Y'));
                    ?>

                                    <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                    <i>
                                        <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                    </i>
                                    <?php 
                    }
                } elseif ($arProperties["TYPE"] == "RADIO") {
                    ?>
                                    <div class="bx_block r1x3 pt8">
                                        <?php 
                    echo $arProperties["NAME"];
                    ?>
                                        <?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
                                            <span class="bx_sof_req">*</span>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <div class="bx_block r3x1">
                                        <?php 
                    if (is_array($arProperties["VARIANTS"])) {
                        foreach ($arProperties["VARIANTS"] as $arVariants) {
                            ?>
                                                <input
                                                    type="radio"
                                                    name="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
"
                                                    id="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
_<?php 
                            echo $arVariants["VALUE"];
                            ?>
"
                                                    value="<?php 
                            echo $arVariants["VALUE"];
                            ?>
" <?php 
                            if ($arVariants["CHECKED"] == "Y") {
                                echo " checked";
                            }
                            ?>
 />

                                                <label for="<?php 
                            echo $arProperties["FIELD_NAME"];
                            ?>
_<?php 
                            echo $arVariants["VALUE"];
                            ?>
"><?php 
                            echo $arVariants["NAME"];
                            ?>
</label></br>
                                            <?php 
                        }
                    }
                    ?>

                                        <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                        <div class="bx_description">
                                            <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                        </div>
                                        <?php 
                    }
                    ?>
                                    </div>
                                    <div style="clear: both;"></div>
                                    <?php 
                } elseif ($arProperties["TYPE"] == "FILE") {
                    ?>
                                    <br/>
                                    <div class="bx_block r1x3 pt8">
                                        <?php 
                    echo $arProperties["NAME"];
                    ?>
                                        <?php 
                    if ($arProperties["REQUIED_FORMATED"] == "Y") {
                        ?>
                                            <span class="bx_sof_req">*</span>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <div class="bx_block r3x1">
                                        <?php 
                    echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
                    ?>

                                        <?php 
                    if (strlen(trim($arProperties["DESCRIPTION"])) > 0) {
                        ?>
                                        <div class="bx_description">
                                            <?php 
                        echo $arProperties["DESCRIPTION"];
                        ?>
                                        </div>
                                        <?php 
                    }
                    ?>
                                    </div>

                                    <div style="clear: both;"></div><br/>
                                    <?php 
                }
                ?>
                            </div>
                 
                        <?php 
            }
            ?>
            <?php 
        }
    }
示例#5
0
	function PrintPropsForm($arSource = array(), $locationTemplate = ".default", $arContactGroup)
	{
		if (!empty($arSource))
		{
			foreach ($arSource as $arProperties)
			{
				/*echo '<pre>';
				print_r($arContactGroup);
				echo '</pre>';
				echo $arProperties["PROPS_GROUP_ID"];
				if (count($arContactGroup) > 0 && !in_array($arProperties["PROPS_GROUP_ID"], $arContactGroup))
					continue;*/
				?>
				<div class="table-field" data-property-id-row="<?php 
echo intval(intval($arProperties["ID"]));
?>
">

				<?
				if ($arProperties["TYPE"] == "CHECKBOX")
				{
					?>
					<input type="hidden" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="">

					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r1x3 pt8">
						<input type="checkbox" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="Y"<?if ($arProperties["CHECKED"]=="Y") echo " checked";?>>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>

					<div style="clear: both;"></div>
					<?
				}
				elseif ($arProperties["TYPE"] == "TEXT")
				{
					$type = 'text';
					$checkEmail = false;
					if ($arProperties["CODE"] == "PHONE")
						$type = 'tel';
					elseif ($arProperties["CODE"] == "EMAIL"){
						$type = 'email';
						global $USER;
						if(!$USER->IsAuthorized())
							$checkEmail = true;
					}

					?>
					<?/*<pre><?print_r($arProperties)?></pre>*/?>
					<label class="label"><?php 
echo $arProperties["NAME"];
?>
</label>
					<div class="field">
						<input type="<?php 
echo $type;
?>
" 
							maxlength="250" 
							size="<?php 
echo $arProperties["SIZE1"];
?>
" 
							<?if ($checkEmail):?>onchange="checkUserEmail(this);"<?endif;?> 
							value="<?php 
echo $arProperties["VALUE"];
?>
" 
							name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" 
							class="PROP_INPUT_<?php 
echo $arProperties["CODE"];
?>
 <?if($type == 'tel'):?>numbers<?endif;?> <?if ($arProperties["REQUIED"] == "Y"):?>required<?endif;?>" 
							id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" <?/*if ($arProperties["REQUIED"] == "Y"):?>required<?endif;*/?> 
						/>
                    <?if ($checkEmail):?>
                        <span class="input-loader" style="display:none;">
                            <div>
                                <img src="/local/templates/zakrepi/images/svg/loader.svg" width="25"/>
                            </div>
                        </span>
                    <?endif;?>
                        <span class="error-text error-required error-pattern"><?php 
echo $arProperties['DESCRIPTION'];
?>
</span>
                    </div>
					<?
				}
				elseif ($arProperties["TYPE"] == "SELECT")
				{
					?>
					<br/>
					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">
						<select name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
							<?
							foreach($arProperties["VARIANTS"] as $arVariants):
							?>
								<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
							<?
							endforeach;
							?>
						</select>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>
					<div style="clear: both;"></div>
					<?
				}
				elseif ($arProperties["TYPE"] == "MULTISELECT")
				{
					?>
					<br/>
					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">
						<select multiple name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
							<?
							foreach($arProperties["VARIANTS"] as $arVariants):
							?>
								<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
							<?
							endforeach;
							?>
						</select>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>
					<div style="clear: both;"></div>
					<?
				}
				elseif ($arProperties["TYPE"] == "TEXTAREA")
				{
					$rows = ($arProperties["SIZE2"] > 10) ? 4 : $arProperties["SIZE2"];
					?>
					<br/>
					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">
						<textarea rows="<?php 
echo $rows;
?>
" cols="<?php 
echo $arProperties["SIZE1"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"><?php 
echo $arProperties["VALUE"];
?>
</textarea>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>
					<div style="clear: both;"></div>
					<?
				}
				elseif ($arProperties["TYPE"] == "LOCATION")
				{
					?>
					<div style="display:none">
					<input type="hidden" name="location_prop_id" value="<?php 
echo $arProperties["ID"];
?>
" />

					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">

						<?
						$value = 0;
						if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0)
						{
							foreach ($arProperties["VARIANTS"] as $arVariant)
							{
								if ($arVariant["SELECTED"] == "Y")
								{
									$value = $arVariant["ID"];
									break;
								}
							}
						}

						// here we can get '' or 'popup'
						// map them, if needed
						if(CSaleLocation::isLocationProMigrated())
						{
							$locationTemplateP = $locationTemplate == 'popup' ? 'search' : 'steps';
							$locationTemplateP = $_REQUEST['PERMANENT_MODE_STEPS'] == 1 ? 'steps' : $locationTemplateP; // force to "steps"
						}
						?>

						<?if($locationTemplateP == 'steps'):?>
							<input type="hidden" id="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
echo intval($arProperties["ID"]);
?>
]" name="LOCATION_ALT_PROP_DISPLAY_MANUAL[<?php 
echo intval($arProperties["ID"]);
?>
]" value="<?php 
echo $_REQUEST['LOCATION_ALT_PROP_DISPLAY_MANUAL'][intval($arProperties["ID"])] ? '1' : '0';
?>
" />
						<?endif?>

						<?CSaleLocation::proxySaleAjaxLocationsComponent(array(
							"AJAX_CALL" => "N",
							"COUNTRY_INPUT_NAME" => "COUNTRY",
							"REGION_INPUT_NAME" => "REGION",
							"CITY_INPUT_NAME" => $arProperties["FIELD_NAME"],
							"CITY_OUT_LOCATION" => "Y",
							"LOCATION_VALUE" => $value,
							"ORDER_PROPS_ID" => $arProperties["ID"],
							"ONCITYCHANGE" => ($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitForm()" : "",
							"SIZE1" => $arProperties["SIZE1"],
						),
						array(
							"ID" => $value,
							"CODE" => "",
							"SHOW_DEFAULT_LOCATIONS" => "Y",

							// function called on each location change caused by user or by program
							// it may be replaced with global component dispatch mechanism coming soon
							"JS_CALLBACK" => "submitFormProxy",

							// function window.BX.locationsDeferred['X'] will be created and lately called on each form re-draw.
							// it may be removed when sale.order.ajax will use real ajax form posting with BX.ProcessHTML() and other stuff instead of just simple iframe transfer
							"JS_CONTROL_DEFERRED_INIT" => intval($arProperties["ID"]),

							// an instance of this control will be placed to window.BX.locationSelectors['X'] and lately will be available from everywhere
							// it may be replaced with global component dispatch mechanism coming soon
							"JS_CONTROL_GLOBAL_ID" => intval($arProperties["ID"]),

							"DISABLE_KEYBOARD_INPUT" => "Y",
							"PRECACHE_LAST_LEVEL" => "Y",
							"PRESELECT_TREE_TRUNK" => "Y",
							"SUPPRESS_ERRORS" => "Y"
						),
						$locationTemplateP,
						true,
						'location-block-wrapper'
						)?>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>

					</div>
					<div style="clear: both;"></div>
					</div>
					<?
				}
				elseif ($arProperties["TYPE"] == "RADIO")
				{
					?>
					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">
						<?
						if (is_array($arProperties["VARIANTS"]))
						{
							foreach($arProperties["VARIANTS"] as $arVariants):
							?>
								<input
									type="radio"
									name="<?php 
echo $arProperties["FIELD_NAME"];
?>
"
									id="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"
									value="<?php 
echo $arVariants["VALUE"];
?>
" <?if($arVariants["CHECKED"] == "Y") echo " checked";?> />

								<label for="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"><?php 
echo $arVariants["NAME"];
?>
</label></br>
							<?
							endforeach;
						}
						?>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>
					<div style="clear: both;"></div>
					<?
				}
				elseif ($arProperties["TYPE"] == "FILE")
				{
					?>
					<br/>
					<div class="bx_block r1x3 pt8">
						<?php 
echo $arProperties["NAME"];
?>
						<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
							<span class="bx_sof_req">*</span>
						<?endif;?>
					</div>

					<div class="bx_block r3x1">
						<?php 
echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
?>

						<?
						if (strlen(trim($arProperties["DESCRIPTION"])) > 0):
						?>
						<div class="bx_description">
							<?php 
echo $arProperties["DESCRIPTION"];
?>
						</div>
						<?
						endif;
						?>
					</div>

					<div style="clear: both;"></div><br/>
					<?
				}
				?>
				</div>

				<?if(CSaleLocation::isLocationProEnabled()):?>

					<?
					$propertyAttributes = array(
						'type' => $arProperties["TYPE"],
						'valueSource' => $arProperties['SOURCE'] == 'DEFAULT' ? 'default' : 'form' // value taken from property DEFAULT_VALUE or it`s a user-typed value?
					);

					if(intval($arProperties['IS_ALTERNATE_LOCATION_FOR']))
						$propertyAttributes['isAltLocationFor'] = intval($arProperties['IS_ALTERNATE_LOCATION_FOR']);

					if(intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION']))
						$propertyAttributes['altLocationPropId'] = intval($arProperties['CAN_HAVE_ALTERNATE_LOCATION']);

					if($arProperties['IS_ZIP'] == 'Y')
						$propertyAttributes['isZip'] = true;
					?>

					<script>

						<?// add property info to have client-side control on it?>
						(window.top.BX || BX).saleOrderAjax.addPropertyDesc(<?php 
echo CUtil::PhpToJSObject(array('id' => intval($arProperties["ID"]), 'attributes' => $propertyAttributes));
?>
);

					</script>
				<?endif?>

				<?
			}
		}
	}
示例#6
0
	function PrintPropsForm($arSource=Array(), $locationTemplate = ".default")
	{
		if (!empty($arSource))
		{
			?>

			<?
			foreach($arSource as $arProperties)
			{
				if($arProperties["SHOW_GROUP_NAME"] == "Y")
				{
					?>
					<tr>
						<td colspan="2">
							<b><?php 
echo $arProperties["GROUP_NAME"];
?>
</b>
						</td>
					</tr>
					<?
				}
				?>
				<tr>
					<td align="right" valign="top">
						<?php 
echo $arProperties["NAME"];
?>
:<?
						if($arProperties["REQUIED_FORMATED"]=="Y")
						{
							?><span class="sof-req">*</span><?
						}
						?>
					</td>
					<td>
						<?
						if($arProperties["TYPE"] == "CHECKBOX")
						{
							?>

							<input type="hidden" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="">
							<input type="checkbox" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="Y"<?if ($arProperties["CHECKED"]=="Y") echo " checked";?>>
							<?
						}
						elseif($arProperties["TYPE"] == "TEXT")
						{
							?>
							<input type="text" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
">
							<?
						}
						elseif($arProperties["TYPE"] == "SELECT")
						{
							?>
							<select name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
							<?
							foreach($arProperties["VARIANTS"] as $arVariants)
							{
								?>
								<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
								<?
							}
							?>
							</select>
							<?
						}
						elseif ($arProperties["TYPE"] == "MULTISELECT")
						{
							?>
							<select multiple name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
							<?
							foreach($arProperties["VARIANTS"] as $arVariants)
							{
								?>
								<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
								<?
							}
							?>
							</select>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXTAREA")
						{
							?>
							<textarea rows="<?php 
echo $arProperties["SIZE2"];
?>
" cols="<?php 
echo $arProperties["SIZE1"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"><?php 
echo $arProperties["VALUE"];
?>
</textarea>
							<?
						}
						elseif ($arProperties["TYPE"] == "LOCATION")
						{
							$value = 0;
							if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0)
							{
								foreach ($arProperties["VARIANTS"] as $arVariant)
								{
									if ($arVariant["SELECTED"] == "Y")
									{
										$value = $arVariant["ID"];
										break;
									}
								}
							}

							$GLOBALS["APPLICATION"]->IncludeComponent(
								"bitrix:sale.ajax.locations",
								$locationTemplate,
								array(
									"AJAX_CALL" => "N",
									"COUNTRY_INPUT_NAME" => "COUNTRY",//.$arProperties["FIELD_NAME"],
									"REGION_INPUT_NAME" => "REGION",//.$arProperties["FIELD_NAME"],
									"CITY_INPUT_NAME" => $arProperties["FIELD_NAME"],
									"CITY_OUT_LOCATION" => "Y",
									"LOCATION_VALUE" => $value,
									"ORDER_PROPS_ID" => $arProperties["ID"],
									"ONCITYCHANGE" => ($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitForm()" : "",
									"SIZE1" => $arProperties["SIZE1"],
								),
								null,
								array('HIDE_ICONS' => 'Y')
							);
						}
						elseif ($arProperties["TYPE"] == "RADIO")
						{
							foreach($arProperties["VARIANTS"] as $arVariants)
							{
								?>
								<input type="radio" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
" value="<?php 
echo $arVariants["VALUE"];
?>
"<?if($arVariants["CHECKED"] == "Y") echo " checked";?>> <label for="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"><?php 
echo $arVariants["NAME"];
?>
</label><br />
								<?
							}
						}
						elseif ($arProperties["TYPE"] == "FILE")
						{
							echo showFilePropertyField("ORDER_PROP_".$arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
						}


						if (strlen($arProperties["DESCRIPTION"]) > 0)
						{
							?><br /><small><?echo $arProperties["DESCRIPTION"] ?></small><?
						}
						?>

					</td>
				</tr>
				<?
			}
			?>
			<?
			return true;
		}
		return false;
	}
示例#7
0
	function PrintPropsForm($arSource = array(), $locationTemplate = ".default")
	{
		if (!empty($arSource))
		{
			?>
				<div>
					<?
					foreach($arSource as $arProperties)
					{
						if ($arProperties["TYPE"] == "CHECKBOX")
						{
							?>
							<input type="hidden" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="">

							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r1x3 pt8"><input type="checkbox" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" value="Y"<?if ($arProperties["CHECKED"]=="Y") echo " checked";?>></div>

							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXT")
						{
                        ?>
							    <div class="bx_block r1x3 pt8">
								    <?php 
echo $arProperties["NAME"];
?>
								    <?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									    <span class="bx_sof_req">*</span>
								    <?endif;?>
							    </div>

							    <div class="bx_block r3x1">
                                <?if($arProperties["CODE"]=='ADDRESS'):?>
                                <div id="kladr-address" class="kladr-address">
                                    <link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css">    
                                    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
                                    <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
                                    <input onchange="$('#<?php 
echo $arProperties["FIELD_NAME"];
?>
').val($(this).val())" 
                                        type="text" 
                                        maxlength="250" 
                                        size="<?php 
echo $arProperties["SIZE1"];
?>
" 
                                        value="<?php 
echo $arProperties["VALUE"];
?>
" 
                                        name="street" 
                                        class="ui-autocomplete-input" 
                                        autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
                                        <input 
                                        type="hidden" 
                                        value="<?php 
echo $arProperties["VALUE"];
?>
" 
                                        name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" 
                                        id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" 
                                        class="ui-autocomplete-input" 
                                        autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
                                    <script src="/local/components/primepix/kladr.address/templates/.default/jquery.primepix.kladr.min.js"></script>
                                    <script src="/local/components/primepix/kladr.address/templates/.default/controller.js"></script>
                                    <script>KladrApiControllerInit('52fbfa8131608f99120000c0', '253895d380e1769726ac8fa1aff8406f05f8e116 ');</script>
                                </div>   
                            <?elseif($arProperties["CODE"]=='info_about_status_email'):?>
								<input type="email" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" >
                            <?elseif($arProperties["CODE"]=='info_about_status_callme_new_phone'):?>
								<input type="text" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" jq-pattern="^\(?([0-9]{3})\)?([ \s.-]?)([0-9]{3})\2([0-9]{4})$" >
								<script>/*
								//ng-model='phone_num' ng-pattern="phoneNumberPattern" 
									function phone_num($scope){
									$scope.phoneNumberPattern = (function() {
										var regexp = /^\(?(\d{3})\)?[ .-]?(\d{3})[ .-]?(\d{4})$/;
										return {
											test: function(value) {
												if( $scope.requireTel === false ) return true;
												else return regexp.test(value);
											}
										};
									})();
									} */
									function validatePhone(val, filter) {
										//var a = document.getElementById(txtPhone).value;
										//var filter = /^[0-9-+]+$/;
										//var filter = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
										if (filter.test(val)) {
											return true;
										}
										else {
											return false;
										}
									}
									$('#<?php 
echo $arProperties["FIELD_NAME"];
?>
').blur(function(e) {
										pattern = $(this).attr('jq-pattern');
										console.log(pattern);
										pattern = new RegExp(pattern, 'i');
									   if ( validatePhone($(this).val(), pattern) ) {
											$(this).css('borderColor', 'green');
									   }
									   else {
											$(this).css('borderColor', 'red');
									   }
									});
								</script>
                            <?else:?>
                                <input type="text" maxlength="250" size="<?php 
echo $arProperties["SIZE1"];
?>
" value="<?php 
echo $arProperties["VALUE"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
">
							<?endif?>
                                </div><div style="clear: both;"></div><br/>
                            <?
						}
						elseif ($arProperties["TYPE"] == "SELECT")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
                                    <option></option>
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "MULTISELECT")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<select multiple name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
" size="<?php 
echo $arProperties["SIZE1"];
?>
">
									<?
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<option value="<?php 
echo $arVariants["VALUE"];
?>
"<?if ($arVariants["SELECTED"] == "Y") echo " selected";?>><?php 
echo $arVariants["NAME"];
?>
</option>
									<?
									endforeach;
									?>
								</select>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "TEXTAREA")
						{
							$rows = ($arProperties["SIZE2"] > 10) ? 4 : $arProperties["SIZE2"];
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<textarea rows="<?php 
echo $rows;
?>
" cols="<?php 
echo $arProperties["SIZE1"];
?>
" name="<?php 
echo $arProperties["FIELD_NAME"];
?>
" id="<?php 
echo $arProperties["FIELD_NAME"];
?>
"><?php 
echo $arProperties["VALUE"];
?>
</textarea>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "LOCATION")
						{
							$value = 0;
							if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0)
							{
								foreach ($arProperties["VARIANTS"] as $arVariant)
								{
									if ($arVariant["SELECTED"] == "Y")
									{
										$value = $arVariant["ID"];
										break;
									}
								}
							}
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?
								$GLOBALS["APPLICATION"]->IncludeComponent(
									"bitrix:sale.ajax.locations",
									$locationTemplate,
									array(
										"AJAX_CALL" => "N",
										"COUNTRY_INPUT_NAME" => "COUNTRY",
										"REGION_INPUT_NAME" => "REGION",
										"CITY_INPUT_NAME" => $arProperties["FIELD_NAME"],
										"CITY_OUT_LOCATION" => "Y",
										"LOCATION_VALUE" => $value,
										"ORDER_PROPS_ID" => $arProperties["ID"],
										"ONCITYCHANGE" => ($arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y") ? "submitForm()" : "",
										"SIZE1" => $arProperties["SIZE1"],
									),
									null,
									array('HIDE_ICONS' => 'Y')
								);
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "RADIO")
						{
							?>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?
								if (is_array($arProperties["VARIANTS"]))
								{
									foreach($arProperties["VARIANTS"] as $arVariants):
									?>
										<input
											type="radio"
											name="<?php 
echo $arProperties["FIELD_NAME"];
?>
"
											id="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"
											value="<?php 
echo $arVariants["VALUE"];
?>
" <?if($arVariants["CHECKED"] == "Y") echo " checked";?> />

										<label for="<?php 
echo $arProperties["FIELD_NAME"];
?>
_<?php 
echo $arVariants["VALUE"];
?>
"><?php 
echo $arVariants["NAME"];
?>
</label></br>
									<?
									endforeach;
								}
								?>
							</div>
							<div style="clear: both;"></div>
							<?
						}
						elseif ($arProperties["TYPE"] == "FILE")
						{
							?>
							<br/>
							<div class="bx_block r1x3 pt8">
								<?php 
echo $arProperties["NAME"];
?>
								<?if ($arProperties["REQUIED_FORMATED"]=="Y"):?>
									<span class="bx_sof_req">*</span>
								<?endif;?>
							</div>

							<div class="bx_block r3x1">
								<?php 
echo showFilePropertyField("ORDER_PROP_" . $arProperties["ID"], $arProperties, $arProperties["VALUE"], $arProperties["SIZE1"]);
?>
							</div>

							<div style="clear: both;"></div><br/>
							<?
						}
					}
					?>
				</div>
			<?
		}
	}