-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow submitting author status to be transferred to a co-author. Ref #…
…2128. We occasionally ask for submtting author status of a project to be transferred. This change adds a 'transfer project' button to the author page of the project submission system.
- Loading branch information
1 parent
cece757
commit 749a6c1
Showing
6 changed files
with
137 additions
and
1 deletion.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
physionet-django/notification/templates/notification/email/notify_submitting_author.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,11 @@ | ||
{% load i18n %}{% autoescape off %}{% filter wordwrap:70 %} | ||
Dear {{ name }}, | ||
|
||
You have been made submitting author of the project entitled "{{ project.title }}" on {{ SITE_NAME }}. | ||
|
||
You can view and edit the project on your project homepage: {{ url_prefix }}{% url "project_home" %}. | ||
|
||
{{ signature }} | ||
|
||
{{ footer }} | ||
{% endfilter %}{% endautoescape %} |
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
22 changes: 22 additions & 0 deletions
22
physionet-django/project/static/project/js/transfer-author.js
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,22 @@ | ||
$(document).ready(function() { | ||
// Function to update the displayed author name when a new author is selected | ||
function set_transfer_author() { | ||
var selectedAuthorName = $("#transfer_author_id option:selected").text(); | ||
$('#project_author').text(selectedAuthorName); | ||
} | ||
|
||
// Attach the change event to the author select dropdown to update the name on change | ||
$("#transfer_author_id").change(set_transfer_author); | ||
|
||
// Prevent the default form submission and show the confirmation modal | ||
$('#authorTransferForm').on('submit', function(e) { | ||
e.preventDefault(); | ||
$('#transfer_author_modal').modal('show'); | ||
}); | ||
|
||
// When the confirmation button is clicked, submit the form | ||
$('#confirmAuthorTransfer').on('click', function() { | ||
$('#authorTransferForm').off('submit').submit(); | ||
}); | ||
}); | ||
|
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