Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is my view page code
- <!--offer job-->
- <div id="offer_job" class="login-popup" style="width:500px;">
- <a href="#" class="close"><img src="/assets/newa/images/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>
- <h3>CONFIRM JOB OFFER</h3><hr>
- <%= render 'share_mail/formOffer' %>
- </div>
- <!--/offer job-->
- My partial code :
- <%= form_for(:offer, :url => {:controller=> 'emails', :action => 'offer'}, :remote => true, :html => { :method => :post, :id => 'formOffer'}) do |f| %>
- <% if @applicant.blank? %>
- <p>
- <%= f.label :to4, "TO *" %>
- <%= f.text_field(:to4, :class =>"text-input") %>
- </p>
- <%else%>
- <p>
- <%= f.label :to4, "TO *" %>
- <%= f.text_field(:to4, :value => @applicant.email, :class =>"text-input") %>
- </p>
- <%end%>
- <p>
- <%= f.check_box(:send_me_copy) %> Send me a copy
- </p>
- <p class = "one-half">
- <%= label_tag "offer_template", "TEMPLATE *" %>
- <%= collection_select("offer_template", {}, EmailTemplate.where(:company_id => current_user.company_id, :template_type => "Job Offer"), :id, :name, {:prompt=>'Please select'}, {:class => "text-input", :id => 'offer_template'}) %>
- </p>
- <div class="clear"></div>
- <p>
- <%= f.label :subject4, "SUBJECT *" %>
- <%= f.text_field(:subject4, :class =>"text-input") %>
- </p>
- <p>
- <%= f.label :message4, "MESSAGE *" %>
- <%= f.text_area(:message4, :class =>"textarea", :style => "height:140px") %>
- </p>
- <button class="button medium green" type="submit" onclick='block()'><span>Send</span></button>
- <button class="button medium green" type="reset"><span>Cancel</span></button>
- <%end%>
- My jquery code :
- $('#offer_template').click(function() {
- id = document.getElementById("offer_template").value;
- alert(id);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement