Permalink
Browse files

MDL-25647 mnet: fixed checkbox handling at peer services form

We must use advcheckbox here so that unticked checkbox is considered as
0 and not as not-submitted in this case.
  • Loading branch information...
1 parent ccdd159 commit 800bd78548b06f3ae9b1e18e74655e6c9006f97a @mudrd8mz mudrd8mz committed with skodak Dec 15, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/mnet/services_form.php
View
4 admin/mnet/services_form.php
@@ -60,13 +60,13 @@ function definition() {
if (!empty($version['hostsubscribes'])) {
$pubstr .= ' <a class="notifysuccess" title="'.s(get_string('issubscribed','mnet', $mnet_peer->name)).'">&radic;</a> ';
}
- $mform->addElement('checkbox', 'publish[' . $version['serviceid'] . ']', $pubstr);
+ $mform->addElement('advcheckbox', 'publish[' . $version['serviceid'] . ']', $pubstr);
$substr = get_string('subscribe','mnet');
if (!empty($version['hostpublishes'])) {
$substr .= ' <a class="notifysuccess" title="'.s(get_string('ispublished','mnet', $mnet_peer->name)).'">&radic;</a> ';
}
- $mform->addElement('checkbox', 'subscribe[' . $version['serviceid']. ']', $substr);
+ $mform->addElement('advcheckbox', 'subscribe[' . $version['serviceid']. ']', $substr);
$count++;
}
$this->add_action_buttons();

0 comments on commit 800bd78

Please sign in to comment.