Revert "fixed smart block criteria view to show dropdown based upon current values vs. database values to fix display when form is invalid"

This reverts commit fc4f82a83a.
This commit is contained in:
Robb Ebright 2018-01-07 15:27:58 -05:00
parent 5848d307da
commit 5e7a5b3e1d
2 changed files with 6 additions and 10 deletions

View file

@ -92,24 +92,19 @@
<div <?php if (/*($i > 0) && */ $disabled) {
echo 'style=display:none';
} ?> >
<?php
echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j); Logging::info($this->element->getElement('sp_criteria_modifier_'.$i.'_'.$j)->getValue());?>
<?php echo $this->element->getElement("sp_criteria_field_".$i."_".$j) ?>
<?php echo $this->element->getElement("sp_criteria_modifier_".$i."_".$j) /* @todo finish this */?>
<?php echo $this->element->getElement("sp_criteria_value_".$i."_".$j) ?>
<span class='sp_text_font' id="datetime_select"
<?php //hide the datetime select unless the relative datetime modifiers are selected
if(!(preg_match('/before|after|between/', $this->element->getElement("sp_criteria_modifier_".$i."_".$j)->getValue()) == 1)
) {echo('style="display:none;"'); }?>>
<?php echo $this->element->getElement('sp_criteria_datetime_select_'.$i."_".$j) ?><?php echo _(" ago "); ?></span>
<span class='sp_text_font' id="datetime_select" <?php echo $this->element->getElement("sp_criteria_datetime_select_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo $this->element->getElement('sp_criteria_datetime_select_'.$i."_".$j) ?><?php echo _(" ago "); ?></span>
<a class='btn btn-small btn-new' id='modifier_add_<?php echo $i ?>'>
<i class='icon-white icon-plus'></i><?php echo(_("New Modifier")); ?>
</a>
<span class='sp_text_font' id="extra_criteria" <?php echo $this->element->getElement("sp_criteria_extra_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo _(" to "); ?><?php echo $this->element->getElement('sp_criteria_extra_'.$i."_".$j) ?></span>
<span class='sp_text_font' id="extra_datetime_select"
<?php if (!($this->element->getElement("sp_criteria_modifier_".$i."_".$j)->getValue() == 'between')) { echo 'style="display:none;"'; }?>><?php echo $this->element->getElement('sp_criteria_extra_datetime_select_'.$i."_".$j) ?><?php echo _(" ago "); ?></span>
<span class='sp_text_font' id="extra_datetime_select" <?php echo $this->element->getElement("sp_criteria_extra_datetime_select_".$i."_".$j)->getAttrib("disabled") == "disabled"?'style="display:none;"':""?>><?php echo $this->element->getElement('sp_criteria_extra_datetime_select_'.$i."_".$j) ?><?php echo _(" ago "); ?></span>
<a style='margin-right:3px' class='btn btn-small btn-danger' id='criteria_remove_<?php echo $i ?>'>
<i class='icon-white icon-remove spl-no-r-margin'></i>
</a>