本文整理汇总了PHP中CSaleLocation::proxySaleAjaxLocationsComponent方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleLocation::proxySaleAjaxLocationsComponent方法的具体用法?PHP CSaleLocation::proxySaleAjaxLocationsComponent怎么用?PHP CSaleLocation::proxySaleAjaxLocationsComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleLocation
的用法示例。
在下文中一共展示了CSaleLocation::proxySaleAjaxLocationsComponent方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PrintPropsForm
//.........这里部分代码省略.........
}
elseif ($arProperties["TYPE"] == "TEXTAREA")
{
?>
<textarea rows="<?php
echo $arProperties["SIZE2"];
?>
" cols="<?php
echo $arProperties["SIZE1"];
?>
" name="<?php
echo $arProperties["FIELD_NAME"];
?>
"><?php
echo $arProperties["VALUE"];
?>
</textarea>
<?
}
elseif ($arProperties["TYPE"] == "LOCATION")
{
$value = 0;
foreach ($arProperties["VARIANTS"] as $arVariant)
{
if ($arVariant["SELECTED"] == "Y")
{
$value = $arVariant["ID"];
break;
}
}
if ($arParams["USE_AJAX_LOCATIONS"] == "Y"):
CSaleLocation::proxySaleAjaxLocationsComponent(
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" => "",
),
array(
"ID" => "",
"CODE" => $arProperties["VALUE"],
"PROVIDE_LINK_BY" => "code",
)
);
else:
?>
<select name="<?php
echo $arProperties["FIELD_NAME"];
?>
" size="<?php
echo $arProperties["SIZE1"];
?>
">
<?
foreach($arProperties["VARIANTS"] as $arVariants)
{
?>
<option value="<?php
echo $arVariants["ID"];
示例2: array
$arResult['FIELDS']['tab_1'][] = array('id' => 'DEAL_ID', 'name' => GetMessage('CRM_QUOTE_FIELD_DEAL_ID'), 'type' => 'crm_entity_selector', 'componentParams' => array('ENTITY_TYPE' => 'DEAL', 'INPUT_NAME' => 'DEAL_ID', 'NEW_INPUT_NAME' => '', 'INPUT_VALUE' => isset($arResult['ELEMENT']['DEAL_ID']) ? $arResult['ELEMENT']['DEAL_ID'] : '', 'FORM_NAME' => $arResult['FORM_ID'], 'MULTIPLE' => 'N', 'NAME_TEMPLATE' => \Bitrix\Crm\Format\PersonNameFormatter::getFormat()));
}
$arResult['FIELDS']['tab_1'][] = array('id' => 'OPENED', 'name' => GetMessage('CRM_QUOTE_FIELD_OPENED'), 'type' => 'vertical_checkbox', 'params' => array(), 'value' => isset($arResult['ELEMENT']['OPENED']) ? $arResult['ELEMENT']['OPENED'] : true, 'title' => GetMessage('CRM_QUOTE_FIELD_OPENED_TITLE'));
$arResult['FIELDS']['tab_1'][] = array('id' => 'section_contact_info', 'name' => GetMessage('CRM_SECTION_CLIENT_INFO'), 'type' => 'section');
if (CCrmContact::CheckReadPermission()) {
$arResult['FIELDS']['tab_1'][] = array('id' => 'CONTACT_ID', 'name' => GetMessage('CRM_QUOTE_FIELD_CONTACT_ID'), 'type' => 'crm_entity_selector', 'componentParams' => array('ENTITY_TYPE' => 'CONTACT', 'INPUT_NAME' => 'CONTACT_ID', 'NEW_INPUT_NAME' => CCrmContact::CheckCreatePermission() ? 'NEW_CONTACT_ID' : '', 'INPUT_VALUE' => isset($arResult['ELEMENT']['CONTACT_ID']) ? $arResult['ELEMENT']['CONTACT_ID'] : '', 'FORM_NAME' => $arResult['FORM_ID'], 'MULTIPLE' => 'N', 'NAME_TEMPLATE' => \Bitrix\Crm\Format\PersonNameFormatter::getFormat()));
}
if (CCrmCompany::CheckReadPermission()) {
$arResult['FIELDS']['tab_1'][] = array('id' => 'COMPANY_ID', 'name' => GetMessage('CRM_QUOTE_FIELD_COMPANY_ID'), 'type' => 'crm_entity_selector', 'componentParams' => array('ENTITY_TYPE' => 'COMPANY', 'INPUT_NAME' => 'COMPANY_ID', 'NEW_INPUT_NAME' => CCrmCompany::CheckCreatePermission() ? 'NEW_COMPANY_ID' : '', 'INPUT_VALUE' => isset($arResult['ELEMENT']['COMPANY_ID']) ? $arResult['ELEMENT']['COMPANY_ID'] : '', 'FORM_NAME' => $arResult['FORM_ID'], 'MULTIPLE' => 'N', 'NAME_TEMPLATE' => \Bitrix\Crm\Format\PersonNameFormatter::getFormat()));
}
if ($bTaxMode) {
// CLIENT LOCATION
$sLocationHtml = '';
$locValue = isset($arResult['ELEMENT']['LOCATION_ID']) ? $arResult['ELEMENT']['LOCATION_ID'] : '';
ob_start();
CSaleLocation::proxySaleAjaxLocationsComponent(array('AJAX_CALL' => 'N', 'COUNTRY_INPUT_NAME' => 'LOC_COUNTRY', 'REGION_INPUT_NAME' => 'LOC_REGION', 'CITY_INPUT_NAME' => 'LOC_CITY', 'CITY_OUT_LOCATION' => 'Y', 'LOCATION_VALUE' => $locValue, 'ORDER_PROPS_ID' => 'QUOTE_' . $arResult['ELEMENT']['ID'], 'ONCITYCHANGE' => 'BX.onCustomEvent(\'CrmProductRowSetLocation\', [\'LOC_CITY\']);', 'SHOW_QUICK_CHOOSE' => 'N'), array("CODE" => $locValue, "ID" => "", "PROVIDE_LINK_BY" => "code", "JS_CALLBACK" => 'CrmProductRowSetLocation'), 'popup');
$sLocationHtml = ob_get_contents();
ob_end_clean();
$locationField = array('id' => 'LOCATION_ID', 'name' => GetMessage('CRM_QUOTE_FIELD_LOCATION_ID'), 'type' => 'custom', 'value' => $sLocationHtml . '<div>' . '<span class="bx-crm-edit-content-location-description">' . GetMessage('CRM_QUOTE_FIELD_LOCATION_ID_DESCRIPTION') . '</span>' . '</div>', 'required' => true);
$arResult['FIELDS']['tab_1'][] = $locationField;
$arResult['FORM_FIELDS_TO_ADD']['LOCATION_ID'] = $locationField;
unset($locationField);
}
// Rewrite client fields
if (!($bEdit || $bCopy || !empty($arResult['ERROR_MESSAGE']))) {
CCrmQuote::RewriteClientFields($arResult['ELEMENT']);
}
// person type
$arResult['ELEMENT']['PERSON_TYPE_ID'] = 0;
$arResult['PERSON_TYPE'] = 'CONTACT';
if (isset($arPersonTypes['CONTACT']) && (!isset($arResult['ELEMENT']['COMPANY_ID']) || intval($arResult['ELEMENT']['COMPANY_ID']) <= 0)) {
示例3: getOrderPropertiesHTML
//.........这里部分代码省略.........
false,
array("*")
);
while ($arVariants = $dbVariants->Fetch())
{
$resultHtml .= '<option value="'.htmlspecialcharsex($arVariants["VALUE"]).'"';
if (in_array($arVariants["VALUE"], $arCurVal))
$resultHtml .= " selected";
$resultHtml .= '>'.htmlspecialcharsEx($arVariants["NAME"]).'</option>';
}
$resultHtml .= '</select>';
}
elseif ($arProperties["TYPE"] == "TEXTAREA")
{
$resultHtml .= '<textarea ';
$resultHtml .= 'rows="4" ';
$resultHtml .= 'cols="40" ';
$resultHtml .= 'name="ORDER_PROP_'.$arProperties["ID"].'" ';
$resultHtml .= 'id="ORDER_PROP_'.$arProperties["ID"].'" type="textarea">';
$resultHtml .= ((isset($curVal)) ? $curVal : $arProperties["DEFAULT_VALUE"]);
$resultHtml .= '</textarea>';
}
elseif ($arProperties["TYPE"] == "LOCATION")
{
$countryID = "";
$cityID = "";
$cityList = "";
$DELIVERY_LOCATION = $arPropValues[intval($arProperties["ID"])];
$locationID = $curVal;
$tmpLocation = '';
ob_start();
CSaleLocation::proxySaleAjaxLocationsComponent(
array(
"SITE_ID" => $LID,
"AJAX_CALL" => "N",
"COUNTRY_INPUT_NAME" => "ORDER_PROP_".$arProperties["ID"],
"REGION_INPUT_NAME" => "REGION_ORDER_PROP_".$arProperties["ID"],
"CITY_INPUT_NAME" => "CITY_ORDER_PROP_".$arProperties["ID"],
"CITY_OUT_LOCATION" => "Y",
"ALLOW_EMPTY_CITY" => "Y",
"LOCATION_VALUE" => $curVal,
"COUNTRY" => "",
"ONCITYCHANGE" => "",
"PUBLIC" => "N",
),
array(
"ID" => "",
"CODE" => $curVal,
"PROVIDE_LINK_BY" => "code",
)
);
$tmpLocation = ob_get_contents();
ob_end_clean();
$resultHtml .= '<script>var locationID = \''.$arProperties["ID"].'\';</script>';
$resultHtml .= $tmpLocation;
}
elseif ($arProperties["TYPE"] == "RADIO")
{
$dbVariants = CSaleOrderPropsVariant::GetList(
array("SORT" => "ASC"),
array("ORDER_PROPS_ID" => $arProperties["ID"]),
false,
示例4: PrintPropsForm
//.........这里部分代码省略.........
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>
示例5: intval
$location = intval($location);
ob_start();
CSaleLocation::proxySaleAjaxLocationsComponent(
array(
"SITE_ID" => $LID,
"AJAX_CALL" => "Y",
"COUNTRY_INPUT_NAME" => "ORDER_PROP_".$locid,
"REGION_INPUT_NAME" => "REGION_ORDER_PROP_".$locid,
"CITY_INPUT_NAME" => "CITY_ORDER_PROP_".$locid,
"CITY_OUT_LOCATION" => "Y",
"ALLOW_EMPTY_CITY" => "Y",
"LOCATION_VALUE" => $location,
"COUNTRY" => "",
"ONCITYCHANGE" => "fChangeLocationCity();",
),
array(
"ID" => "",
"CODE" => $location,
"JS_CALLBACK" => 'fChangeLocationCity',
"SHOW_DEFAULT_LOCATIONS" => 'Y',
"JS_CONTROL_GLOBAL_ID" => 'saleOrderNew',
),
'',
true,
'location-block-wrapper'
);
$tmpLocation = ob_get_contents();
ob_end_clean();
示例6: PrintPropsForm
//.........这里部分代码省略.........
{
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,
示例7: PrintPropsForm
//.........这里部分代码省略.........
<?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
} 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>
<?php
} elseif ($arProperties["TYPE"] == "LOCATION") {
$value = 0;
foreach ($arProperties["VARIANTS"] as $arVariant) {
if ($arVariant["SELECTED"] == "Y") {
$value = $arVariant["ID"];
break;
}
}
CSaleLocation::proxySaleAjaxLocationsComponent(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"]), array("ID" => $value, "CODE" => "", "SHOW_DEFAULT_LOCATIONS" => "Y", "INITIALIZE_BY_GLOBAL_EVENT" => 'sboa-init-loc-selector', "GLOBAL_EVENT_SCOPE" => 'window', "JS_CALLBACK" => $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" ? "submitFormProxy()" : "", "DISABLE_KEYBOARD_INPUT" => "Y", "PRECACHE_LAST_LEVEL" => "Y", "PRESELECT_TREE_TRUNK" => "Y", "SUPPRESS_ERRORS" => "Y"), $locationTemplate, true, 'location-block-wrapper');
} 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"];
?>
"<?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
}
}
if (strlen($arProperties["DESCRIPTION"]) > 0) {
?>
<br /><small><?php
echo $arProperties["DESCRIPTION"];
?>
</small><?php
}
?>
</td>
</tr>
<?php
}
?>
<?php
return true;
}
return false;
}
示例8: isset
<textarea rows="<?echo (IntVal($vval["SIZE2"])>0)?$vval["SIZE2"]:4; ?>" cols="<?echo (IntVal($vval["SIZE1"])>0)?$vval["SIZE1"]:40; ?>" name="<?php
echo $name;
?>
"><?echo (isset($currentValue)) ? $currentValue : $vval["DEFAULT_VALUE"];?></textarea>
<?elseif ($vval["TYPE"]=="LOCATION"):?>
<?if ($arParams['USE_AJAX_LOCATIONS'] == 'Y'):?>
<?$locationValue = isset($currentValue) ? $currentValue : $vval["DEFAULT_VALUE"];?>
<?CSaleLocation::proxySaleAjaxLocationsComponent(
array(
"AJAX_CALL" => "N",
'CITY_OUT_LOCATION' => 'Y',
'COUNTRY_INPUT_NAME' => $name.'_COUNTRY',
'CITY_INPUT_NAME' => $name,
'LOCATION_VALUE' => $locationValue,
),
array(
),
$locationTemplate,
true,
'location-block-wrapper'
)?>
<?
else:
?>
<select name="<?php
echo $name;
?>
" size="<?echo (IntVal($vval["SIZE1"])>0)?$vval["SIZE1"]:1; ?>">
<?foreach($vval["VALUES"] as $vvval):?>
示例9: elseif
</td>
</tr>
<?php
$tabControl->EndCustomField("CODE_" . $arProperties["ID"]);
} elseif ($arProperties["TYPE"] == "LOCATION") {
$tabControl->BeginCustomField("CODE_" . $arProperties["ID"], $arProperties["NAME"], $shure);
?>
<tr<?php
$shure ? " class=\"adm-detail-required-field\"" : "";
?>
>
<td width="40%">
<?php
echo htmlspecialcharsEx($arProperties["NAME"]);
?>
:
</td>
<td width="60%">
<?php
CSaleLocation::proxySaleAjaxLocationsComponent(array("SITE_ID" => $LID, "AJAX_CALL" => "N", "COUNTRY_INPUT_NAME" => "COUNTRY_" . $arProperties["ID"], "REGION_INPUT_NAME" => "REGION_" . $arProperties["ID"], "CITY_INPUT_NAME" => "LOCATION_" . $arProperties["ID"], "CITY_OUT_LOCATION" => "Y", "ALLOW_EMPTY_CITY" => "Y", "LOCATION_VALUE" => $fieldValue, "COUNTRY" => "", "ONCITYCHANGE" => "", "PUBLIC" => "N"), array("ID" => $fieldValue, "CODE" => "", "PROVIDE_LINK_BY" => "id"));
?>
</td>
</tr>
<?php
$tabControl->EndCustomField("CODE_" . $arProperties["ID"]);
}
}
$tabControl->Buttons(array("back_url" => "/bitrix/admin/sale_buyers_profile.php?lang=" . LANGUAGE_ID . "&USER_ID=" . $USER_ID));
$tabControl->Show();
}
require $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_admin.php';
示例10: PrintPropsForm
//.........这里部分代码省略.........
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
} elseif ($arProperties["TYPE"] == "TEXTAREA") {
?>
<textarea style="max-height:100px" 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>
<?php
} elseif ($arProperties["TYPE"] == "LOCATION") {
//_print_r('L: '.$arProperties["VALUE"].' ------------ '.rand(99, 9999));
$value = 0;
if (is_array($arProperties["VARIANTS"]) && count($arProperties["VARIANTS"]) > 0) {
foreach ($arProperties["VARIANTS"] as $arVariant) {
if ($arVariant["SELECTED"] == "Y") {
$value = $arVariant["ID"];
break;
}
}
}
CSaleLocation::proxySaleAjaxLocationsComponent(array("AJAX_CALL" => "N", "COUNTRY_INPUT_NAME" => "COUNTRY", "REGION_INPUT_NAME" => "REGION", "CITY_INPUT_NAME" => $arProperties["FIELD_NAME"], "CITY_OUT_LOCATION" => "Y", "SHOW_QUICK_CHOOSE" => "N", "LOCATION_VALUE" => $value, "ORDER_PROPS_ID" => $arProperties["ID"], "ONCITYCHANGE" => $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" ? "submitForm()" : "", "SIZE1" => $arProperties["SIZE1"]), array("CODE" => "", "ID" => $arProperties["VALUE"], "JS_CALLBACK" => $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" ? "submitFormProxy" : ""), $locationTemplate, true, 'locationpro-selector-wrapper');
} 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"];
?>
"<?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
}
}
if (strlen($arProperties["DESCRIPTION"]) > 0) {
?>
<br /><small><?php
echo $arProperties["DESCRIPTION"];
?>
</small><?php
}
?>
<?php
}
?>
<?php
return true;
}
return false;
}
示例11: PrintPropsForm
//.........这里部分代码省略.........
{
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"
),
示例12: intval
$contactPersonValue = '';
if (intval($arResult['ELEMENT']['UF_COMPANY_ID']) > 0) {
$contactPersonValue = intval($arResult['ELEMENT']['UF_CONTACT_ID']);
}
$arResult['FIELDS']['tab_1'][] = array('id' => 'UF_CONTACT_ID', 'name' => GetMessage('CRM_FIELD_CONTACT_PERSON_ID'), 'type' => 'crm_entity_selector', 'componentParams' => array('ENTITY_TYPE' => 'CONTACT', 'INPUT_NAME' => 'UF_CONTACT_ID', 'NEW_INPUT_NAME' => 'UF_CONTACT_ID_NEW', 'INPUT_VALUE' => $contactPersonValue, 'FORM_ID' => $arResult['FORM_ID'], 'MULTIPLE' => 'N', 'NAME_TEMPLATE' => \Bitrix\Crm\Format\PersonNameFormatter::getFormat()), 'persistent' => true);
$arResult['CONTACT_PERSON_CONTAINER_ID'] = "{$arResult['FORM_ID']}_FIELD_CONTAINER_UF_CONTACT_ID";
$arResult['CONTACT_PERSON_ENTITY_EDITOR_ID'] = "{$arResult['FORM_ID']}_UF_CONTACT_ID";
unset($contactPersonValue);
}
if ($bTaxMode) {
// PAYER LOCATION
$sLocationHtml = '';
CModule::IncludeModule('sale');
$locValue = isset($arResult['ELEMENT']['PR_LOCATION']) ? $arResult['ELEMENT']['PR_LOCATION'] : '';
ob_start();
CSaleLocation::proxySaleAjaxLocationsComponent(array('AJAX_CALL' => 'N', 'COUNTRY_INPUT_NAME' => 'LOC_COUNTRY', 'REGION_INPUT_NAME' => 'LOC_REGION', 'CITY_INPUT_NAME' => 'LOC_CITY', 'CITY_OUT_LOCATION' => 'Y', 'LOCATION_VALUE' => $locValue, 'ORDER_PROPS_ID' => $arInvoiceProperties['FIELDS']['ID'], 'ONCITYCHANGE' => 'BX.onCustomEvent(\'CrmProductRowSetLocation\', [\'LOC_CITY\']);', 'SHOW_QUICK_CHOOSE' => 'N'), array("CODE" => "", "ID" => $locValue, "PROVIDE_LINK_BY" => "id", "JS_CALLBACK" => 'CrmProductRowSetLocation'), 'popup', true, 'locationpro-selector-wrapper');
$sLocationHtml = ob_get_contents();
ob_end_clean();
$arResult['FIELDS']['tab_1'][] = array('id' => 'LOCATION_ID', 'name' => GetMessage('CRM_FIELD_LOCATION'), 'type' => 'custom', 'value' => $sLocationHtml . '<div>' . '<span class="bx-crm-edit-content-location-description">' . GetMessage('CRM_FIELD_LOCATION_DESCRIPTION') . '</span>' . '</div>', 'required' => true);
}
// Rewrite payer information (invoice properties) from contact or company
$companyId = intval($arResult['ELEMENT']['UF_COMPANY_ID']);
$contactId = intval($arResult['ELEMENT']['UF_CONTACT_ID']);
if (!$bEdit && !$bCopy && !$bCreateFromQuote && empty($arResult['ERROR_MESSAGE'])) {
CCrmInvoice::__RewritePayerInfo($companyId, $contactId, $arInvoiceProperties);
}
if ($bCreateFromQuote && empty($arResult['ERROR_MESSAGE'])) {
// Rewrite payer information from quote fields
if ($companyId > 0) {
foreach ($arInvoiceProperties as $propertyKey => $property) {
if ($property['FIELDS']['PERSON_TYPE_ID'] == $personTypeId) {