Skip to content

Commit

Permalink
fix radio button PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 authored and amercader committed Jul 7, 2017
1 parent 92ebe31 commit 28dcc92
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ckan/lib/helpers.py
Expand Up @@ -2312,6 +2312,15 @@ def mail_to(email_address, name):
return html


@core_helper
def radio(selected, id, checked):
if checked:
return literal((u'<input checked="checked" id="%s_%s" name="%s" \
value="%s" type="radio">') % (selected, id, selected, id))
return literal(('<input id="%s_%s" name="%s" \
value="%s" type="radio">') % (selected, id, selected, id))


core_helper(flash, name='flash')
core_helper(localised_number)
core_helper(localised_SI_number)
Expand Down

0 comments on commit 28dcc92

Please sign in to comment.