comparison rhodecode/controllers/admin/ldap_settings.py @ 3565:a8f2d78d14ea beta

consistently capitalize initial letter in flash messages
author Mads Kiilerich <madski@unity3d.com>
date Wed, 20 Mar 2013 12:16:58 +0100
parents 91c442a489bb
children 3563bb7b4b82 08cf7741e5e1
comparison
equal deleted inserted replaced
3564:82b2d1a21ae3 3565:a8f2d78d14ea
121 setting = RhodeCodeSetting.get_by_name(k) 121 setting = RhodeCodeSetting.get_by_name(k)
122 setting.app_settings_value = v 122 setting.app_settings_value = v
123 Session().add(setting) 123 Session().add(setting)
124 124
125 Session().commit() 125 Session().commit()
126 h.flash(_('Ldap settings updated successfully'), 126 h.flash(_('LDAP settings updated successfully'),
127 category='success') 127 category='success')
128 if not ldap_active: 128 if not ldap_active:
129 #if ldap is missing send an info to user 129 #if ldap is missing send an info to user
130 h.flash(_('Unable to activate ldap. The "python-ldap" library ' 130 h.flash(_('Unable to activate ldap. The "python-ldap" library '
131 'is missing.'), category='warning') 131 'is missing.'), category='warning')
142 errors=e, 142 errors=e,
143 prefix_error=False, 143 prefix_error=False,
144 encoding="UTF-8") 144 encoding="UTF-8")
145 except Exception: 145 except Exception:
146 log.error(traceback.format_exc()) 146 log.error(traceback.format_exc())
147 h.flash(_('error occurred during update of ldap settings'), 147 h.flash(_('Error occurred during update of ldap settings'),
148 category='error') 148 category='error')
149 149
150 return redirect(url('ldap_home')) 150 return redirect(url('ldap_home'))