diff --git a/pylons_app/templates/admin.html b/pylons_app/templates/admin.html --- a/pylons_app/templates/admin.html +++ b/pylons_app/templates/admin.html @@ -1,5 +1,14 @@ ## -*- coding: utf-8 -*- <%inherit file="base/base.html"/> + <%def name="get_form_error(element)"> + %if type(c.form_errors) == dict: + %if c.form_errors.get(element,False): + + ${c.form_errors.get(element,'')} + + %endif + %endif + <%def name="title()"> ${_('Repository managment')} @@ -36,10 +45,12 @@ ${_('Username')} ${h.text('username')} + ${get_form_error('username')} ${_('Password')} - ${h.text('password')} + ${h.password('password')} + ${get_form_error('password')}