oneclickorgs/one-click-orgs

View on GitHub
app/views/share_applications/new.html.haml

Summary

Maintainability
Test Coverage
- content_for(:head) do
  = javascript_tag do
    OneClickOrgs.currentShareholding = #{current_user.shares_count.to_json};
    OneClickOrgs.maximumShareholding = #{co.maximum_shareholding.to_json};
  = javascript_include_tag 'share_applications_new'

%h2 Apply for more shares

%p
  You currently have
  = pluralize(current_user.shares_count, "share.", "shares.")

= form_for(@share_application) do |form|
  %p
    = form.label :amount, "How many shares would you like to apply for?"
    = form.text_field :amount
  %p.share_payment{:style => 'display: none;'}
    A payment of £<span>0</span> will be due.
  %p.maximum_shareholding{style: 'display: none;'}
    You cannot apply for this many shares, as it would take you above the maximum legal shareholding.
  %p
    = form.submit "Apply for more shares"