Skip to content

Commit

Permalink
feat: add radio field support for dynamic_inline.js (#1955)
Browse files Browse the repository at this point in the history
When using radio buttons in dynamic inlines this raised an 'Unhandled
field in dynamic_inline.js:' alert. This was fixed by dublicating the
'checkbox' case in the function 'anyFieldDirty' in 'dynamic_inline.js'

Co-authored-by: Christian Kuper <[email protected]>
  • Loading branch information
ChrisKuper and Christian Kuper authored Aug 18, 2020
1 parent 404810a commit e9111cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,4 @@
* Geoffrey Royer
* Chris Hawes
* Andrii Soldatenko
* Christian Kuper
2 changes: 2 additions & 0 deletions mezzanine/core/static/mezzanine/js/admin/dynamic_inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jQuery(function($) {
return field.value && field.value != field.defaultValue;
case 'checkbox':
return field.checked != field.defaultChecked;
case 'radio':
return field.checked != field.defaultChecked;
case 'hidden':
return false;
default:
Expand Down

0 comments on commit e9111cc

Please sign in to comment.