changes
This commit is contained in:
parent
336c1e86bd
commit
a0e1760ef1
8 changed files with 79 additions and 48 deletions
|
|
@ -2,8 +2,8 @@
|
|||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
Edit
|
||||
= @sponsor.name
|
||||
Edit
|
||||
= @sponsor.name
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@sponsor, url: admin_conference_sponsor_path(@conference.short_title, @sponsor)) do |f|
|
||||
|
|
@ -12,8 +12,17 @@
|
|||
= f.input :picture
|
||||
= f.input :website_url
|
||||
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
|
||||
= f.input :company_address
|
||||
= f.input :vat_registration
|
||||
= f.input :address, label: 'Company\'s address'
|
||||
= f.input :vat, label: 'VAT Registration Number'
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.has_swag,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/sponsors/#{@sponsor.id}?sponsor[has_swag]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
= f.input :type, label: 'Swags type'
|
||||
= f.input :quantity, label: 'Swags quantity', as: :number, in: 0..9999
|
||||
- generate_swags_hash(@type, @quantity)
|
||||
= image_tag f.object.picture.thumb.url if f.object.picture?
|
||||
= f.input :picture
|
||||
%p.text-right
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@
|
|||
= f.input :picture
|
||||
= f.input :website_url
|
||||
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
|
||||
-# = f.input :type
|
||||
-# = f.input :quantity
|
||||
-# - generate_swags_hash(type, quantity)
|
||||
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
%table.table
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Sponsorship payed?
|
||||
%b Sponsorship paid?
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.swags,
|
||||
method: :patch, url: payed_admin_conference_sponsor_path(@conference.short_title, @sponsor.id),
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.paid,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/sponsors/#{@sponsor.id}?sponsor[paid]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
|
|
@ -45,34 +45,34 @@
|
|||
%td.col-md-2
|
||||
%b Has swags?
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.swags,
|
||||
method: :patch, url: swags_admin_conference_sponsor_path(@conference.short_title, @sponsor.id),
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.has_swag,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/sponsors/#{@sponsor.id}?sponsor[has_swag]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
- if @sponsor.company_address
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Company's address
|
||||
%td
|
||||
= @sponsor.company_address
|
||||
|
||||
- if @sponsor.vat_registration
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Campany's VAT Registration Number
|
||||
%td
|
||||
= @sponsor.vat_registration
|
||||
|
||||
- if @sponsor.swags
|
||||
- if @sponsor.has_swag
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Swags received?
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.swags,
|
||||
method: :patch, url: swags_received_admin_conference_sponsor_path(@conference.short_title, @sponsor.id),
|
||||
= check_box_tag @conference.short_title, @sponsor.id, @sponsor.swag_received,
|
||||
method: :patch, url: "/admin/conferences/#{@conference.short_title}/sponsors/#{@sponsor.id}?sponsor[swag_received]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
|
||||
- if @sponsor.address?
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Company's address
|
||||
%td
|
||||
= @sponsor.address
|
||||
- if @sponsor.vat?
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Campany's VAT Registration Number
|
||||
%td
|
||||
= @sponsor.vat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue