/** * Display the time search form on the admin advanced search page */ protected function _itemsSearch() { $unitsDetails = SELF::_fetchUnitDetails(); $unitSelect = $unitsDetails["unitSelect"]; unset($unitSelect[-1]); // remove "Select below" echo common('range-search-advanced-search', array("selectUnits" => $unitSelect)); }
$result = "<span class='rangeTextArea'>"; $result .= implode("</span> – <span class='rangeTextArea'>", $htmlTextFields); $result .= "</span>"; return $result; } // ------------------------------------------------------ ?> <div id="range-search-popup" style="overflow: auto; padding: 20px; border-radius: 6px; background: #fff" class="lity-hide"> <h2><?php echo __("Range Entry"); ?> </h2> <p> <?php $unitsDetails = SELF::_fetchUnitDetails(); $saniUnits = $unitsDetails["saniUnits"]; $saniConversions = $unitsDetails["saniConversions"]; $saniGroups = $unitsDetails["saniGroups"]; $existingGroups = $unitsDetails["existingGroups"]; $unitSelect = $unitsDetails["unitSelect"]; $jsGroups = array(0 => array(), 1 => array()); // $jsGroups[0] is going to store the groups with numerical IDs // ... as array containing the corresponding triple units // $jsGroups[1] is going to store an array of the triple unit IDs // ... containing the corresponding numerical group ID foreach (array_keys($existingGroups) as $idx => $groupTitle) { $jsGroups[0][$idx] = $existingGroups[$groupTitle]; foreach ($existingGroups[$groupTitle] as $id) { $jsGroups[1][$id] = $idx; }