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'));
|
statusMessage(userforms.message('REMOVED_OPTION'));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom Rules Interface
|
* Custom Rules Interface
|
||||||
*/
|
*/
|
||||||
$(".customRules .conditionOption").live('change',function(){
|
$("body").delegate("select.conditionOption", 'change', function() {
|
||||||
var valueInput = $(this).siblings(".ruleValue");
|
var valueInput = $(this).siblings(".ruleValue");
|
||||||
|
|
||||||
if($(this).val() && $(this).val() !== "IsBlank" && $(this).val() !== "IsNotBlank") {
|
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>
|
<a href="#" class="deleteCondition" title="<% _t('DELETE', 'Delete') %>"><img src="cms/images/delete.gif" alt="<% _t('DELETE', 'Delete') %>" /></a>
|
||||||
</li>
|
</li>
|
||||||
<% control CustomRules %>
|
<% if CustomRules %>
|
||||||
<li>
|
<% control CustomRules %>
|
||||||
<% include CustomRule %>
|
<li>
|
||||||
</li>
|
<% include CustomRule %>
|
||||||
<% end_control %>
|
</li>
|
||||||
|
<% end_control %>
|
||||||
|
<% end_if %>
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,6 +23,6 @@
|
|||||||
<option value="ValueGreaterThanEqual" <% if ConditionOption = ValueGreaterThanEqual %>selected="selected"<% end_if %>><% _t('GREATERTHANEQUAL', 'Value Greater Than Or Equal') %></option>
|
<option value="ValueGreaterThanEqual" <% if ConditionOption = ValueGreaterThanEqual %>selected="selected"<% end_if %>><% _t('GREATERTHANEQUAL', 'Value Greater Than Or Equal') %></option>
|
||||||
</select>
|
</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>
|
<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