app/views/finance/financial_transactions/new.html.haml
- title t('.title')
- content_for :sidebar do
.well.well-small
= render 'account_info', ordergroup: @ordergroup
%p= raw t('.paragraph', name: @ordergroup.name)
= simple_form_for @financial_transaction, :url => finance_ordergroup_transactions_path(@ordergroup),
:validate => true do |f|
= f.hidden_field :ordergroup_id
= f.input :amount
.control-group
.control-label.required
= "<abbr title='#{I18n.t('simple_form.required.text')}'>#{I18n.t('simple_form.required.mark')}</abbr> ".html_safe
= t '.type'
.controls
%label{:for => :type_pin}
= radio_button_tag(:type, :pin)
= t '.type_pin'
%label{:for => :type_cash}
= radio_button_tag(:type, :cash)
= t '.type_cash'
%label{:for => :type_other}
= radio_button_tag(:type, :other)
= t '.type_other'
-# need :required for simple_form, and :validate for client_side_validations
= f.input :note, :as => :text, :required => false, :validate => { :presence => false }, :input_html => {rows: 4}
.form-actions
= f.submit class: 'btn btn-primary'
= link_to t('ui.or_cancel'), finance_ordergroup_transactions_path(@ordergroup)