X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/959e53d319ef119367ffe4a724da938151276657..3a87d3bf6e5e7525c3b381df94b4d3c1304d237b:/sercom/subcontrollers/enunciado/__init__.py?ds=sidebyside diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index d953ba2..9527e83 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -54,6 +54,7 @@ form = TableForm(fields=[ TextField(name='descripcion', label=_(u'Descripción'), validator=validators.UnicodeString(not_empty=False, max=255, strip=True)), ]) +form.javascript.append(JSSource("MochiKit.DOM.focusOnLoad('form_nombre');")) class EnunciadoController(controllers.Controller, identity.SecureResource): """Basic model admin interface""" @@ -77,7 +78,7 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): r = cls.select() else: r = cls.selectBy(autorID=autor) - return dict(records=r, name=name, namepl=namepl) + return dict(records=r, name=name, namepl=namepl, parcial=autor) @expose(template='kid:%s.templates.new' % __name__) def new(self, **kw):