-
Notifications
You must be signed in to change notification settings - Fork 43
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
Added Indicator To Determine Whether Member has a children at Birmingham School #461
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,11 @@ $(document).on 'ready page:load', -> | |
$('#return-button').hide() | ||
$('#confirm').hide() | ||
$('#update').hide() | ||
|
||
$('#children_in_birmingham_form').hide() | ||
|
||
$('#member_ids').on 'select2:select', (e) -> | ||
$('#participation_member_id').val(e.params.data.id) | ||
console.log(e) | ||
$('#create').hide() | ||
$('#update').hide() | ||
$('#member_ids').html() | ||
|
@@ -14,6 +16,7 @@ $(document).on 'ready page:load', -> | |
$('#phone').text(e.params.data.phone) | ||
$('#identity').text(e.params.data.identity) | ||
$('#email').text(e.params.data.email) | ||
$('#children_in_birmingham_school').text(e.params.data.children_in_birmingham_school) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may not be the way to check the checkbox with jQuery. See https://learn.jquery.com/using-jquery-core/faq/how-do-i-check-uncheck-a-checkbox-input-or-radio-button/ Maybe something like...
|
||
|
||
# Revert/clear create form | ||
$('#unconfirm, #return-button').on 'click', -> | ||
|
@@ -34,14 +37,18 @@ $(document).on 'ready page:load', -> | |
selected = e.params.data.text | ||
if selected is 'Student' | ||
$('#school').show() | ||
$('#graduating').show() | ||
$('#graduating').show() | ||
$('#children_in_birmingham_form').hide() | ||
else if selected is 'Parent' or selected is 'Educator' | ||
$('#school').show() | ||
$('#graduating').hide() | ||
$('#graduating').hide() | ||
$('#children_in_birmingham_form').show() | ||
else | ||
$('#school').hide() | ||
$('#graduating').hide() | ||
|
||
$('#graduating').hide() | ||
$('#children_in_birmingham_form').hide() | ||
|
||
|
||
# Alter create form for edit, fill with member values | ||
$('#update-signup').on 'click', -> | ||
$('#confirm').hide() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
json.array!(@members) do |member| | ||
json.extract! member, :id, :text, :first_name, :last_name, :phone, :email, :identity, :school_id, :graduating_class_id | ||
json.extract! member, :id, :text, :first_name, :last_name, :phone, :email, :identity, :school_id, :graduating_class_id, :children_in_birmingham_school | ||
json.url member_url(member, format: :json) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug lines should not be included in the pull request.