# Process the data in form.cleaned_data
first_name = form.cleaned_data['first_name']
last_name = form.cleaned_data['last_name']
- affiliation = form.cleaned_data['affiliation']
+ authority = form.cleaned_data['authority']
subject = form.cleaned_data['subject']
- message = form.cleaned_data['message']
+ description = form.cleaned_data['description']
email = form.cleaned_data['email'] # email of the sender
cc_myself = form.cleaned_data['cc_myself']
#recipients = authority_get_pi_emails(authority_hrn)
- recipients = ['yasin.upmc@gmail.com', 'thierry.parmentelat@inria.fr', ]
+ recipients = ['support@myslice.info' ]
if cc_myself:
recipients.append(email)
- msg = render_to_string('slice-request-email.txt', form.cleaned_data)
+ msg = render_to_string('contact-support-email.txt', form.cleaned_data)
send_mail("Onelab user %s submitted a query "%email, msg, email, recipients)
return render(request,'contact_sent.html') # Redirect after POST
else:
class ContactForm(forms.Form):
first_name = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'}))
last_name = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'}))
- affiliation = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'}))
+ authority = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'}))
email = forms.EmailField(widget=forms.TextInput(attrs={'class':'form-control'}))
subject = forms.CharField(max_length=100,widget=forms.TextInput(attrs={'class':'form-control'}))
- message = forms.CharField(widget=forms.Textarea(attrs={'class':'form-control'}))
+ description = forms.CharField(widget=forms.Textarea(attrs={'class':'form-control'}))
cc_myself = forms.BooleanField(required=False,widget=forms.CheckboxInput(attrs={'class':'form-control'}))
class PassResetForm(forms.Form):
print "FIREXP ENABLED"
authorities = execute_admin_query(request, authorities_query)
- authorities = sorted(authorities)
+ if authorities is not None:
+ authorities = sorted(authorities)
# xxx tocheck - if authorities is empty, it's no use anyway
# (users won't be able to validate the form anyway)
# Using cache manifold-tables to get the list of authorities faster
authorities_query = Query.get('authority').select('name', 'authority_hrn')
authorities = execute_admin_query(request, authorities_query)
- authorities = sorted(authorities)
+ if authorities is not None:
+ authorities = sorted(authorities)
user_query = Query().get('local:user').select('email')
user_email = execute_query(self.request, user_query)
--- /dev/null
+User details:
+
+First name : {{first_name}}
+Last name : {{last_name}}
+email : {{email}}
+Authority : {{authority}}
+
+Query Details:
+
+Subject : {{subject}}
+Description : {{description}}
+
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
<div class="onelab-title well-lg">
<h2>Onelab Support</h2>
- <h4>If you have already registered, then please send an <a href="mailto:support@myslice.info">e-mail</a>
- or <a href="http://trac.myslice.info/" >visit us</a></h4>
+ <h4>If you have any diffculties using the portal, please contact us by filling this form below.</h4>
+ <h4>You can also <a href="mailto:support@myslice.info">e-mail</a> us directly or consult to our <a href="http://trac.myslice.info/" >documentation</a></h4>
</div>
<!-- no hint for this form, moreover we need more space to write stuff down
<div class="col-xs-6"> {{ field.errors }} {{ field }} <p class="form-hint">{{ field.help_text }}</p> </div>
</div>
{% endfor %}
- <button class="submit btn btn-default col-xs-12" type="submit">Send to Support</button>
+ <button class="submit btn btn-default col-xs-12" type="submit">Submit to OneLab Support</button>
</fieldset>
</form>
</div>
Last Name : {{last_name}}
Authority hrn: {{authority_hrn}}
Public key : {{public_key}}
-email : {{email}}
-
+Email : {{email}}
+User Hrn : {{user_hrn}}