-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #624 from hms-dbmi/HYP-298
HYP-298 - Setup SignedAgreementForms to be blank for instances where …
- Loading branch information
Showing
13 changed files
with
335 additions
and
11 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
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,18 @@ | ||
# Generated by Django 4.2.4 on 2023-09-12 16:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('projects', '0101_challengetask_submission_instructions'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='agreementform', | ||
name='skippable', | ||
field=models.BooleanField(default=False, help_text='Allow participants to skip this step in instances where they have submitted the agreement form via email or some other means. They will be required to include the name and contact information of the person who they submitted their signed agreement form to.'), | ||
), | ||
] |
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,12 @@ | ||
|
||
/** | ||
* Finds all 'button' elements contained in a form and toggles their 'disabled' proeprty. | ||
* @param {String} formSelector The jQuery selector of the form to disable buttons for. | ||
*/ | ||
function toggleFormButtons(formSelector) { | ||
|
||
// Toggle disabled state of all buttons in form | ||
$(formSelector).find("button").each(function() { | ||
$(this).prop("disabled", !$(this).prop("disabled")); | ||
}); | ||
} |
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
23 changes: 23 additions & 0 deletions
23
app/templates/manage/upload-signed-agreement-form-file.html
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,23 @@ | ||
{% load bootstrap3 %} | ||
|
||
<form id="upload-signed-agreement-form-file-form" class="file-upload-form" method="post" enctype="multipart/form-data" | ||
ic-post-to="{% url 'manage:upload-signed-agreement-form-file' signed_agreement_form_id %}" | ||
ic-on-beforeSend="toggleFormButtons('#upload-signed-agreement-form-file-form')" | ||
ic-on-complete="toggleFormButtons('#upload-signed-agreement-form-file-form')"> | ||
<div class="modal-header modal-header-primary"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<h3 class="modal-title">Signed Agreement Form File Upload</h3> | ||
</div> | ||
<div class="modal-body"> | ||
{% csrf_token %} | ||
{% bootstrap_form form inline=True %} | ||
</div> | ||
<div class="modal-footer"> | ||
{% buttons %} | ||
<button id="file-upload-close-button" type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button id="file-upload-submit-button" type="submit" class="btn btn-primary">Submit | ||
<span id="file-upload-form-indicator" style="display: none; margin-left: 5px;" class="ic-indicator fa fa-spinner fa-spin"></span> | ||
</button> | ||
{% endbuttons %} | ||
</div> | ||
</form> |
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
Oops, something went wrong.