Example #1
0
 public function getViewControl()
 {
     return Input\Manager::getViewHtml($this->params, $this->value);
 }
Example #2
0
 function getViewHtml()
 {
     return Input\Manager::getViewHtml($this->property, $this->getValue());
 }
Example #3
0
 public static function getViewHtmlSingle(array $input, $values)
 {
     $result = "";
     foreach ($input["ITEMS"] as $key => $item) {
         $result .= isset($item["NAME"]) ? $item["NAME"] : "" . Input\Manager::getViewHtml($item, isset($values[$key]) ? $values[$key] : null) . " ";
     }
     return $result;
 }
        $className = "";
    }
    if (!$record["PARAMS"]) {
        $record["PARAMS"] = array();
    }
    $editAction = "BX.Sale.Delivery.getRestrictionParamsHtml({" . "class: '" . \CUtil::JSEscape($record["CLASS_NAME"]) . "',deliveryId: " . $ID . ",title: '" . $className . "',restrictionId: " . $record["ID"] . ",params: " . \CUtil::PhpToJSObject($record["PARAMS"]) . ",sort: " . $record["SORT"] . ",lang: '" . LANGUAGE_ID . "'" . "});";
    $row =& $lAdmin->AddRow($record['ID'], $record);
    $row->AddField('ID', '<a href="javascript:void(0);" onclick="' . $editAction . '">' . $record['ID'] . '</a>');
    $row->AddField('SORT', $record['SORT']);
    $row->AddField('CLASS_NAME', $className);
    $restriction = Services\Manager::getRestrictionObject($record['CLASS_NAME']);
    $paramsStructure = $restriction->getParamsStructure($ID);
    $record["PARAMS"] = $restriction->prepareParamsValues($record["PARAMS"], $ID);
    $paramsField = "";
    foreach ($paramsStructure as $name => $params) {
        $paramsField .= (isset($params["LABEL"]) && strlen($params["LABEL"]) > 0 ? $params["LABEL"] . ": " : "") . Input\Manager::getViewHtml($params, isset($record["PARAMS"][$name]) ? $record["PARAMS"][$name] : null) . "<br>";
    }
    $row->AddField('PARAMS', $paramsField);
    if ($saleModulePermissions >= "W") {
        $arActions = array();
        $arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("SALE_RDL_EDIT_DESCR"), "ACTION" => $editAction, "DEFAULT" => true);
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SALE_RDL_DELETE"), "ACTION" => "javascript:if(confirm('" . Loc::getMessage("SALE_RDL_CONFIRM_DEL_MESSAGE") . "')) BX.Sale.Delivery.deleteRestriction(" . $record["ID"] . "," . $ID . ");");
        $row->AddActions($arActions);
    }
}
if ($saleModulePermissions == "W") {
    $restrictionsMenu = array();
    foreach ($restrictionClassNames as $class) {
        if (strlen($class) <= 0) {
            continue;
Example #5
0
 public function getViewControl()
 {
     return Input\Manager::getViewHtml(array("TYPE" => "ENUM", "OPTIONS" => self::getStoresList(true, strlen(SITE_ID) > 0 ? SITE_ID : "")), $this->value);
 }