-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(questionnaire): missing information now in correct place (#443) * fix(questionnair): missing information now in correct place it now displays the correct message "Please read & accept" instead of missing information and the notification is now in the correct place * Update app/assets/javascripts/validate.js * Revert "Update app/assets/javascripts/validate.js" This reverts commit bc54783. Signed-off-by: Peter Kos <[email protected]> Co-authored-by: Peter Kos <[email protected]> * fix: Fixes mobile agreements layout bug Signed-off-by: Peter Kos <[email protected]> * feat: Removes semantic-release (#446) * refactor: Moves CI to develop branch (#449) Co-authored-by: Peter Kos <[email protected]> * build: Merges 2.1.2 into develop * fix(hakiri): corrected unescaped model attribute * fix(hakiri): added html_safe to show proper output Co-authored-by: Jeremy Rudman <[email protected]> Co-authored-by: JeremyRudman <[email protected]> * fix: Shows questionnaires_closed_message on registration * feat: Allows agreements to be fully customizable (#465) * feat: Allows agreements to be fully customizable * fix: Fixes broken migrations * fix: Migrations misname issue * feat: Forces agreement links to open in new tab * Agreement validation detection fixed Signed-off-by: Peter Kos <[email protected]> * refactor: Removes old input hint Co-authored-by: Peter Kos <[email protected]> * fix(hakiri): fixed un-escaped regex for vcs link (#467) * fix(hakiri): corrected unescaped model attribute * fix(hakiri): added html_safe to show proper output * fix(hakiri): added \A \z to regex * fix(questionnaire): fixed hakiri error with vcs link regex * fix(questionnaire): fixed houndci commplaint Co-authored-by: Chris Baudouin, Jr <[email protected]> * fix(hakiri): fix hakiri error with user input in html_safe (#475) Co-authored-by: Peter Kos <[email protected]> Co-authored-by: JeremyRudman <[email protected]> Co-authored-by: Chris Baudouin, Jr <[email protected]> Co-authored-by: Jeremy Rudman <[email protected]>
- Loading branch information
1 parent
5f4a844
commit 4923231
Showing
14 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
class Agreement < ApplicationRecord | ||
include ActionView::Helpers::UrlHelper | ||
validates_presence_of :name | ||
validates_presence_of :agreement_url | ||
validates_presence_of :agreement | ||
|
||
strip_attributes | ||
|
||
has_and_belongs_to_many :questionnaires | ||
|
||
def formatted_agreement | ||
"<p>I read and accept the #{link_to name, agreement_url, target: '_blank'} agreement.</p>".html_safe | ||
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) | ||
markdown.render(agreement).gsub("<a href=", "<a target=\“_blank\” rel=\"noreferrer noopener\" href=").html_safe | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class ConvertAgreementsToText < ActiveRecord::Migration[5.2] | ||
def self.up | ||
change_column :agreements, :agreement_url, :text | ||
rename_column :agreements, :agreement_url, :agreement | ||
end | ||
|
||
def self.down | ||
rename_column :agreements, :agreement, :agreement_url | ||
change_column :agreements, :agreement_url, :sring | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FactoryBot.define do | ||
factory :agreement do | ||
name { "HackFoo Agreement" } | ||
agreement_url { "https://www.foo.com" } | ||
agreement { "Please read and accept https://www.foo.com" } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters