public function GetSettingsHTML($arFields, $strHTMLControlName, &$arPropertyFields) { $arPropertyFields = array("HIDE" => array("ROW_COUNT", "COL_COUNT", "MULTIPLE_CNT", "MULTIPLE"), "SET" => array("MULTIPLE" => "N"), 'USER_TYPE_SETTINGS_TITLE' => Loc::getMessage('BT_UT_SKU_SETTING_TITLE')); $arSettings = self::PrepareSettings($arFields); if (isset($arSettings['USER_TYPE_SETTINGS'])) { $arSettings = $arSettings['USER_TYPE_SETTINGS']; } $strResult = '<tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_VIEW') . '</td> <td>' . SelectBoxFromArray($strHTMLControlName["NAME"] . '[VIEW]', self::GetPropertyViewsList(true), htmlspecialcharsbx($arSettings['VIEW'])) . '</td> </tr> <tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_MAX_WIDTH') . '</td> <td><input type="text" name="' . $strHTMLControlName["NAME"] . '[MAX_WIDTH]" value="' . intval($arSettings['MAX_WIDTH']) . '"> ' . Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MAX_WIDTH') . '</td> </tr> <tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_MIN_HEIGHT') . '</td> <td><input type="text" name="' . $strHTMLControlName["NAME"] . '[MIN_HEIGHT]" value="' . intval($arSettings['MIN_HEIGHT']) . '"> ' . Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MIN_HEIGHT') . '</td> </tr> <tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_MAX_HEIGHT') . '</td> <td><input type="text" name="' . $strHTMLControlName["NAME"] . '[MAX_HEIGHT]" value="' . intval($arSettings['MAX_HEIGHT']) . '"> ' . Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MAX_HEIGHT') . '</td> </tr> <tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_BAN_SYMBOLS') . '</td> <td><input type="text" name="' . $strHTMLControlName["NAME"] . '[BAN_SYM]" value="' . htmlspecialcharsbx($arSettings['BAN_SYM']) . '"></td> </tr> <tr> <td>' . Loc::getMessage('BT_UT_SKU_SETTING_REP_SYMBOL') . '</td> <td>' . SelectBoxFromArray($strHTMLControlName["NAME"] . '[REP_SYM]', parent::GetReplaceSymList(true), htmlspecialcharsbx($arSettings['REP_SYM'])) . ' <input type="text" name="' . $strHTMLControlName["NAME"] . '[OTHER_REP_SYM]" size="1" maxlength="1" value="' . $arSettings['OTHER_REP_SYM'] . '"></td> </tr>'; return $strResult; }
function DiskRenderCellImportDoc() { $onedrive = Loc::getMessage('DISK_UF_FILE_CLOUD_IMPORT_TITLE_SERVICE_ONEDRIVE'); $gdrive = Loc::getMessage('DISK_UF_FILE_CLOUD_IMPORT_TITLE_SERVICE_GDRIVE'); $dropbox = Loc::getMessage('DISK_UF_FILE_CLOUD_IMPORT_TITLE_SERVICE_DROPBOX'); $title = Loc::getMessage('DISK_UF_FILE_CLOUD_IMPORT_TITLE'); return <<<HTML \t<td class="wd-fa-add-file-light-cell"> \t\t<span class="wd-fa-add-file-light wd-test-file-create"> \t\t\t<span class="wd-fa-add-file-light-text"> \t\t\t\t<span class="wd-fa-add-file-light-title diskuf-selector-link-cloud" data-bx-doc-handler="gdrive"> \t\t\t\t\t<span class="wd-fa-add-file-light-title-text">{$title}</span> \t\t\t\t</span> \t\t\t\t<span class="wd-fa-add-file-editor-file"> \t\t\t\t\t<a class="wd-fa-add-file-editor-link-block diskuf-selector-link-cloud" data-bx-doc-handler="onedrive" href="javascript:void(0)"> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-icon feed-file-icon-odr"></span> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-link">{$onedrive}</span> \t\t\t\t\t</a> \t\t\t\t\t<a class="wd-fa-add-file-editor-link-block diskuf-selector-link-cloud" data-bx-doc-handler="gdrive" href="javascript:void(0)"> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-icon feed-file-icon-gdr"></span> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-link">{$gdrive}</span> \t\t\t\t\t</a> \t\t\t\t\t<a class="wd-fa-add-file-editor-link-block diskuf-selector-link-cloud" data-bx-doc-handler="dropbox" href="javascript:void(0)"> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-icon feed-file-icon-drb"></span> \t\t\t\t\t\t<span class="wd-fa-add-file-editor-link">{$dropbox}</span> \t\t\t\t\t</a> \t\t\t\t</span> \t\t\t</span> \t\t</span> \t</td> HTML; }
/** * {@inheritdoc} */ public function getEditHtml() { $iblockId = (int) $this->getSettings('IBLOCK_ID'); $inputSize = (int) $this->getSettings('INPUT_SIZE'); $windowWidth = (int) $this->getSettings('WINDOW_WIDTH'); $windowHeight = (int) $this->getSettings('WINDOW_HEIGHT'); $name = 'FIELDS'; $key = $this->getCode(); $elementId = $this->getValue(); if (!empty($elementId)) { $rsElement = ElementTable::getById($elementId); if (!($element = $rsElement->fetchAll())) { $element['NAME'] = Loc::getMessage('IBLOCK_ELEMENT_NOT_FOUND'); } } else { $elementId = ''; } return '<input name="' . $this->getEditInputName() . '" id="' . $name . '[' . $key . ']" value="' . $elementId . '" size="' . $inputSize . '" type="text">' . '<input type="button" value="..." onClick="jsUtils.OpenWindow(\'/bitrix/admin/iblock_element_search.php?lang=' . LANGUAGE_ID . '&IBLOCK_ID=' . $iblockId . '&n=' . $name . '&k=' . $key . '\', ' . $windowWidth . ', ' . $windowHeight . ');">' . ' <span id="sp_' . md5($name) . '_' . $key . '" >' . static::prepareToOutput($element['NAME']) . '</span>'; }
/** * @inheritdoc */ protected function getEditHtml() { $style = $this->getSettings('STYLE'); $size = $this->getSettings('SIZE'); $link = ''; if ($this->getSettings('TRANSLIT')) { //TODO: refactor this! $uniqId = get_class($this->entityName) . '_' . $this->getCode(); $nameId = 'name_link_' . $uniqId; $linkedFunctionName = 'set_linked_' . get_class($this->entityName) . '_CODE'; //FIXME: hardcode here!!! if (isset($this->entityName->{$this->entityName->pk()})) { $pkVal = $this->entityName->{$this->entityName->pk()}; } else { $pkVal = '_new_'; } $nameId .= $pkVal; $linkedFunctionName .= $pkVal; $link = '<image id="' . $nameId . '" title="' . Loc::getMessage("IBSEC_E_LINK_TIP") . '" class="linked" src="/bitrix/themes/.default/icons/iblock/link.gif" onclick="' . $linkedFunctionName . '()" />'; } return '<input type="text" name="' . $this->getEditInputName() . '" value="' . static::prepareToTagAttr($this->getValue()) . '" size="' . $size . '" style="' . $style . '"/>' . $link; }
/** * Возвращает ХТМЛ-код с комбобоксом. * * @param bool $multiple Множественный режим. * @param bool $forFilter Комбобокс будет выводиться в блоке с фильтром. * * @return string */ protected function getComboBox($multiple = false, $forFilter = false) { if ($multiple) { $value = $this->getMultipleValue(); } else { $value = $this->getValue(); } $style = $this->getSettings('STYLE'); $variants = $this->getVariants(); if (!$multiple) { array_unshift($variants, array('ID' => null, 'TITLE' => null)); } if (empty($variants)) { $comboBox = Loc::getMessage('DIGITALWAND_AH_MISSING_VARIANTS'); } else { $name = $forFilter ? $this->getFilterInputName() : $this->getEditInputName(); $comboBox = '<select name="' . $name . ($multiple ? '[]' : null) . '" ' . ($multiple ? 'multiple="multiple"' : null) . ' style="' . $style . '">'; foreach ($variants as $variant) { $selected = false; if ($variant['ID'] == $value) { $selected = true; } if ($multiple && in_array($variant['ID'], $value)) { $selected = true; } elseif ($variant['ID'] === $value) { $selected = true; } $comboBox .= "<option value='" . static::prepareToTagAttr($variant['ID']) . "' " . ($selected ? "selected" : "") . ">" . static::prepareToTagAttr($variant['TITLE']) . "</option>"; } $comboBox .= '</select>'; } return $comboBox; }
public function getDataToShow() { $event = \CCalendarEvent::getById($this->entityId); if (empty($event)) { return array(); } $members = array(); if ($event['IS_MEETING']) { if (is_array($event['~ATTENDEES'])) { foreach ($event['~ATTENDEES'] as $user) { $members[] = array("NAME" => $user['DISPLAY_NAME'], "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $user['USER_ID'])), 'AVATAR_SRC' => $user['AVATAR'], "IS_EXTRANET" => "N"); } } } else { $by = "id"; $order = "asc"; $userRow = \CUser::getList($by, $order, array("ID_EQUAL_EXACT" => $event['CREATED_BY'], "ACTIVE" => "Y"), array("SELECT" => array('ID', 'NAME', 'LAST_NAME', 'LOGIN', 'PERSONAL_PHOTO')))->fetch(); if ($userRow) { $name = trim($userRow['NAME'] . ' ' . $userRow['LAST_NAME']); if ($name == '') { $name = trim($userRow['LOGIN']); } $members[] = array("NAME" => $name, "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $event['CREATED_BY'])), 'AVATAR_SRC' => Ui\Avatar::getPerson($userRow['PERSONAL_PHOTO']), "IS_EXTRANET" => "N"); } } return array('TITLE' => Loc::getMessage('DISK_UF_CAL_EVENT_CONNECTOR_TITLE') . ": " . $event['NAME'], 'DETAIL_URL' => null, 'DESCRIPTION' => Ui\Text::killTags($event['DESCRIPTION']), 'MEMBERS' => $members); }
protected function checkUpdatePermissions() { if (!$this->attachedModel->canUpdate($this->getUser()->getId())) { $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_UF_DOCUMENT_CONTROLLER_ERROR_BAD_RIGHTS'), self::ERROR_BAD_RIGHTS))); $this->sendJsonErrorResponse(); } }
function CheckFields($ACTION, &$arFields, $ID = 0) { global $APPLICATION; if ((is_set($arFields, "PRODUCT_ID") || $ACTION == "ADD") && intval($arFields["PRODUCT_ID"]) <= 0) { $APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_PRODUCT"), "EMPTY_PRODUCT_ID"); return false; } if ((is_set($arFields, "CATALOG_GROUP_ID") || $ACTION == "ADD") && intval($arFields["CATALOG_GROUP_ID"]) <= 0) { $APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_CATALOG_GROUP"), "EMPTY_CATALOG_GROUP_ID"); return false; } if ((is_set($arFields, "CURRENCY") || $ACTION == "ADD") && strlen($arFields["CURRENCY"]) <= 0) { $APPLICATION->ThrowException(Loc::getMessage("KGP_EMPTY_CURRENCY"), "EMPTY_CURRENCY"); return false; } if (isset($arFields['CURRENCY'])) { if (!($arCurrency = CCurrency::GetByID($arFields["CURRENCY"]))) { $APPLICATION->ThrowException(Loc::getMessage("KGP_NO_CURRENCY", array('#ID#' => $arFields["CURRENCY"])), "CURRENCY"); return false; } } if (is_set($arFields, "PRICE") || $ACTION == "ADD") { $arFields["PRICE"] = str_replace(",", ".", $arFields["PRICE"]); $arFields["PRICE"] = DoubleVal($arFields["PRICE"]); } if ((is_set($arFields, "QUANTITY_FROM") || $ACTION == "ADD") && intval($arFields["QUANTITY_FROM"]) <= 0) { $arFields["QUANTITY_FROM"] = false; } if ((is_set($arFields, "QUANTITY_TO") || $ACTION == "ADD") && intval($arFields["QUANTITY_TO"]) <= 0) { $arFields["QUANTITY_TO"] = false; } return true; }
protected function processActionShowSubFolders() { if (!$this->checkRequiredPostParams(array('objectId'))) { $this->sendJsonErrorResponse(); } $showOnlyDeleted = (bool) $this->request->getPost('showOnlyDeleted'); $isRoot = (bool) $this->request->getPost('isRoot'); /** @var Folder $folder */ $folder = Folder::loadById((int) $this->request->getPost('objectId'), array('STORAGE')); if (!$folder) { $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_BREADCRUMBS_ERROR_COULD_NOT_FIND_FOLDER'), self::ERROR_COULD_NOT_FIND_FOLDER))); $this->sendJsonErrorResponse(); } $securityContext = $folder->getStorage()->getCurrentUserSecurityContext(); $subFolders = array(); $filter = array('TYPE' => ObjectTable::TYPE_FOLDER); if ($showOnlyDeleted) { $filter['!=DELETED_TYPE'] = ObjectTable::DELETED_TYPE_NONE; } if ($showOnlyDeleted && $isRoot) { $filter['DELETED_TYPE'] = ObjectTable::DELETED_TYPE_ROOT; $children = $folder->getDescendants($securityContext, array('filter' => $filter)); } else { $children = $folder->getChildren($securityContext, array('filter' => $filter)); } foreach ($children as $subFolder) { /** @var Folder $subFolder */ $subFolders[] = array('id' => $subFolder->getId(), 'name' => $subFolder->getName(), 'isLink' => $subFolder->isLink()); } unset($subFolder); \Bitrix\Main\Type\Collection::sortByColumn($subFolders, 'name'); $this->sendJsonSuccessResponse(array('items' => $subFolders)); }
public static function getSettingsFields($type, $extFormat = false) { $extFormat = $extFormat === true; $result = array(); $type = (string) $type; if ($type !== '') { switch ($type) { case self::FIELDS_ELEMENT: $result = array('IE_XML_ID' => array('value' => 'IE_XML_ID', 'field' => 'XML_ID', 'important' => 'Y', 'name' => Loc::getMessage('CATI_FI_UNIXML_EXT') . ' (B_IBLOCK_ELEMENT.XML_ID)'), 'IE_NAME' => array('value' => 'IE_NAME', 'field' => 'NAME', 'important' => 'Y', 'name' => Loc::getMessage('CATI_FI_NAME') . ' (B_IBLOCK_ELEMENT.NAME)'), 'IE_ACTIVE' => array('value' => 'IE_ACTIVE', 'field' => 'ACTIVE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_ACTIV') . ' (B_IBLOCK_ELEMENT.ACTIVE)'), 'IE_ACTIVE_FROM' => array('value' => 'IE_ACTIVE_FROM', 'field' => 'ACTIVE_FROM', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_ACTIVFROM') . ' (B_IBLOCK_ELEMENT.ACTIVE_FROM)'), 'IE_ACTIVE_TO' => array('value' => 'IE_ACTIVE_TO', 'field' => 'ACTIVE_TO', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_ACTIVTO') . ' (B_IBLOCK_ELEMENT.ACTIVE_TO)'), 'IE_SORT' => array('value' => 'IE_SORT', 'field' => 'SORT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_SORT_EXT') . ' (B_IBLOCK_ELEMENT.SORT)'), 'IE_PREVIEW_PICTURE' => array('value' => 'IE_PREVIEW_PICTURE', 'field' => 'PREVIEW_PICTURE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_CATIMG_EXT') . ' (B_IBLOCK_ELEMENT.PREVIEW_PICTURE)'), 'IE_PREVIEW_TEXT' => array('value' => 'IE_PREVIEW_TEXT', 'field' => 'PREVIEW_TEXT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_CATDESCR_EXT') . ' (B_IBLOCK_ELEMENT.PREVIEW_TEXT)'), 'IE_PREVIEW_TEXT_TYPE' => array('value' => 'IE_PREVIEW_TEXT_TYPE', 'field' => 'PREVIEW_TEXT_TYPE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_CATDESCRTYPE_EXT') . ' (B_IBLOCK_ELEMENT.PREVIEW_TEXT_TYPE)'), 'IE_DETAIL_PICTURE' => array('value' => 'IE_DETAIL_PICTURE', 'field' => 'DETAIL_PICTURE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_DETIMG_EXT') . ' (B_IBLOCK_ELEMENT.DETAIL_PICTURE)'), 'IE_DETAIL_TEXT' => array('value' => 'IE_DETAIL_TEXT', 'field' => 'DETAIL_TEXT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_DETDESCR_EXT') . ' (B_IBLOCK_ELEMENT.DETAIL_TEXT)'), 'IE_DETAIL_TEXT_TYPE' => array('value' => 'IE_DETAIL_TEXT_TYPE', 'field' => 'DETAIL_TEXT_TYPE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_DETDESCRTYPE_EXT') . ' (B_IBLOCK_ELEMENT.DETAIL_TEXT_TYPE)'), 'IE_CODE' => array('value' => 'IE_CODE', 'field' => 'CODE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_CODE_EXT') . ' (B_IBLOCK_ELEMENT.CODE)'), 'IE_TAGS' => array('value' => 'IE_TAGS', 'field' => 'TAGS', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_TAGS') . ' (B_IBLOCK_ELEMENT.TAGS)'), 'IE_ID' => array('value' => 'IE_ID', 'field' => 'ID', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_ID') . ' (B_IBLOCK_ELEMENT.ID)')); break; case self::FIELDS_CATALOG: $result = array('CP_QUANTITY' => array('value' => 'CP_QUANTITY', 'field' => 'QUANTITY', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_QUANT') . ' (B_CATALOG_PRODUCT.QUANTITY)'), 'CP_QUANTITY_TRACE' => array('value' => 'CP_QUANTITY_TRACE', 'field' => 'QUANTITY_TRACE', 'field_orig' => 'QUANTITY_TRACE_ORIG', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_QUANTITY_TRACE') . ' (B_CATALOG_PRODUCT.QUANTITY_TRACE)'), 'CP_CAN_BUY_ZERO' => array('value' => 'CP_CAN_BUY_ZERO', 'field' => 'CAN_BUY_ZERO', 'field_orig' => 'CAN_BUY_ZERO_ORIG', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_CAN_BUY_ZERO') . ' (B_CATALOG_PRODUCT.CAN_BUY_ZERO)'), 'CP_NEGATIVE_AMOUNT_TRACE' => array('value' => 'CP_NEGATIVE_AMOUNT_TRACE', 'field' => 'NEGATIVE_AMOUNT_TRACE', 'field_orig' => 'NEGATIVE_AMOUNT_ORIG', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_NEGATIVE_AMOUNT_TRACE') . ' (B_CATALOG_PRODUCT.NEGATIVE_AMOUNT_TRACE)'), 'CP_WEIGHT' => array('value' => 'CP_WEIGHT', 'field' => 'WEIGHT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_WEIGHT') . ' (B_CATALOG_PRODUCT.WEIGHT)'), 'CP_WIDTH' => array('value' => 'CP_WIDTH', 'field' => 'WIDTH', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_WIDTH') . ' (B_CATALOG_PRODUCT.WIDTH)'), 'CP_HEIGHT' => array('value' => 'CP_HEIGHT', 'field' => 'HEIGHT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_HEIGHT') . ' (B_CATALOG_PRODUCT.HEIGHT)'), 'CP_LENGTH' => array('value' => 'CP_LENGTH', 'field' => 'LENGTH', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_LENGTH') . ' (B_CATALOG_PRODUCT.LENGTH)'), 'CP_PURCHASING_PRICE' => array('value' => 'CP_PURCHASING_PRICE', 'field' => 'PURCHASING_PRICE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_PURCHASING_PRICE') . ' (B_CATALOG_PRODUCT.PURCHASING_PRICE)'), 'CP_PURCHASING_CURRENCY' => array('value' => 'CP_PURCHASING_CURRENCY', 'field' => 'PURCHASING_CURRENCY', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_PURCHASING_CURRENCY') . ' (B_CATALOG_PRODUCT.PURCHASING_CURRENCY)'), 'CP_PRICE_TYPE' => array('value' => 'CP_PRICE_TYPE', 'field' => 'PRICE_TYPE', 'important' => 'N', 'name' => Loc::getMessage('I_PAY_TYPE') . ' (B_CATALOG_PRODUCT.PRICE_TYPE)'), 'CP_RECUR_SCHEME_LENGTH' => array('value' => 'CP_RECUR_SCHEME_LENGTH', 'field' => 'RECUR_SCHEME_LENGTH', 'important' => 'N', 'name' => Loc::getMessage('I_PAY_PERIOD_LENGTH') . ' (B_CATALOG_PRODUCT.RECUR_SCHEME_LENGTH)'), 'CP_RECUR_SCHEME_TYPE' => array('value' => 'CP_RECUR_SCHEME_TYPE', 'field' => 'RECUR_SCHEME_TYPE', 'important' => 'N', 'name' => Loc::getMessage('I_PAY_PERIOD_TYPE') . ' (B_CATALOG_PRODUCT.RECUR_SCHEME_TYPE)'), 'CP_TRIAL_PRICE_ID' => array('value' => 'CP_TRIAL_PRICE_ID', 'field' => 'TRIAL_PRICE_ID', 'important' => 'N', 'name' => Loc::getMessage('I_TRIAL_FOR') . ' (B_CATALOG_PRODUCT.TRIAL_PRICE_ID)'), 'CP_WITHOUT_ORDER' => array('value' => 'CP_WITHOUT_ORDER', 'field' => 'WITHOUT_ORDER', 'important' => 'N', 'name' => Loc::getMessage('I_WITHOUT_ORDER') . ' (B_CATALOG_PRODUCT.WITHOUT_ORDER)'), 'CP_VAT_ID' => array('value' => 'CP_VAT_ID', 'field' => 'VAT_ID', 'important' => 'N', 'name' => Loc::getMessage('I_VAT_ID') . ' (B_CATALOG_PRODUCT.VAT_ID)'), 'CP_VAT_INCLUDED' => array('value' => 'CP_VAT_INCLUDED', 'field' => 'VAT_INCLUDED', 'important' => 'N', 'name' => Loc::getMessage('I_VAT_INCLUDED') . ' (B_CATALOG_PRODUCT.VAT_INCLUDED)'), 'CP_MEASURE' => array('value' => 'CP_MEASURE', 'field' => 'MEASURE', 'important' => 'N', 'name' => Loc::getMessage('BX_CAT_CSV_SETTINGS_PRODUCT_FIELD_NAME_MEASURE_ID') . ' (B_CATALOG_PRODUCT.MEASURE)')); break; case self::FIELDS_PRICE: $result = array('CV_PRICE' => array('value' => 'CV_PRICE', 'value_size' => 8, 'field' => 'PRICE', 'important' => 'N', 'name' => Loc::getMessage('I_NAME_PRICE') . ' (B_CATALOG_PRICE.PRICE)'), 'CV_CURRENCY' => array('value' => 'CV_CURRENCY', 'value_size' => 11, 'field' => 'CURRENCY', 'important' => 'N', 'name' => Loc::getMessage('I_NAME_CURRENCY') . ' (B_CATALOG_PRICE.CURRENCY)'), 'CV_EXTRA_ID' => array('value' => 'CV_EXTRA_ID', 'value_size' => 11, 'field' => 'EXTRA_ID', 'important' => 'N', 'name' => Loc::getMessage('I_NAME_EXTRA_ID') . ' (B_CATALOG_PRICE.EXTRA_ID)')); break; case self::FIELDS_PRICE_EXT: $result = array('CV_QUANTITY_FROM' => array('value' => 'CV_QUANTITY_FROM', 'field' => 'QUANTITY_FROM', 'important' => 'N', 'name' => Loc::getMessage('I_NAME_QUANTITY_FROM') . ' (B_CATALOG_PRICE.QUANTITY_FROM)'), 'CV_QUANTITY_TO' => array('value' => 'CV_QUANTITY_TO', 'field' => 'QUANTITY_TO', 'important' => 'N', 'name' => Loc::getMessage('I_NAME_QUANTITY_TO') . ' (B_CATALOG_PRICE.QUANTITY_TO)')); break; case self::FIELDS_SECTION: $result = array('IC_ID' => array('value' => 'IC_ID', 'field' => 'ID', 'important' => 'N', 'name' => Loc::getMessage('CATI_FI_ID') . ' (B_IBLOCK_SECTION.ID)'), 'IC_XML_ID' => array('value' => 'IC_XML_ID', 'field' => 'XML_ID', 'important' => 'Y', 'name' => Loc::getMessage('CATI_FG_UNIXML_EXT') . ' (B_IBLOCK_SECTION.XML_ID)'), 'IC_GROUP' => array('value' => 'IC_GROUP', 'field' => 'NAME', 'important' => 'Y', 'name' => Loc::getMessage('CATI_FG_NAME') . ' (B_IBLOCK_SECTION.NAME)'), 'IC_ACTIVE' => array('value' => 'IC_ACTIVE', 'field' => 'ACTIVE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_ACTIV') . ' (B_IBLOCK_SECTION.ACTIVE)'), 'IC_SORT' => array('value' => 'IC_SORT', 'field' => 'SORT', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_SORT_EXT') . ' (B_IBLOCK_SECTION.SORT)'), 'IC_DESCRIPTION' => array('value' => 'IC_DESCRIPTION', 'field' => 'DESCRIPTION', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_DESCR') . ' (B_IBLOCK_SECTION.DESCRIPTION)'), 'IC_DESCRIPTION_TYPE' => array('value' => 'IC_DESCRIPTION_TYPE', 'field' => 'DESCRIPTION_TYPE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_DESCRTYPE') . ' (B_IBLOCK_SECTION.DESCRIPTION_TYPE)'), 'IC_CODE' => array('value' => 'IC_CODE', 'field' => 'CODE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_CODE_EXT2') . ' (B_IBLOCK_SECTION.CODE)'), 'IC_PICTURE' => array('value' => 'IC_PICTURE', 'field' => 'PICTURE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_PICTURE') . ' (B_IBLOCK_SECTION.PICTURE)'), 'IC_DETAIL_PICTURE' => array('value' => 'IC_DETAIL_PICTURE', 'field' => 'DETAIL_PICTURE', 'important' => 'N', 'name' => Loc::getMessage('CATI_FG_DETAIL_PICTURE') . ' (B_IBLOCK_SECTION.DETAIL_PICTURE)')); break; } } return $extFormat ? $result : array_values($result); }
private function getGridData($gridId) { $grid = array('ID' => $gridId); $securityContext = $this->storage->getCurrentUserSecurityContext(); $parameters = array('with' => array('FILE', 'CREATE_USER'), 'filter' => array('IS_EXPIRED' => false, 'OBJECT.STORAGE_ID' => $this->storage->getId(), 'CREATED_BY' => $this->getUser()->getId())); $parameters = Driver::getInstance()->getRightsManager()->addRightsCheck($securityContext, $parameters, array('OBJECT_ID', 'OBJECT.CREATED_BY')); $items = ExternalLink::getModelList($parameters); Collection::sortByColumn($items, array('CREATE_TIME' => array(SORT_NUMERIC, SORT_ASC))); $urlManager = Driver::getInstance()->getUrlManager(); $rows = array(); foreach ($items as $externalLink) { /** @var ExternalLink $externalLink */ $exportData = $externalLink->toArray(); $nameSpecialChars = htmlspecialcharsbx($externalLink->getFile()->getName()); $createDateText = htmlspecialcharsbx((string) $externalLink->getCreateTime()); $columnName = "\n\t\t\t\t<table class=\"bx-disk-object-name\"><tr>\n\t\t\t\t\t\t<td style=\"width: 45px;\"><div data-object-id=\"{$externalLink->getId()}\" class=\"draggable bx-file-icon-container-small bx-disk-file-icon\"></div></td>\n\t\t\t\t\t\t<td><a class=\"bx-disk-folder-title\" id=\"disk_obj_{$externalLink->getId()}\" href=\"\" data-bx-dateModify=\"{$createDateText}\">{$nameSpecialChars}</a></td>\n\t\t\t\t</tr></table>\n\t\t\t"; $createdByLink = \CComponentEngine::makePathFromTemplate($this->arParams['PATH_TO_USER'], array("user_id" => $externalLink->getCreatedBy())); $rows[] = array('data' => $exportData, 'columns' => array('CREATE_TIME' => formatDate('x', $externalLink->getCreateTime()->getTimestamp(), time() + CTimeZone::getOffset()), 'UPDATE_TIME' => formatDate('x', $externalLink->getCreateTime()->getTimestamp(), time() + CTimeZone::getOffset()), 'NAME' => $columnName, 'FORMATTED_SIZE' => CFile::formatSize($externalLink->getFile()->getSize()), 'CREATE_USER' => "\n\t\t\t\t\t\t<div class=\"bx-disk-user-link\"><a target='_blank' href=\"{$createdByLink}\" id=\"\">" . htmlspecialcharsbx($externalLink->getCreateUser()->getFormattedName()) . "</a></div>\n\t\t\t\t\t"), 'actions' => array(array("PSEUDO_NAME" => "download", "DEFAULT" => true, "ICONCLASS" => "download", "TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DOWNLOAD'), "ONCLICK" => "jsUtils.Redirect(arguments, '" . $urlManager->getUrlForDownloadFile($externalLink->getFile()) . "')"), array("PSEUDO_NAME" => "disable_external_link", "ICONCLASS" => "disable_external_link", "TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DISABLE_EXTERNAL_LINK'), "SHORT_TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DISABLE_EXTERNAL_LINK_SHORT'), "ONCLICK" => "BX.Disk['ExternalLinkListClass_{$this->getComponentId()}'].disableExternalLink({$externalLink->getId()}, {$externalLink->getObjectId()})"))); } unset($externalLink); $grid['MODE'] = 'list'; $grid['HEADERS'] = array(array('id' => 'ID', 'name' => 'ID', 'default' => false, 'show_checkbox' => true), array('id' => 'NAME', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_NAME'), 'default' => true), array('id' => 'CREATE_TIME', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_CREATE_TIME'), 'default' => true), array('id' => 'CREATE_USER', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_CREATE_USER'), 'default' => false), array('id' => 'FORMATTED_SIZE', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_FORMATTED_SIZE'), 'default' => true)); $grid['ROWS'] = $rows; $grid['ROWS_COUNT'] = count($rows); $grid['FOOTER'] = array(); return $grid; }
public function loadMigrations() { $result = array('mgrs' => array(), 'headers' => array(array('id' => 'id', 'content' => Loc::getMessage('MIGRATION_ID'), 'sort' => 'id', 'align' => 'left', 'default' => true), array('id' => 'status', 'content' => Loc::getMessage('MIGRATION_STATUS'), 'align' => 'right', 'default' => true), array('id' => 'date_c', 'content' => Loc::getMessage('MIGRATION_DATE_CHANGED'), 'align' => 'right', 'default' => true), array('id' => 'date_a', 'content' => Loc::getMessage('MIGRATION_DATE_ADDED'), 'align' => 'right', 'default' => true))); $db_mgrs = $this->loadDBMigrations(); $mgr_path = Option::get(UM_BM_MODULE_NAME, 'migration_folder', UM_BM_MGR_PATH); $di = new \DirectoryIterator($_SERVER['DOCUMENT_ROOT'] . $mgr_path); while ($di->valid()) { if (!$di->isDot() && $this->hasProperFilename($di->getFilename())) { $filename = $di->getFilename(); if (!array_key_exists($filename, $db_mgrs)) { $mgr = new BixMigBase(); $mgr->setCode($filename)->setStatus('UNKNOWN')->setAddDate(date('d.m.Y H:i:s'))->setChangeDate()->add(); $result['mgrs'][] = $mgr; } else { $result['mgrs'][] = $db_mgrs[$filename]; unset($db_mgrs[$filename]); } } $di->next(); } if (!empty($db_mgrs)) { $this->deleteOrphans($db_mgrs); } return $result; }
/** * @return array */ protected function toView() { /* @global CUser $USER */ global $USER; if (!CModule::includeModule('security')) { return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_MODULE_ERROR')); } if (!Otp::isOtpRequiredByMandatory()) { return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_NOT_REQUIRED')); } if ($USER->IsAuthorized()) { return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_AUTH_ERROR')); } $deferredParams = Otp::getDeferredParams(); if (!$deferredParams['USER_ID']) { return array('MESSAGE' => Loc::getMessage('SECURITY_AUTH_OTP_MANDATORY_UNKNOWN_ERROR')); } $result = array(); $otp = Otp::getByUser($deferredParams['USER_ID']); $otp->regenerate(); $result['SECRET'] = $otp->getHexSecret(); $result['TYPE'] = $otp->getType(); $result['APP_SECRET'] = $otp->getAppSecret(); $result['APP_SECRET_SPACED'] = chunk_split($result['APP_SECRET'], 4, ' '); $result['PROVISION_URI'] = $otp->getProvisioningUri(); $result['SUCCESSFUL_URL'] = $this->arParams['SUCCESSFUL_URL']; $result['TWO_CODE_REQUIRED'] = $otp->getAlgorithm()->isTwoCodeRequired(); $result['OTP'] = $otp; return $result; }
/** * @return string */ public function getLocMessage() { if (!$this->locMessage) { return ''; } return Loc::getMessage($this->locMessage); }
public static function onGetRateTypes() { $scale = array(0.5, 1, 1.5, 2, 5); $format = array('SUM' => function ($value, $format = null) { return Config::formatToBaseCurrency($value, $format); }); $units = array('SUM' => Config::getBaseCurrencyUnit()); // TODO deprecated return array('sale_payment' => array('NAME' => Loc::getMessage('SALE_CONVERSION_RATE_PAYMENT_NAME'), 'SCALE' => $scale, 'FORMAT' => $format, 'UNITS' => $units, 'MODULE' => 'sale', 'SORT' => 1100, 'COUNTERS' => array('conversion_visit_day', 'sale_payment_add_day', 'sale_payment_sum_add'), 'CALCULATE' => function (array $counters) { $denominator = $counters['conversion_visit_day'] ?: 0; $numerator = $counters['sale_payment_add_day'] ?: 0; $sum = $counters['sale_payment_sum_add'] ?: 0; return array('DENOMINATOR' => $denominator, 'NUMERATOR' => $numerator, 'RATE' => $denominator ? $numerator / $denominator : 0, 'SUM' => $sum); }), 'sale_order' => array('NAME' => Loc::getMessage('SALE_CONVERSION_RATE_ORDER_NAME'), 'SCALE' => $scale, 'FORMAT' => $format, 'UNITS' => $units, 'MODULE' => 'sale', 'SORT' => 1200, 'COUNTERS' => array('conversion_visit_day', 'sale_order_add_day', 'sale_order_sum_add'), 'CALCULATE' => function (array $counters) { $denominator = $counters['conversion_visit_day'] ?: 0; $numerator = $counters['sale_order_add_day'] ?: 0; $sum = $counters['sale_order_sum_add'] ?: 0; return array('DENOMINATOR' => $denominator, 'NUMERATOR' => $numerator, 'RATE' => $denominator ? $numerator / $denominator : 0, 'SUM' => $sum); }), 'sale_cart' => array('NAME' => Loc::getMessage('SALE_CONVERSION_RATE_CART_NAME'), 'SCALE' => $scale, 'FORMAT' => $format, 'UNITS' => $units, 'MODULE' => 'sale', 'SORT' => 1300, 'COUNTERS' => array('conversion_visit_day', 'sale_cart_add_day', 'sale_cart_sum_add'), 'CALCULATE' => function (array $counters) { $denominator = $counters['conversion_visit_day'] ?: 0; $numerator = $counters['sale_cart_add_day'] ?: 0; $sum = $counters['sale_cart_sum_add'] ?: 0; return array('DENOMINATOR' => $denominator, 'NUMERATOR' => $numerator, 'RATE' => $denominator ? $numerator / $denominator : 0, 'SUM' => $sum); })); }
function InstallDB($install_wizard = true) { global $DB, $DBType, $APPLICATION; $errors = null; if (!$DB->Query("SELECT 'x' FROM b_disk_storage", true)) { $errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/db/" . $DBType . "/install.sql"); } $this->InstallTasks(); if (!empty($errors)) { $APPLICATION->ThrowException(implode("", $errors)); return false; } $isWebdavInstalled = isModuleInstalled('webdav'); $this->RegisterModuleDependences(!$isWebdavInstalled); RegisterModule("disk"); $this->InstallUserFields(); /** @noinspection PhpDynamicAsStaticMethodCallInspection */ CAgent::addAgent('\\Bitrix\\Disk\\ExternalLink::removeExpiredWithTypeAuto();', 'disk', 'N'); /** @noinspection PhpDynamicAsStaticMethodCallInspection */ CAgent::addAgent('\\Bitrix\\Disk\\Bitrix24Disk\\UploadFileManager::removeIrrelevant();', 'disk', 'N'); if (!$isWebdavInstalled) { require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/lib/configuration.php"; \Bitrix\Main\Config\Option::set('disk', 'successfully_converted', 'Y'); \Bitrix\Main\Config\Option::set('disk', 'disk_revision_api', \Bitrix\Disk\Configuration::REVISION_API); } else { \CAdminNotify::add(array("MESSAGE" => Loc::getMessage("DISK_NOTIFY_MIGRATE_WEBDAV", array("#LINK#" => "/bitrix/admin/disk_from_webdav_convertor.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "disk_migrate_from_webdav", "MODULE_ID" => "disk", "ENABLE_CLOSE" => "N")); } return true; }
public static function showTab($div, $iblockElementInfo) { $engineList = array(); if (Option::get('main', 'vendor', '') == '1c_bitrix') { $engineList[] = array("DIV" => "yandex_direct", "TAB" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT"), "TITLE" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT_TITLE"), "HANDLER" => IO\Path::combine(Application::getDocumentRoot(), BX_ROOT, "/modules/seo/admin/tab/seo_search_yandex_direct.php")); } if (count($engineList) > 0) { $engineTabControl = new \CAdminViewTabControl("engineTabControl", $engineList); ?> <tr> <td colspan="2"> <?php $engineTabControl->begin(); foreach ($engineList as $engineTab) { $engineTabControl->beginNextTab(); $file = new IO\File($engineTab["HANDLER"]); if ($file->isExists()) { require $file->getPath(); } } $engineTabControl->end(); ?> </td> </tr> <?php } }
/** * MYSQL_ADD_SLAVE action modifyer * @param string $actionId - action idenifyer * @param array $actionParams - action parameterss * @param string $hostname - server hostname * @return array - modifyed action params * @throws NeedMoreUserInfoException */ public static function mysqlAddSlave($actionId, $actionParams, $hostname) { $action = new Action("MYSQL_ADD_SLAVE_MODIFYER", array("START_COMMAND_TEMPLATE" => "sudo -u root /opt/webdir/bin/bx-mysql -a options -o json", "LOG_LEVEL" => Logger::LOG_LEVEL_DISABLE), "", array()); $action->start(); $actRes = $action->getResult(); $needModeInfo = false; if (isset($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"]) && is_array($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"])) { foreach ($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"] as $option) { if ($option == "cluster_password" || $option == "replica_password") { $actionParams["START_COMMAND_TEMPLATE"] .= " --" . $option . "=" . \Bitrix\Scale\Helper::generatePass(); } elseif ($option == "mysql_password") { $actionParams["START_COMMAND_TEMPLATE"] .= " --" . $option . "=##USER_PARAMS:MYSQL_PASS##"; if (!isset($actionParams["USER_PARAMS"])) { $actionParams["USER_PARAMS"] = array(); } $actionParams["USER_PARAMS"]["MYSQL_PASS"] = array("NAME" => Loc::getMessage("SCALE_AM_MYAR_MYSQL_PASS"), "TYPE" => "PASSWORD", "REQUIRED" => "Y", "VERIFY_TWICE" => "Y"); $needModeInfo = true; } } if ($needModeInfo) { throw new NeedMoreUserInfoException("Need more user's info", $actionParams); } } return $actionParams; }
public static function OnApplicationsBuildList() { $result = array("ID" => "ws_crmintegration", "NAME" => Loc::getMessage("WS_CRMINTEGRATION_APP_TITLE"), "DESCRIPTION" => Loc::getMessage("WS_CRMINTEGRATION_APP_DESC"), "SORT" => 150, "CLASS" => '\\Bitrix\\Crm\\Integration\\Application', "OPTIONS_CAPTION" => Loc::getMessage('WS_CRMINTEGRATION_APP_OPTIONS_CAPTION'), "OPTIONS" => array(Loc::getMessage("WS_CRMINTEGRATION_APP_OPTIONS_TITLE_SALE"))); if ("ru" === LANGUAGE_ID) { $result["OPTIONS"][] = Loc::getMessage("WS_CRMINTEGRATION_APP_OPTIONS_TITLE_1C"); } return $result; }
/** * Return name of storage. * @return string */ public function getTitle() { $entityId = $this->storage->getEntityId(); if ($entityId == 'shared_files_s1' || $entityId == 'shared_files' || $entityId == 'shared') { return Loc::getMessage('DISK_PROXY_TYPE_COMMON_TITLE_S1'); } return parent::getTitle(); }
public function getDataToShow() { $data = $this->loadTaskData($this->getUser()->getId()); if (!$data) { return null; } return array('TITLE' => Loc::getMessage('DISK_UF_TASK_CONNECTOR_TITLE', array('#ID#' => $this->entityId)), 'DETAIL_URL' => null, 'DESCRIPTION' => Ui\Text::killTags($data['TITLE']), 'MEMBERS' => $this->getDestinations()); }
public static function GetCatalogTypes($boolFull = false) { $boolFull = $boolFull === true; if ($boolFull) { return array(self::TYPE_CATALOG => Loc::getMessage('BT_CAT_SKU_TYPE_CATALOG'), self::TYPE_PRODUCT => Loc::getMessage('BT_CAT_SKU_TYPE_PRODUCT'), self::TYPE_OFFERS => Loc::getMessage('BT_CAT_SKU_TYPE_OFFERS'), self::TYPE_FULL => Loc::getMessage('BT_CAT_SKU_TYPE_FULL')); } return array(self::TYPE_CATALOG, self::TYPE_PRODUCT, self::TYPE_OFFERS, self::TYPE_FULL); }
/** * @param string $name * @param mixed $value * * @return string */ protected function renderControl($name, $value = null) { return '<select name="' . $name . '"> <option value="">' . htmlentities(Loc::getMessage('SERGINHOLD_BOOLEAN_PROPERTY_ANY'), ENT_QUOTES) . '</option> <option value="1" ' . ($value ? 'selected' : null) . '>' . htmlentities(Loc::getMessage('SERGINHOLD_BOOLEAN_PROPERTY_YES'), ENT_QUOTES) . '</option> <option value="0" ' . ($value === 0 ? 'selected' : null) . '>' . htmlentities(Loc::getMessage('SERGINHOLD_BOOLEAN_PROPERTY_NO'), ENT_QUOTES) . '</option> </select>'; }
public function onPrepareComponentParams($arParams) { $arParams['ERROR'] = array(); if (!Loader::includeModule('lists')) { $arParams['ERROR'][] = Loc::getMessage('CC_BLL_MODULE_NOT_INSTALLED'); } return $arParams; }
function DoUninstall() { global $APPLICATION; $eventManager = \Bitrix\Main\EventManager::getInstance(); UnRegisterModule($this->MODULE_ID); $eventManager->unRegisterEventHandler('main', 'OnPageStart', $this->MODULE_ID, '\\DigitalWand\\AdminHelper\\EventHandlers', 'onPageStart'); $APPLICATION->IncludeAdminFile(Loc::getMessage('ADMIN_HELPER_INSTALL_TITLE'), __DIR__ . '/unstep.php'); }
/** * @return bool * @throws \Bitrix\Main\LoaderException */ protected function checkModules() { if (!Loader::includeModule('adelshin.person')) { ShowError(Loc::getMessage('ADELSHIN_PERSON_MODULE_NOT_INSTALLED')); return false; } return true; }
protected function processActionDefault() { $this->getData(); if ($this->arParams['SET_TITLE'] == 'Y') { $this->getApplication()->setTitle(Loc::getMessage('BPABS_TITLE')); } $this->includeComponentTemplate(); }
public function setCurrency($currency) { $allowed_currency = array("BYR", "BYN"); if (!in_array($currency, $allowed_currency)) { throw new \Exception(sprintf(Loc::getMessage("DEVTM_ERIP_PRICE_CURRENCY_ERROR"), $currency)); } $this->currency = $currency; }
/** * Returns reservation condition list. * * @param bool $extendedMode Format mode. * @return array */ public static function getReservationConditionList($extendedMode = false) { $extendedMode = $extendedMode === true; if ($extendedMode) { return array(self::RESERVE_ON_CREATE => Loc::getMessage('SALE_CONFIGURATION_RESERVE_ON_CREATE'), self::RESERVE_ON_FULL_PAY => Loc::getMessage('SALE_CONFIGURATION_RESERVE_ON_FULL_PAY'), self::RESERVE_ON_PAY => Loc::getMessage('SALE_CONFIGURATION_RESERVE_ON_PAY'), self::RESERVE_ON_ALLOW_DELIVERY => Loc::getMessage('SALE_CONFIGURATION_RESERVE_ON_ALLOW_DELIVERY'), self::RESERVE_ON_SHIP => Loc::getMessage('SALE_CONFIGURATION_RESERVE_ON_SHIP')); } return array(self::RESERVE_ON_CREATE, self::RESERVE_ON_FULL_PAY, self::RESERVE_ON_PAY, self::RESERVE_ON_ALLOW_DELIVERY, self::RESERVE_ON_SHIP); }
/** * @param string $name * @param string $value * * @return string */ protected function renderDescription($name, $value) { $placeholder = htmlentities(Loc::getMessage('SERGINHOLD_BOOLEAN_PROPERTY_PLACEHOLDER_DESCRIPTION'), ENT_QUOTES); $value = htmlentities($value, ENT_QUOTES); return '<div style="margin-top: 5px"> <input type="text" name="' . $name . '" placeholder="' . $placeholder . '" value="' . $value . '" size="50"> </div>'; }