Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add a private message to orders and make address fields required for …

…companies
  • Loading branch information...
commit 157f390b139e50d242b9fd7eca13556cb6efe14b 1 parent d65c20a
@svenfuchs svenfuchs authored
View
2  TODO
@@ -1 +1,3 @@
- add a badge with number of donators to packages (as on http://www.kickstarter.com/projects/510303020/the-people-is-singular/backers#p1)
+
+https://twitter.com/#!/derekcollison/status/155413659273789442
View
BIN  app/assets/images/tipsy.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
10 app/assets/stylesheets/orders.css.scss
@@ -6,10 +6,14 @@
ul {
list-style-type: disc;
margin-left: 20px;
+
li {
margin: 0;
}
}
+ ul.footnotes {
+ list-style-type: none;
+ }
em {
background-color: yellow;
@@ -70,22 +74,26 @@
}
input, textarea {
float: left;
- margin-top: 4px;
padding: 8px;
border: 1px solid #ddd;
font-size: 16px;
@include border-radius(8px);
}
input {
+ margin-top: 4px;
width: 300px;
&.default {
color: #ccc;
}
}
textarea {
+ margin-top: 8px;
height: 40px;
+ height: 20px;
width: 300px;
}
+ #order_comment {
+ }
&.wide textarea {
width: 740px;
}
View
21 app/views/orders/new.html.haml
@@ -10,16 +10,16 @@
to Travis CI
= subscription_type(order) + '.'
%p
- That is amazing! Thank you so much. We love you :)
+ That is amazing! Thank you so much, we love you :)
- unless signed_in?
#user
= simple_fields_for user do |u|
= u.hidden_field :stripe_card_token
%fieldset
- = u.input :name
- = u.input :email
- = u.input :password
+ = u.input :name, required: true
+ = u.input :email, required: true
+ = u.input :password, required: true
%fieldset
= u.input :twitter_handle, label: 'Twitter', hint: 'Your twitter handle', required: false, input_html: { placeholder: '@' }
= u.input :github_handle, label: 'Github', hint: 'Your Github handle', required: false
@@ -31,13 +31,13 @@
%h3 Address
= f.simple_fields_for :billing_address do |a|
%fieldset
- = a.input :name
- = a.input :street
- = a.input :zip
+ = a.input :name, required: company?
+ = a.input :street, required: company?
+ = a.input :zip, required: company?
%fieldset
- = a.input :city
+ = a.input :city, required: company?
= a.input :state
- = a.input :country
+ = a.input :country, required: company?
- unless signed_in?
#credit_card
@@ -57,7 +57,8 @@
#comment
%h3 Leave a comment
%fieldset.wide
- = f.input :comment, :as => 'text', required: false
+ = f.input :comment, as: 'text', required: false, hint: 'Add a comment (will be published on the donators list).'
+ = f.input :message, as: 'text', required: false, hint: 'You can leave us a message (will not be published).'
.actions
= f.submit 'Confirm'
View
7 db/migrate/20120109000009_orders_add_message.rb
@@ -0,0 +1,7 @@
+class OrdersAddMessage < ActiveRecord::Migration
+ def change
+ change_table :orders do |t|
+ t.text :message
+ end
+ end
+end
View
3  db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120107130508) do
+ActiveRecord::Schema.define(:version => 20120109000009) do
create_table "addresses", :force => true do |t|
t.integer "addressable_id"
@@ -37,6 +37,7 @@
t.datetime "updated_at"
t.boolean "active", :default => true, :null => false
t.datetime "cancelled_at"
+ t.text "message"
end
create_table "users", :force => true do |t|
Please sign in to comment.
Something went wrong with that request. Please try again.