Skip to content

Commit 0ff0b38

Browse files
refactor: Removes legal section from config (#440)
* refactor: Removes legal section from config * refactor: Removes agreement asset from locals * Removes additional PDF asset messages Co-authored-by: Peter Kos <[email protected]>
1 parent 93d95de commit 0ff0b38

File tree

4 files changed

+1
-32
lines changed

4 files changed

+1
-32
lines changed

app/controllers/manage/configs_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def index
1010
@questionnaire_settings = ['accepting_questionnaires', 'last_day_to_apply', 'auto_late_waitlist', 'disabled_fields'].freeze
1111
@styling = ['default_page_title', 'homepage_url', 'logo_asset', 'email_banner_asset', 'favicon_asset', 'custom_css'].freeze
1212
@communications = ['email_from', 'disclaimer_message', 'thanks_for_applying_message', 'thanks_for_rsvp_message', 'questionnaires_closed_message', 'bus_captain_notes']
13-
@legal = ['agreement_pdf_asset'].freeze
1413
respond_with(HackathonConfig.get_all)
1514
end
1615

app/views/manage/configs/index.html.haml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -113,34 +113,7 @@
113113
%span
114114
%span.fa.fa-external-link.icon-space-r-half
115115
Open link
116-
.card.mb-3
117-
.card-body
118-
%h4.card-title.font-weight-bold
119-
Legal
120-
%h6.card-subtitle.mb-2.text-muted
121-
Agreements for your hackers.
122-
- @legal.each_entry do |key|
123-
- value = HackathonConfig[key]
124-
%hr
125-
%p.mb-1
126-
= link_to edit_manage_config_path(key), class: 'icon-space-r' do
127-
%span.fa.fa-pencil
128-
%b
129-
= t("simple_form.labels.hackathon_config.#{key}")
130-
%p.text-muted= t("simple_form.hints.hackathon_config.#{key}").html_safe
131-
%pre.mb-0= value
132-
- if value.is_a?(String)
133-
- images = ['.ico', '.jpg', '.jpeg', '.png', '.gif', '.svg'].freeze
134-
- links = ['http://', 'https://'].freeze
135-
- if value.end_with?(*images)
136-
%br
137-
= image_tag value, style: 'max-height: 100px;', class: 'img-thumbnail img-template'
138-
- elsif value.start_with?(*links)
139-
%br
140-
= link_to value, target: 'blank' do
141-
%span
142-
%span.fa.fa-external-link.icon-space-r-half
143-
Open link
116+
144117
.col-lg-6
145118
.card.mb-3
146119
.card-body

config/app.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ defaults: &defaults
1313
logo_asset: ""
1414
favicon_asset: ""
1515
email_banner_asset: ""
16-
agreement_pdf_asset: agreement.pdf
1716
email_from: '"HackFoo" <[email protected]>'
1817
default_page_title: HackFoo - Jan 1-2, 2017
1918
homepage_url: ""

config/locales/en.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ en:
6767
logo_asset: Optional logo asset (should be a full https:// URL to a .jpg, .png, or .svg file)
6868
favicon_asset: Optional favicon asset (should be a full https:// URL to a .ico file)
6969
email_banner_asset: Optional banner asset to show at top of emails (should be a full https:// URL to a .jpg or .png file)
70-
agreement_pdf_asset: Your hackathon's agreement (e.g. school activity release form, should be a full https:// URL to a web page or .pdf file)
7170
email_from: '"From" email address for all emails sent through the website (e.g. BrickHack &lt;[email protected]&gt;)'
7271
default_page_title: Default &lt;title&gt; for all pages (e.g. HackFoo - Jan 1-2, 2017)
7372

@@ -117,7 +116,6 @@ en:
117116
hackathon_config:
118117
name: Hackathon Name
119118
email_from: From Email
120-
agreement_pdf_asset: Agreement PDF Asset
121119
custom_css: Custom CSS
122120
homepage_url: Homepage URL
123121
thanks_for_rsvp_message: Thanks For RSVP Message

0 commit comments

Comments
 (0)