Commit 800bd785 authored by David Mudrák's avatar David Mudrák Committed by Petr Skoda
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.
parent ccdd1596
......@@ -60,13 +60,13 @@ class mnet_services_form extends moodleform {
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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment