Skip to content

Commit

Permalink
MDL-25647 mnet: fixed checkbox handling at peer services form
Browse files Browse the repository at this point in the history
We must use advcheckbox here so that unticked checkbox is considered as
0 and not as not-submitted in this case.
  • Loading branch information
mudrd8mz authored and skodak committed Dec 20, 2010
1 parent ccdd159 commit 800bd78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/mnet/services_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 800bd78

Please sign in to comment.