Compare commits

..

8 Commits

Author SHA1 Message Date
Dinis 2a88b488ab Merge pull request #2 from web2py/master
update master
2020-01-06 09:38:12 +00:00
mdipierro 93ef108c0b new pydal 2020-01-03 17:42:08 +01:00
mdipierro 382d034fdd AuthJWT 400->401 2019-12-26 09:22:04 +01:00
mdipierro ee0763100b Merge pull request #2264 from timnyborg/patch-12
limit widget rebuilding on form error to ListWidget
2019-12-24 06:57:17 -08:00
mdipierro 67b033d0a8 Merge pull request #2224 from timnyborg/patch-6
fix error block location in radio buttons
2019-12-24 06:48:19 -08:00
mdipierro b6060ab79a Merge pull request #2280 from dlage/issue-2274
Fix Issue 2274 - sessions using redis
2019-12-24 06:44:11 -08:00
Tim Nyborg 66ae2a5a7f limit widget rebuilding on form error to ListWidget 2019-10-09 16:21:25 +01:00
Tim Nyborg 2e8a8a62f9 fix error block location in radio buttons
Currently, radio widget error messages appear between the final checkbox and the final label.  Instead, use CheckboxesWidget's invisible input method to display errors on radio widgets.
2019-06-17 12:13:15 +01:00
4 changed files with 11 additions and 6 deletions
+7 -2
View File
@@ -461,7 +461,12 @@ class RadioWidget(OptionsWidget):
opts.append(child(tds)) opts.append(child(tds))
if opts: if opts:
opts[-1][0][0]['hideerror'] = False opts.append(
INPUT(requires=attr.get('requires', None),
_style="display:none;",
_disabled="disabled",
_name=field.name,
hideerror=False))
return parent(*opts, **attr) return parent(*opts, **attr)
@@ -1814,7 +1819,7 @@ class SQLFORM(FORM):
if not field.widget and field.type.startswith('list:') and \ if not field.widget and field.type.startswith('list:') and \
not OptionsWidget.has_options(field): not OptionsWidget.has_options(field):
field.widget = self.widgets.list.widget field.widget = self.widgets.list.widget
if field.widget and fieldname in request_vars: if field.widget == self.widgets.list.widget and fieldname in request_vars:
if fieldname in self.request_vars: if fieldname in self.request_vars:
value = self.request_vars[fieldname] value = self.request_vars[fieldname]
elif self.record: elif self.record:
+2 -2
View File
@@ -3726,7 +3726,7 @@ class Auth(AuthAPI):
are passed to the constructor of class AuthJWT. Look there for documentation. are passed to the constructor of class AuthJWT. Look there for documentation.
""" """
if not self.jwt_handler: if not self.jwt_handler:
raise HTTP(400, "Not authorized") raise HTTP(401, "Not authorized")
else: else:
rtn = self.jwt_handler.jwt_token_manager() rtn = self.jwt_handler.jwt_token_manager()
raise HTTP(200, rtn, cookies=None, **current.response.headers) raise HTTP(200, rtn, cookies=None, **current.response.headers)
@@ -3820,7 +3820,7 @@ class Auth(AuthAPI):
def allows_jwt(self, otherwise=None): def allows_jwt(self, otherwise=None):
if not self.jwt_handler: if not self.jwt_handler:
raise HTTP(400, "Not authorized") raise HTTP(401, "Not authorized")
else: else:
return self.jwt_handler.allows_jwt(otherwise=otherwise) return self.jwt_handler.allows_jwt(otherwise=otherwise)