always do a db search, set from an to if searching for an attr of type date

This commit is contained in:
Uwe Steinmann 2022-09-20 15:06:33 +02:00
parent 4aa38182db
commit 0cf15ecd0e

View File

@ -100,7 +100,12 @@ $(document).ready( function() {
$value = $selattrdef->parseValue($entry['value']);
$content .= "<tr>";
$content .= "<td>".htmlspecialchars(implode('<span style="color: #aaa;">'.($separator ? ' '.$separator.' ' : ' ; ').'</span>', $value))."</td>";
$content .= "<td><a href=\"../out/out.Search.php?resultmode=".($type == 'folder' ? 2 : ($type == 'document' ? 1 : 3))."&attributes[".$selattrdef->getID()."]=".urlencode($entry['value'])."\">".urlencode($entry['c'])."</a></td>";
$content .= "<td><a href=\"../out/out.Search.php?fullsearch=0&resultmode=".($type == 'folder' ? 2 : ($type == 'document' ? 1 : 3))."&";
if($selattrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date)
$content .= "attributes[".$selattrdef->getID()."][from]=".urlencode($entry['value'])."&attributes[".$selattrdef->getID()."][to]=".urlencode($entry['value']);
else
$content .= "attributes[".$selattrdef->getID()."]=".urlencode($entry['value']);
$content .= "\">".urlencode($entry['c'])."</a></td>";
$content .= "<td>";
/* various checks, if the value is valid */
if(!$selattrdef->validate($entry['value'])) {