-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f85f52b
commit e4dcb75
Showing
11 changed files
with
221 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
class PartyContactFormController < ApplicationController | ||
before_action :select_bootstrap41 | ||
|
||
def create | ||
@name = params[:party_contact_form][:name] | ||
@email = params[:party_contact_form][:email] | ||
@phone = params[:party_contact_form][:phone] | ||
@organization = params[:party_contact_form][:organization] | ||
@event_date_and_time = params[:party_contact_form][:event_date_and_time] | ||
@event_location = params[:party_contact_form][:event_location] | ||
@event_description = params[:party_contact_form][:event_description] | ||
@guest_count = params[:party_contact_form][:guest_count] | ||
@event_details = params[:party_contact_form][:event_details] | ||
|
||
|
||
PartyMailer.notify(@name, @email, @phone, @organization, @event_date_and_time, @event_location, @event_description, @guest_count, @event_details).deliver_later | ||
|
||
flash[:success] = "Your message has been sent successfully. An OPH representative will be in touch with you to discuss your request." | ||
redirect_to :root | ||
end | ||
|
||
private | ||
# def party_contact_form | ||
# params.require(:party_contact_form).permit(:name, | ||
# :email, | ||
# :phone, | ||
# :organization, | ||
# :event_date_and_time, | ||
# :event_location, | ||
# :event_description, | ||
# :guest_count, | ||
# :event_details | ||
# ) | ||
# end | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class PartyMailer < ActionMailer::Base | ||
default from: 'Operation Paws for Homes <noreply@ophrescue.org>' | ||
|
||
def notify(name, email, phone, organization, event_date_and_time, event_location, event_description, guest_count, event_details) | ||
|
||
@name = name | ||
@email = email | ||
@phone = phone | ||
@organization = organization | ||
@event_date_and_time = event_date_and_time | ||
@event_location = event_location | ||
@event_description = event_description | ||
@guest_count = guest_count | ||
@event_details = event_details | ||
|
||
mail( | ||
to: 'puptasticparties@ophrescue.org', | ||
subject: "Pup-Tastic Party Request", | ||
content_type: 'text/html' | ||
) do |format| | ||
format.mjml | ||
end | ||
end | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-sm-8 offset-sm-4 col-md-8 offset-md-4 col-lg-8 offset-lg-4"> | ||
<div class="pages"> | ||
<h1>OPH Pup-tastic Parties</h1> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-4 col-md-4 col-lg-4 d-none d-sm-block"> | ||
<div class="left"> | ||
<%= image_tag "party-1.jpg", class: "rounded side img-fluid" %> | ||
</div> | ||
<div class="left"> | ||
<%= image_tag "party-2.jpg", class: "rounded side img-fluid" %> | ||
</div> | ||
<div class="left"> | ||
<%= image_tag "party-3.jpg", class: "rounded side img-fluid" %> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-8 col-md-8 col-lg-8"> | ||
<div class="article pages"> | ||
|
||
<p>Interested in having a litter of puppies visit your office, conference, or birthday party? We can | ||
provide puppies! There is nothing like snuggling and playing with puppies to bring joy to people | ||
of all ages. Our puppies are rescued from overcrowded shelters in the South and are available | ||
for adoption (see https://ophrescue.org/guide for information on adopting from OPH). Your | ||
donation will support our work to rescue and find forever homes for dogs in need! | ||
These events are available in the areas where OPH operates: northern Virginia (as far south as | ||
Springfield), the District of Columbia, central Maryland, and southern Pennsylvania (as far north | ||
as York). These events and parties are subject to availability of puppies and volunteers.</p> | ||
|
||
|
||
<%= link_to "Pup-Tastic Party Request", "/party_contact_form/new", :class => "btn btn-primary btn-large" %> | ||
|
||
<h2>Corporate or Conference events</h2> | ||
<ul> | ||
<li>Up to 2 hours on a weekday</li> | ||
<li>Minimum donation $1000</li> | ||
</ul> | ||
|
||
<h2>Children's birthday party or other personal event</h2> | ||
<ul> | ||
<li>Up to 90 minutes on a weekend</li> | ||
<li>Minimum donation $400</li> | ||
<li>OPH volunteers will supervise the interaction of puppies and children.</li> | ||
</ul> | ||
|
||
<h2>What the host provides</h2> | ||
<ul> | ||
<li>Space for puppy pen setup that is protected from the weather. The event can be outdoors | ||
if the temperature is between 65-75 degrees; otherwise it needs to be indoors for the | ||
health and safety of the puppies.</li> | ||
<li>Free parking for at least two cars for OPH volunteers</li> | ||
<li>Chairs for guests to sit while holding puppies</li> | ||
</ul> | ||
|
||
<h2>What we provide</h2> | ||
<ul> | ||
<li>A puppy pen</li> | ||
<li>Floor covering</li> | ||
<li>Puppy pads and cleanup supplies</li> | ||
<li>Any other supplies needed for the puppies</li> | ||
</ul> | ||
|
||
<p>The puppies we have in our rescue varies at any particular time, and the size of litters and type of | ||
puppies also varies widely. We are usually able to provide several puppies, but we may not | ||
know the number of puppies or other details until shortly before the event.</p> | ||
|
||
<p>If the puppies have not yet had all their vaccinations, which is often the case with puppies | ||
younger than three months, we will follow puppy quarantine procedures. This means that | ||
puppies cannot be put down on the ground except in the pen provided by OPH, and guests must | ||
sanitize their hands before touching the puppies.</p> | ||
|
||
<p>To request a puppy event or party, please fill out the form and OPH will get back to you.</p> | ||
|
||
<%= link_to "Pup-Tastic Party Request", "/party_contact_form/new", :class => "btn btn-primary btn-large" %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<h1 class="mt-3 ml-2">Pup-Tastic Party Request</h1> | ||
|
||
<%= form_with scope: :party_contact_form, url: party_contact_form_index_path, method: :post, local: true, class: "container" do |f| %> | ||
<div class="ml-2"> | ||
<div class="form-group"> | ||
<%= f.label :name %> | ||
<%= f.text_field :name, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.text_field :email, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :phone %> | ||
<%= f.text_field :phone, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :organization, 'Organization (if applicable)' %> | ||
<%= f.text_field :organization, class: "col-8 form-control", required: false %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :event_date_and_time, 'Event Date, Start and End Times' %> | ||
<%= f.text_field :event_date_and_time, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :event_location %> | ||
<%= f.text_field :event_location, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :event_description, 'Description of event (i.e., children\'s birthday, corporate event for employees, conference break | ||
activity, etc.)' %> | ||
<%= f.text_area :event_description, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :guest_count, 'Expected number of guests' %> | ||
<%= f.text_field :guest_count, class: "col-8 form-control", required: true %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.label :event_details, 'Anything else you would like to share about your event' %> | ||
<%= f.text_area :event_details, class: "col-8 form-control", required: true %> | ||
</div> | ||
|
||
<p>An OPH representative will be in touch with you to discuss your request.</p> | ||
<p>Note: if we are able to provide puppies for your event, the donation must be paid before we will | ||
reserve your event.</p> | ||
<%= f.submit "Submit", class: "btn btn-primary" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<mjml> | ||
<mj-body> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="14px" font-family="helvetica">Pup-Tastic Party Request</mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">Name: <%= @name %></mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">email: <%= @email %></mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">phone: <%= @phone %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">organization: <%= @organization %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">event_date_and_time: <%= @event_date_and_time %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">event_location: <%= @event_location %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">event_description: <%= @event_description %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">guest_count: <%= @guest_count %> </mj-text> | ||
<mj-text font-size="14px" font-family="helvetica">event_details: <%= @event_details %> </mj-text> | ||
</mj-column> | ||
</mj-section> | ||
</mj-body> | ||
</mjml> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Preview all emails at http://localhost:3000/rails/mailers/party_mailer | ||
class PartyMailerPreview < ActionMailer::Preview | ||
|
||
end |