Skip to content

Commit 5f4a844

Browse files
cbaudouinjrJeremyRudmanpeterkos
authored
feat: Updates HackathonManager 2.1.1
* 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 <pkos91@icloud.com> Co-authored-by: Peter Kos <pkos91@icloud.com> * fix: Fixes mobile agreements layout bug Signed-off-by: Peter Kos <pkos91@icloud.com> * feat: Removes semantic-release (#446) * refactor: Moves CI to develop branch (#449) Co-authored-by: Peter Kos <pkos91@icloud.com> Co-authored-by: JeremyRudman <38338616+JeremyRudman@users.noreply.github.com> Co-authored-by: Peter Kos <pkos91@icloud.com>
1 parent 002bb14 commit 5f4a844

File tree

7 files changed

+15
-4760
lines changed

7 files changed

+15
-4760
lines changed

.github/workflows/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ name: Build - 2.6, 2.5
99

1010
on:
1111
pull_request:
12-
branches: [ master, "2.1" ]
12+
branches:
13+
- master
14+
- develop
1315

1416
jobs:
1517
build:

.github/workflows/release.yml

-22
This file was deleted.

app/assets/javascripts/validate.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ document.addEventListener('turbolinks:load', function() {
2222
$(this)
2323
.parent()
2424
.text()
25-
.includes('I accept')
25+
.includes('I read and accept')
2626
) {
27-
notify(this, 'Please read & accept');
27+
notify(".agreement_input", 'Please read & accept');
2828
} else {
2929
notify(this, 'Missing Information');
3030
}
@@ -79,6 +79,13 @@ document.addEventListener('turbolinks:load', function() {
7979
.fadeOut(200, function() {
8080
$(this).remove();
8181
});
82+
$(".agreement_input")
83+
.parent()
84+
.removeClass('field_with_errors')
85+
.find('.error')
86+
.fadeOut(200, function() {
87+
$(this).remove();
88+
});
8289
}
8390
return success;
8491
};

app/models/agreement.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class Agreement < ApplicationRecord
88
has_and_belongs_to_many :questionnaires
99

1010
def formatted_agreement
11-
"I read and accept the&nbsp;#{link_to name, agreement_url, target: '_blank'}&nbsp;agreement.".html_safe
11+
"<p>I read and accept the&nbsp;#{link_to name, agreement_url, target: '_blank'}&nbsp;agreement.</p>".html_safe
1212
end
1313
end

app/views/questionnaires/_form.html.haml

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
%strong Agreements
5353
%p Please review the agreements and click the corresponding checkbox next to each agreement to agree.
5454
.form-inputs
55-
= f.association :agreements, as: :check_boxes, label_method: :formatted_agreement, value_method: :id, label: "", wrapper_html: { style: 'display: block' }, input_html: { "data-validate" => "presence" }
55+
.agreement_input
56+
= f.association :agreements, as: :check_boxes, label_method: :formatted_agreement, value_method: :id, label: "", wrapper_html: { style: 'display: block' }, input_html: { "data-validate" => "presence" }
5657

5758
.right
5859
%button.button{ type: "button", "data-wizard" => "previous" } Previous

package.json

-11
This file was deleted.

0 commit comments

Comments
 (0)