Created
May 13, 2009 09:31
-
-
Save andyjeffries/110949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## main file | |
<div id="eula_table_id"> | |
<%= render :partial => "config/eula_list" %> | |
</div> | |
<div class="form-row"> | |
<%= link_to_remote "Add new end user license agreement", | |
{ :update => "eula_table_id", # you may not need this :update parameter | |
:before => "$('#add-user-spinner').show();" + | |
"statusInfo('wait', 'adding a new user ...');", | |
:method => :post, | |
:position => "after", | |
:url => { :controller => :config, | |
:action => :add_eula, | |
:appliance_id => current_appliance.id} } %> | |
<img src="/images/spinner.gif" id="add-user-spinner" alt=""> | |
</div> | |
## controller (config) | |
def add_eula | |
render :update do |page| | |
page.insert_html :bottom, 'eula_table_id', :partial => "config/eula_list" | |
end | |
end | |
## _eula_list.html.erb | |
<%= text_area :image, :eula_text, :rows => 20, :value => @image.eula_text %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment