mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
BUGFIX: fixed rule value fields being hidden on load. BUGFIX: use delegate rather than live for select field changes as IE7/8 will not trigger live changes.
This commit is contained in:
parent
23ba211310
commit
062770da17
@ -296,11 +296,11 @@
|
||||
statusMessage(userforms.message('REMOVED_OPTION'));
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Custom Rules Interface
|
||||
*/
|
||||
$(".customRules .conditionOption").live('change',function(){
|
||||
$("body").delegate("select.conditionOption", 'change', function() {
|
||||
var valueInput = $(this).siblings(".ruleValue");
|
||||
|
||||
if($(this).val() && $(this).val() !== "IsBlank" && $(this).val() !== "IsNotBlank") {
|
||||
|
@ -116,11 +116,13 @@
|
||||
|
||||
<a href="#" class="deleteCondition" title="<% _t('DELETE', 'Delete') %>"><img src="cms/images/delete.gif" alt="<% _t('DELETE', 'Delete') %>" /></a>
|
||||
</li>
|
||||
<% control CustomRules %>
|
||||
<li>
|
||||
<% include CustomRule %>
|
||||
</li>
|
||||
<% end_control %>
|
||||
<% if CustomRules %>
|
||||
<% control CustomRules %>
|
||||
<li>
|
||||
<% include CustomRule %>
|
||||
</li>
|
||||
<% end_control %>
|
||||
<% end_if %>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -23,6 +23,6 @@
|
||||
<option value="ValueGreaterThanEqual" <% if ConditionOption = ValueGreaterThanEqual %>selected="selected"<% end_if %>><% _t('GREATERTHANEQUAL', 'Value Greater Than Or Equal') %></option>
|
||||
</select>
|
||||
|
||||
<input type="text" class="ruleValue <% if Value %><% else %>hidden<% end_if %> customRuleField" name="{$FieldName}[CustomRules][$Pos][Value]" value="$Value" />
|
||||
<input type="text" class="ruleValue <% if ConditionOption %><% if ConditionOption = IsBlank %>hidden<% else_if ConditionOption = IsNotBlank %>hidden<% end_if %><% else %>hidden<% end_if %> customRuleField" name="{$FieldName}[CustomRules][$Pos][Value]" value="$Value" />
|
||||
|
||||
<a href="#" class="deleteCondition" title="<% _t('DELETE', 'Delete') %>"><img src="cms/images/delete.gif" alt="<% _t('DELETE', 'Delete') %>" /></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user