mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
FilterWidget: if "is set" is chosen in the operation dropdown, then the operation value field and the option field will be hidden
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
margin: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
.hidden-control {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script language="Javascript" type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -323,6 +323,14 @@ class FilterWidget extends Widget
|
||||
}
|
||||
elseif ($filterMetaData->type == 'timestamp')
|
||||
{
|
||||
$classOperation = 'select-filter-operation-value';
|
||||
$classOption = 'select-filter-option';
|
||||
if ($activeFilterOperationValue == self::OP_SET)
|
||||
{
|
||||
$classOperation .= ' hidden-control';
|
||||
$classOption .= ' hidden-control';
|
||||
}
|
||||
|
||||
$html = '
|
||||
<span>
|
||||
<select name="%s" class="select-filter-operation">
|
||||
@@ -333,9 +341,9 @@ class FilterWidget extends Widget
|
||||
</select>
|
||||
</span>
|
||||
<span>
|
||||
<input type="text" name="%s" value="%s" class="select-filter-operation-value">
|
||||
<input type="text" name="%s" value="%s" class="'.$classOperation.'">
|
||||
</span>
|
||||
<select name="%s" class="select-filter-option">
|
||||
<select name="%s" class="'.$classOption.'">
|
||||
<option value="'.self::OPT_DAYS.'" '.($activeFilterOptionValue == self::OPT_DAYS ? 'selected' : '').'>Days</option>
|
||||
<option value="'.self::OPT_MONTHS.'" '.($activeFilterOptionValue == self::OPT_MONTHS ? 'selected' : '').'>Months</option>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user