?> " size="40"><?php echo ShowFilterLogicHelp(); ?> </td> </tr> <tr> <td><?php echo GetMessage("SUP_FILTER_OPEN_TIME"); ?> :</td> <td> <select id="filter_open_time" name="filter_open_time"> <option value=""></option>'; <?php $arr = CSupportHolidays::GetOpenTimeArray(); foreach ($arr as $v => $n) { $ss = substr($v, 0, 3); if ($ss == "GB_") { echo '<optgroup label="' . GetMessage($n) . '">'; } elseif ($ss == "GE_") { echo '</optgroup>'; } else { echo '<option value="' . $v . '">' . GetMessage($n) . '</option>'; } } ?> </select> </td> </tr>
function Tab1($adminForm) { $adminForm->BeginCustomField("NAME", GetMessage("SUP_NAME"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><input type="text" maxlength="255" name="NAME" size="50" value="<?php echo CSupportPage::$holidaysFields->getFieldForOutput("NAME", CSupportTableFields::ATTRIBUTE); ?> "></td> </tr> <?php $adminForm->EndCustomField("NAME"); $adminForm->BeginCustomField("OPEN_TIME", GetMessage("SUP_OPEN_TIME"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"> <select id="OPEN_TIME" size="1" name="OPEN_TIME"> <?php $arr = CSupportHolidays::GetOpenTimeArray(); foreach ($arr as $v => $n) { $ss = substr($v, 0, 3); if ($ss == "GB_") { echo '<optgroup label="' . GetMessage($n) . '">'; } elseif ($ss == "GE_") { echo '</optgroup>'; } else { echo '<option ' . ($v == CSupportPage::$holidaysFields->OPEN_TIME ? 'selected ' : '') . 'value="' . $v . '">' . GetMessage($n) . '</option>'; } } ?> </select> </td> </tr> <?php $adminForm->EndCustomField("OPEN_TIME"); $adminForm->BeginCustomField("DATE_FROM", GetMessage("SUP_DATE_FROM"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><?php echo CalendarDate("DATE_FROM", GetTime(CSupportPage::$holidaysFields->DATE_FROM, "FULL"), "supTabControl", "20"); ?> </td> </tr> <?php $adminForm->EndCustomField("DATE_FROM"); $adminForm->BeginCustomField("DATE_TILL", GetMessage("SUP_DATE_TILL"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><?php echo CalendarDate("DATE_TILL", GetTime(CSupportPage::$holidaysFields->DATE_TILL, "FULL"), "supTabControl", "20"); ?> </td> </tr> <?php $adminForm->EndCustomField("DATE_TILL"); $adminForm->BeginCustomField("SLA_ID", GetMessage("SUP_SLA_ID"), false); ?> <tr valign="top"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"> <?php $arrSLA_ID = CSupportPage::$holidaysSlaFields->getColumn("SLA_ID"); $arSort = array(); $ar = CTicketSLA::GetList($arSort, array(), $is_filtered); $idR = 0; while ($arR = $ar->Fetch()) { $idR++; echo InputType("checkbox", "SLA_ID[]", $arR["ID"], $arrSLA_ID, false, "", "", $idR) . '<label for="' . $idR . '"> ' . htmlspecialcharsbx($arR["NAME"]) . "</label><br>"; } ?> </td> </tr> <?php $adminForm->EndCustomField("SLA_ID"); $adminForm->BeginCustomField("DESCRIPTION", GetMessage("SUP_DESCRIPTION"), false); ?> <tr class="heading"> <td colspan="2"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> </tr> <tr> <td colspan="2" align="center"><textarea style="width:60%; height:150px;" name="DESCRIPTION" wrap="VIRTUAL"><?php echo CSupportPage::$holidaysFields->getFieldForOutput("DESCRIPTION", CSupportTableFields::ATTRIBUTE); ?> </textarea></td> </tr> <?php $adminForm->EndCustomField("DESCRIPTION"); }
function Tab1($adminForm) { $adminForm->BeginCustomField("NAME", GetMessage("SUP_NAME"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><input type="text" maxlength="255" name="NAME" size="50" value="<?php echo CSupportPage::$holidaysFields->getFieldForOutput("NAME", CSupportTableFields::ATTRIBUTE); ?> "></td> </tr> <?php $adminForm->EndCustomField("NAME"); $adminForm->BeginCustomField("OPEN_TIME", GetMessage("SUP_OPEN_TIME"), false); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"> <select id="OPEN_TIME" name="OPEN_TIME" onchange="changeOpenTimeFormat()"> <?php $arr = CSupportHolidays::GetOpenTimeArray(); foreach ($arr as $v => $n) { $ss = substr($v, 0, 3); if ($ss == "GB_") { echo '<optgroup label="' . GetMessage($n) . '">'; } elseif ($ss == "GE_") { echo '</optgroup>'; } else { echo '<option ' . ($v == CSupportPage::$holidaysFields->OPEN_TIME ? 'selected ' : '') . 'value="' . $v . '">' . GetMessage($n) . '</option>'; } } ?> </select> </td> </tr> <script type="text/javascript"> function changeOpenTimeFormat() { var inputFrom = BX.findChild(BX('supTabControl_form'), {attr:{name:'DATE_FROM'}}, true); var inputTill = BX.findChild(BX('supTabControl_form'), {attr:{name:'DATE_TILL'}}, true); inputFrom.value = BX.calendar.ValueToString(BX.parseDate(inputFrom.value), BX('OPEN_TIME').value.slice(-2) == '_H'); inputTill.value = BX.calendar.ValueToString(BX.parseDate(inputTill.value), BX('OPEN_TIME').value.slice(-2) == '_H'); } </script> <?php $adminForm->EndCustomField("OPEN_TIME"); $adminForm->BeginCustomField("DATE_FROM", GetMessage("SUP_DATE_FROM"), false); if (CSupportPage::$holidaysFields->OPEN_TIME == 'HOLIDAY_H' || CSupportPage::$holidaysFields->OPEN_TIME == 'WORKDAY_H') { $time = GetTime(CSupportPage::$holidaysFields->DATE_FROM, "FULL"); } else { $time = GetTime(CSupportPage::$holidaysFields->DATE_FROM, "SHORT"); } $dateControl = str_replace(array('bTime: true', 'bHideTime: false', 'BX.calendar({'), array('bTime: BX(\'OPEN_TIME\').value.slice(-2) == \'_H\'', 'bHideTime: BX(\'OPEN_TIME\').value.slice(-2) != \'_H\'', 'BX.calendar({callback_after: function(param){this.params.field.value = BX.calendar.ValueToString(param, BX(\'OPEN_TIME\').value.slice(-2) == \'_H\')}, '), CalendarDate("DATE_FROM", $time, "supTabControl", "20")); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><?php echo $dateControl; ?> </td> </tr> <?php $adminForm->EndCustomField("DATE_FROM"); $adminForm->BeginCustomField("DATE_TILL", GetMessage("SUP_DATE_TILL"), false); if (CSupportPage::$holidaysFields->OPEN_TIME == 'HOLIDAY_H' || CSupportPage::$holidaysFields->OPEN_TIME == 'WORKDAY_H') { $time = GetTime(CSupportPage::$holidaysFields->DATE_TILL, "FULL"); } else { $time = GetTime(CSupportPage::$holidaysFields->DATE_TILL, "SHORT"); } $dateControl = str_replace(array('bTime: true', 'bHideTime: false', 'BX.calendar({'), array('bTime: BX(\'OPEN_TIME\').value.slice(-2) == \'_H\'', 'bHideTime: BX(\'OPEN_TIME\').value.slice(-2) != \'_H\'', 'BX.calendar({callback_after: function(param){this.params.field.value = BX.calendar.ValueToString(param, BX(\'OPEN_TIME\').value.slice(-2) == \'_H\')}, '), CalendarDate("DATE_TILL", $time, "supTabControl", "20")); ?> <tr class="adm-detail-required-field"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"><?php echo $dateControl; ?> </td> </tr> <?php $adminForm->EndCustomField("DATE_TILL"); $adminForm->BeginCustomField("SLA_ID", GetMessage("SUP_SLA_ID"), false); ?> <tr valign="top"> <td width="40%" align="right"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> <td width="60%"> <?php $arrSLA_ID = CSupportPage::$holidaysSlaFields->getColumn("SLA_ID"); $arSort = array(); $is_filtered = null; $ar = CTicketSLA::GetList($arSort, array(), $is_filtered); $idR = 0; while ($arR = $ar->Fetch()) { $idR++; echo InputType("checkbox", "SLA_ID[]", $arR["ID"], $arrSLA_ID, false, "", "", $idR) . '<label for="' . $idR . '"> ' . htmlspecialcharsbx($arR["NAME"]) . "</label><br>"; } ?> </td> </tr> <?php $adminForm->EndCustomField("SLA_ID"); $adminForm->BeginCustomField("DESCRIPTION", GetMessage("SUP_DESCRIPTION"), false); ?> <tr class="heading"> <td colspan="2"><?php echo $adminForm->GetCustomLabelHTML(); ?> :</td> </tr> <tr> <td colspan="2" align="center"><textarea style="width:60%; height:150px;" name="DESCRIPTION" wrap="VIRTUAL"><?php echo CSupportPage::$holidaysFields->getFieldForOutput("DESCRIPTION", CSupportTableFields::ATTRIBUTE); ?> </textarea></td> </tr> <?php $adminForm->EndCustomField("DESCRIPTION"); }