소스 검색

Allow extra javascript to be added to checkboxes

pdontthink 20 년 전
부모
커밋
ebbab19065
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      functions/forms.php

+ 2 - 2
functions/forms.php

@@ -37,9 +37,9 @@ function addPwField($name , $value = null) {
 /**
  * Form checkbox
  */
-function addCheckBox($name, $checked = false, $value = null) {
+function addCheckBox($name, $checked = false, $value = null, $xtra = '') {
     return addInputField('checkbox', $name, $value,
-        ($checked ? ' checked="checked"' : ''));
+        ($checked ? ' checked="checked"' : '') . ' ' . $xtra);
 }
 
 /**