@@ 447-466 (lines=20) @@ | ||
444 | $ol->setAttribute('data-remove', __('Remove filter')); |
|
445 | ||
446 | // Add system:id filter |
|
447 | if ( |
|
448 | isset($fields['filter'][$section_id]['system:id']) |
|
449 | || isset($fields['filter'][$section_id]['id']) |
|
450 | ) { |
|
451 | $id = isset($fields['filter'][$section_id]['system:id']) |
|
452 | ? $fields['filter'][$section_id]['system:id'] |
|
453 | : $fields['filter'][$section_id]['id']; |
|
454 | ||
455 | $li = new XMLElement('li'); |
|
456 | $li->setAttribute('class', 'unique'); |
|
457 | $li->setAttribute('data-type', 'system:id'); |
|
458 | $li->appendChild(new XMLElement('header', '<h4>' . __('System ID') . '</h4>')); |
|
459 | $label = Widget::Label(__('Value')); |
|
460 | $input = Widget::Input('fields[filter][' . $section_id . '][system:id]', General::sanitize($id)); |
|
461 | $input->setAttribute('data-search-types', 'parameters'); |
|
462 | $input->setAttribute('data-trigger', '{$'); |
|
463 | $label->appendChild($input); |
|
464 | $li->appendChild($label); |
|
465 | $ol->appendChild($li); |
|
466 | } |
|
467 | ||
468 | $li = new XMLElement('li'); |
|
469 | $li->setAttribute('class', 'unique template'); |
|
@@ 481-500 (lines=20) @@ | ||
478 | $ol->appendChild($li); |
|
479 | ||
480 | // Add system:date filter |
|
481 | if ( |
|
482 | isset($fields['filter'][$section_id]['system:creation-date']) |
|
483 | || isset($fields['filter'][$section_id]['system:date']) |
|
484 | ) { |
|
485 | $creation_date = isset($fields['filter'][$section_id]['system:creation-date']) |
|
486 | ? $fields['filter'][$section_id]['system:creation-date'] |
|
487 | : $fields['filter'][$section_id]['system:date']; |
|
488 | ||
489 | $li = new XMLElement('li'); |
|
490 | $li->setAttribute('class', 'unique'); |
|
491 | $li->setAttribute('data-type', 'system:creation-date'); |
|
492 | $li->appendChild(new XMLElement('header', '<h4>' . __('System Creation Date') . '</h4>')); |
|
493 | $label = Widget::Label(__('Value')); |
|
494 | $input = Widget::Input('fields[filter][' . $section_id . '][system:creation-date]', |
|
495 | General::sanitize($creation_date)); |
|
496 | $input->setAttribute('data-search-types', 'parameters'); |
|
497 | $input->setAttribute('data-trigger', '{$'); |
|
498 | $label->appendChild($input); |
|
499 | $li->appendChild($label); |
|
500 | $ol->appendChild($li); |
|
501 | } |
|
502 | ||
503 | $li = new XMLElement('li'); |