SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 07ee0a3d authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Update profiles.forms

parent 58a33f78
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,9 @@ class ProfileForm(forms.ModelForm):
class Meta:
model = Profile
fields = ['title', 'first_name', 'last_name',
'discipline', 'expertises', 'orcid_id', 'webpage',
'discipline', 'expertises',
'orcid_id', 'webpage',
'acad_field', 'specialties', 'topics',
'accepts_SciPost_emails', 'accepts_refereeing_requests',
'instance_from_type', 'instance_pk']
......@@ -77,9 +79,11 @@ class SimpleProfileForm(ProfileForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['expertises'].widget = forms.HiddenInput()
self.fields['orcid_id'].widget = forms.HiddenInput()
self.fields['webpage'].widget = forms.HiddenInput()
self.fields['acad_field'].widget = forms.HiddenInput()
self.fields['specialties'].widget = forms.HiddenInput()
self.fields['topics'].widget = forms.HiddenInput()
self.fields['accepts_SciPost_emails'].widget = forms.HiddenInput()
self.fields['accepts_refereeing_requests'].widget = forms.HiddenInput()
......@@ -115,16 +119,17 @@ class ProfileMergeForm(forms.Form):
profile_old = self.cleaned_data['to_merge']
# Merge information from old to new Profile.
profile.expertises = list(
set(profile_old.expertises or []) | set(profile.expertises or []))
if profile.orcid_id is None:
profile.orcid_id = profile_old.orcid_id
if profile.webpage is None:
profile.webpage = profile_old.webpage
if profile.acad_field is None:
profile.acad_field = profile_old.acad_field
if profile_old.has_active_contributor and not profile.has_active_contributor:
profile.contributor = profile_old.contributor
profile.save() # Save all the field updates.
profile.specialties.add(*profile_old.specialties.all())
profile.topics.add(*profile_old.topics.all())
# Merge email
......
......@@ -31,7 +31,7 @@
<h3>Current situation and triggers for expansion</h3>
<p class="ml-2 mr-2 mt-2">
The Physics side of our operations is by now established, with our <a href="{% url 'journals:journals' %}?field=physics">Physics Journals</a> published under the auspices of the <a href="{% url 'colleges:college_detail' discipline='physics' %}">Editorial College (Physics)</a>. We will continue expanding this side of our operations according to the increase in the number of submissions we receive.</p>
The Physics side of our operations is by now established, with our <a href="{% url 'journals:journals' %}?field=physics">Physics Journals</a> published under the auspices of the <a href="{% url 'colleges:college_detail' slug='physics' %}">Editorial College (Physics)</a>. We will continue expanding this side of our operations according to the increase in the number of submissions we receive.</p>
<p class="ml-2 mr-2">On the infrastructure side, we have made great strides. Our platform is not just a website: we have conceived, designed and implemented a fully-featured system to handle all aspects of the publication business, from manuscript submission all the way to professional metadata curation. Since our systems were implemented from the start in a field-agnostic way, we are now in perfect position to enable other fields to profit from our development work.
</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment