Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 20, 2021
1 parent 965ceb6 commit d750bb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/uadmin/default/admin/widgets/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
{{ end }}
{{ end }}
<div onclick="$(this).find('input').attr('checked') === 'checked' ? $(this).find('input').removeAttr('checked') : $(this).find('input').attr('checked', 'checked');" class="material-switch" style="padding-left:15px;padding-top:5px">
<div {{if not .ReadOnly}}onclick="$(this).find('input').attr('checked') === 'checked' ? $(this).find('input').removeAttr('checked') : $(this).find('input').attr('checked', 'checked');" {{end}} class="material-switch" style="padding-left:15px;padding-top:5px">
<input name="{{ .Name }}" {{ range $k, $v := .Attrs }} {{ attr $k }}="{{ safe $v }}"{{ end }} type="checkbox" {{if .ReadOnly}} readonly {{end}}>
<label class="label-primary"></label>
</div>
Expand Down

0 comments on commit d750bb2

Please sign in to comment.