Defines the text that will be displayed on the 'lost password' page
Parameters:
- 'ln' *string* - The language to display the interface in
- 'supportemail' *string* - The email of the support team
"""
# load the right message language
_=gettext_set_language(ln)
return_("If you have lost password for your CERN Document Server internal account, then please enter your email address below and the lost password will be emailed to you.")+\
"<br /><br />"+\
_("Note that if you have been using an external login system (such as CERN NICE), then we cannot do anything and you have to ask there.")+\
_("Alternatively, you can ask %s to change your login system from external to internal.")%("""<a href="mailto:%(email)s">%(email)s</a>"""%{'email':supportemail})+\
"<br><br>"
deftmpl_back_form(self,ln,message,act,link):
"""
A standard one-message-go-back-link page.
Parameters:
- 'ln' *string* - The language to display the interface in
- 'message' *string* - The message to display
- 'act' *string* - The action to accomplish when going back
- 'ln' *string* - The language to display the interface in
- 'uid' *string* - The user id
- 'guest' *boolean* - If the user is guest
- 'cfg_cern_site' *boolean* - If the site is a CERN site
"""
# load the right message language
_=gettext_set_language(ln)
out="""<P>%(account_offer)s</P>
<blockquote>
<dl>
"""%{
'account_offer':_("The CDS Search offers you a possibility to personalize the interface, to set up your own personal library of documents, or to set up an automatic alert query that would run periodically and would notify you of search results by email."),
}
ifnotguest:
out+="""
<dt>
<A href="./edit">%(your_settings)s</A>
<dd>%(change_account)s"""%{
'your_settings':_("Your Settings"),
'change_account':_("Set or change your account Email address or password. Specify your preferences about the way the interface looks like.")
'search_explain':_("View all the searches you performed during the last 30 days."),
'your_baskets':_("Your Baskets"),
'basket_explain':_("With baskets you can define specific collections of items, store interesting records you want to access later or share with others."),
'explain_alerts':_("Subscribe to a search which will be run periodically by our service. The result can be sent to you via Email or stored in one of your baskets."),
'explain_loans':_("Check out book you have on load, submit borrowing requests, etc. Requires CERN ID."),
}
out+="""
</dl>
</blockquote>"""
returnout
deftmpl_warning_guest_user(self,ln,type):
"""
Displays a warning message about the specified type
Parameters:
- 'ln' *string* - The language to display the interface in
- 'type' *string* - The type of data that will get lost in case of guest account
"""
# load the right message language
_=gettext_set_language(ln)
msg=_("""You are logged in as a guest user, so your %s will disappear at the end of the current session. If you wish you can
<a href="../youraccount.py/login">login or register here</a>.""")%type
return"""<table class="errorbox" summary="">
<thead>
<tr>
<th class="errorboxheader">%s</th>
</tr>
</thead>
</table>"""%msg
deftmpl_account_body(self,ln,user):
"""
Displays the body of the actions of the user
Parameters:
- 'ln' *string* - The language to display the interface in
- 'user' *string* - The user name
"""
# load the right message language
_=gettext_set_language(ln)
return_("""You are logged in as %s. You may want to a) <A href="../youraccount.py/logout">logout</A>; b) edit your <A href="../youraccount.py/edit">account settings</a>.""")%user+"<BR><BR>"
deftmpl_account_template(self,title,body,ln):
"""
Displays a block of the your account page
Parameters:
- 'ln' *string* - The language to display the interface in
'password_contain':_("The password phrase may contain punctuation, spaces, etc."),
'retype':_("Retype Password"),
'register':_("register"),
'explain_acc':_("Please do not use valuable passwords such as your Unix, AFS or NICE passwords with this service. Your email address will stay strictly confidential and will not be disclosed to any third party. It will be used to identify you for personal services of %s. For example, you may set up an automatic alert search that will look for new preprints and will notify you daily of new arrivals by email.")%cdsname,