mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-05-30 16:30:59 +00:00
Purged git history and removed sensitive information.
This commit is contained in:
commit
6bcc8dc76b
862 changed files with 25312 additions and 0 deletions
11
app/helpers/polls_helper.rb
Normal file
11
app/helpers/polls_helper.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
module PollsHelper
|
||||
def add_option_link(name, form)
|
||||
link_to_function name do |page|
|
||||
option = render :partial => 'option', :locals => { :pf => form, :options => Option.new }
|
||||
page << %{
|
||||
this.counter = typeof this.counter == 'undefined' ? 0 : this.counter + 1;
|
||||
$('options').insert({ bottom: "#{ escape_javascript option }".replace(/\\[\\d+\\]/g, "[" + this.counter + "]") });
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue