Skip to content

refactor: Removes legal section from config #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/controllers/manage/configs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def index
@questionnaire_settings = ['accepting_questionnaires', 'last_day_to_apply', 'auto_late_waitlist', 'disabled_fields'].freeze
@styling = ['default_page_title', 'homepage_url', 'logo_asset', 'email_banner_asset', 'favicon_asset', 'custom_css'].freeze
@communications = ['email_from', 'disclaimer_message', 'thanks_for_applying_message', 'thanks_for_rsvp_message', 'questionnaires_closed_message', 'bus_captain_notes']
@legal = ['agreement_pdf_asset'].freeze
respond_with(HackathonConfig.get_all)
end

Expand Down
29 changes: 1 addition & 28 deletions app/views/manage/configs/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,7 @@
%span
%span.fa.fa-external-link.icon-space-r-half
Open link
.card.mb-3
.card-body
%h4.card-title.font-weight-bold
Legal
%h6.card-subtitle.mb-2.text-muted
Agreements for your hackers.
- @legal.each_entry do |key|
- value = HackathonConfig[key]
%hr
%p.mb-1
= link_to edit_manage_config_path(key), class: 'icon-space-r' do
%span.fa.fa-pencil
%b
= t("simple_form.labels.hackathon_config.#{key}")
%p.text-muted= t("simple_form.hints.hackathon_config.#{key}").html_safe
%pre.mb-0= value
- if value.is_a?(String)
- images = ['.ico', '.jpg', '.jpeg', '.png', '.gif', '.svg'].freeze
- links = ['http://', 'https://'].freeze
- if value.end_with?(*images)
%br
= image_tag value, style: 'max-height: 100px;', class: 'img-thumbnail img-template'
- elsif value.start_with?(*links)
%br
= link_to value, target: 'blank' do
%span
%span.fa.fa-external-link.icon-space-r-half
Open link

.col-lg-6
.card.mb-3
.card-body
Expand Down
1 change: 0 additions & 1 deletion config/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defaults: &defaults
logo_asset: ""
favicon_asset: ""
email_banner_asset: ""
agreement_pdf_asset: agreement.pdf
email_from: '"HackFoo" <[email protected]>'
default_page_title: HackFoo - Jan 1-2, 2017
homepage_url: ""
Expand Down
2 changes: 0 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ en:
logo_asset: Optional logo asset (should be a full https:// URL to a .jpg, .png, or .svg file)
favicon_asset: Optional favicon asset (should be a full https:// URL to a .ico file)
email_banner_asset: Optional banner asset to show at top of emails (should be a full https:// URL to a .jpg or .png file)
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)
email_from: '"From" email address for all emails sent through the website (e.g. BrickHack &lt;[email protected]&gt;)'
default_page_title: Default &lt;title&gt; for all pages (e.g. HackFoo - Jan 1-2, 2017)

Expand Down Expand Up @@ -117,7 +116,6 @@ en:
hackathon_config:
name: Hackathon Name
email_from: From Email
agreement_pdf_asset: Agreement PDF Asset
custom_css: Custom CSS
homepage_url: Homepage URL
thanks_for_rsvp_message: Thanks For RSVP Message
Expand Down