Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php |
— | — | @@ -230,10 +230,11 @@ |
231 | 231 | |
232 | 232 | // Read-only attribute |
233 | 233 | $readOnlyAttrib = array(); |
| 234 | + $cbReadOnlyAttrib = array(); // For checkboxes |
234 | 235 | |
235 | 236 | if (!$this->canEdit()) { |
236 | 237 | $readOnlyAttrib['readonly'] = 'readonly'; |
237 | | - $readOnlyAttrib['disabled'] = 'disabled'; |
| 238 | + $cbReadOnlyAttrib['disabled'] = 'disabled'; |
238 | 239 | } |
239 | 240 | |
240 | 241 | $fields = array(); |
— | — | @@ -324,7 +325,7 @@ |
325 | 326 | $postVar, |
326 | 327 | $postVar, |
327 | 328 | isset( $row->$dbField ) ? $row->$dbField : false, |
328 | | - $readOnlyAttrib |
| 329 | + $cbReadOnlyAttrib |
329 | 330 | ); |
330 | 331 | $checkbox = Xml::tags( 'p', null, $checkbox ); |
331 | 332 | $flags .= $checkbox; |
— | — | @@ -433,10 +434,11 @@ |
434 | 435 | } |
435 | 436 | |
436 | 437 | $readOnlyAttrib = array(); |
| 438 | + $cbReadOnlyAttrib = array(); // For checkboxes |
437 | 439 | |
438 | 440 | if (!$this->canEdit()) { |
439 | 441 | $readOnlyAttrib['readonly'] = 'readonly'; |
440 | | - $readOnlyAttrib['disabled'] = 'disabled'; |
| 442 | + $cbReadOnlyAttrib['disabled'] = 'disabled'; |
441 | 443 | } |
442 | 444 | |
443 | 445 | switch( $action ) { |
— | — | @@ -446,7 +448,7 @@ |
447 | 449 | 'wpFilterActionThrottle', |
448 | 450 | "mw-abusefilter-action-checkbox-$action", |
449 | 451 | $set, |
450 | | - array( 'class' => 'mw-abusefilter-action-checkbox' ) + $readOnlyAttrib ); |
| 452 | + array( 'class' => 'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib ); |
451 | 453 | $throttleFields = array(); |
452 | 454 | |
453 | 455 | if ($set) { |
— | — | @@ -499,7 +501,7 @@ |
500 | 502 | 'wpFilterActionWarn', |
501 | 503 | "mw-abusefilter-action-checkbox-$action", |
502 | 504 | $set, |
503 | | - array( 'class' => 'mw-abusefilter-action-checkbox' ) + $readOnlyAttrib ); |
| 505 | + array( 'class' => 'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib ); |
504 | 506 | $output .= Xml::tags( 'p', null, $checkbox ); |
505 | 507 | $warnMsg = empty($set) ? 'abusefilter-warning' : $parameters[0]; |
506 | 508 | |
— | — | @@ -510,7 +512,7 @@ |
511 | 513 | 'wpFilterWarnMessageOther', |
512 | 514 | 45, |
513 | 515 | $warnMsg ? $warnMsg : 'abusefilter-warning-', |
514 | | - array( 'id' => 'mw-abusefilter-warn-message-other' ) + $readOnlyAttrib |
| 516 | + array( 'id' => 'mw-abusefilter-warn-message-other' ) + $cbReadOnlyAttrib |
515 | 517 | ); |
516 | 518 | |
517 | 519 | $previewButton = Xml::element( |
— | — | @@ -555,7 +557,7 @@ |
556 | 558 | 'wpFilterActionTag', |
557 | 559 | "mw-abusefilter-action-checkbox-$action", |
558 | 560 | $set, |
559 | | - array( 'class' => 'mw-abusefilter-action-checkbox' ) + $readOnlyAttrib |
| 561 | + array( 'class' => 'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib |
560 | 562 | ); |
561 | 563 | $output .= Xml::tags( 'p', null, $checkbox ); |
562 | 564 | |
— | — | @@ -577,7 +579,7 @@ |
578 | 580 | $form_field, |
579 | 581 | "mw-abusefilter-action-checkbox-$action", |
580 | 582 | $status, |
581 | | - array( 'class' => 'mw-abusefilter-action-checkbox' ) + $readOnlyAttrib |
| 583 | + array( 'class' => 'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib |
582 | 584 | ); |
583 | 585 | $thisAction = Xml::tags( 'p', null, $thisAction ); |
584 | 586 | return $thisAction; |
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -1285,7 +1285,7 @@ |
1286 | 1286 | |
1287 | 1287 | $readOnlyAttrib = array(); |
1288 | 1288 | if (!$canEdit) |
1289 | | - $readOnlyAttrib['disabled'] = 'disabled'; |
| 1289 | + $readOnlyAttrib['readonly'] = 'readonly'; |
1290 | 1290 | |
1291 | 1291 | global $wgUser; |
1292 | 1292 | $noTestAttrib = array(); |