%% javascript_tag do %> var new_<%=rule_name%> = '<%%=escape_javascript(render("/re_rule_definitions/<%=rule_name%>/form_word"))%>' $(document).ready(function() { $('#<%=rule_name%>_title').focus(); }); <%% end %> <%%= re_text_field "Title", "<%=rule_name%>_title", params[:<%=rule_name%>_title] || @re_rule.rule.title || @re_rule.rule.options[:display_name], :size => 30, :required => true, :error => @re_rule.rule.errors[:<%=rule_name%>_title], :span => '4x13' %> <%% position = 0 %> <%% (@re_rule.rule.words || []).each do | word | %> <%% f.fields_for :rule_data, {:first => false} do |frd| %> <%%= render '/re_rule_definitions/<%=rule_name%>/form_word', :f => frd, :position => position, :word => word %> <%% position += 1 %> <%% end %> <%% end %> <%% if position == 0 %> <%% f.fields_for :rule_data, {:first => false} do |frd| %> <%%= render '/re_rule_definitions/<%=rule_name%>/form_word', :f => frd, :position => position %> <%% end %> <%% end %>
<%%= re_form_text "", re_add_link('Add another word to filter', '<%=rule_name%>') %> q<%%= re_select "Match Type", '<%=rule_name%>_match_type', options_for_select([ ["Any Match", RulesEngine::Rule::<%=rule_class%>::TWEET_MATCH_ANY], ["Whole Twitter Message", RulesEngine::Rule::<%=rule_class%>::TWEET_MATCH_TWEET], ["Exact Word", RulesEngine::Rule::<%=rule_class%>::TWEET_MATCH_WORD], ["Begins With", RulesEngine::Rule::<%=rule_class%>::TWEET_MATCH_BEGIN_WITH], ["End With", RulesEngine::Rule::<%=rule_class%>::TWEET_MATCH_END_WITH] ], params['<%=rule_name%>_match_type'].to_i || @re_rule.rule.match_type), :required => true %>