Fix datepicker arrows style on hover
[cds-indico.git] / indico / MaKaC / webinterface / rh / lang.py
blobedef8c6dbb898f33b084f5742068a03e4ca64da1
1 # This file is part of Indico.
2 # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
4 # Indico is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3 of the
7 # License, or (at your option) any later version.
9 # Indico is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with Indico; if not, see <http://www.gnu.org/licenses/>.
17 from flask import request, session, redirect
19 from MaKaC.webinterface.rh.base import RH
22 class RHChangeLang(RH):
23 def _process(self):
24 language = request.form['lang']
25 session.lang = language
26 if session.user:
27 session.user.settings.set('lang', language)
29 assert '://' not in request.form['next'] # avoid redirecting to external url
30 return redirect(request.form['next'])