MDl-36352 Calendar: Moved poll interval next to url field for accessibility

This commit is contained in:
Rajesh Taneja
2012-11-16 15:57:21 +08:00
parent 3e2efe3b05
commit 39bd8a5c59
+3 -3
View File
@@ -60,9 +60,6 @@ class calendar_addsubscription_form extends moodleform {
$mform->addElement('text', 'url', get_string('importfromurl', 'calendar'), array('maxsize' => '255', 'size' => '50'));
$mform->setType('url', PARAM_URL);
// Import file
$mform->addElement('filepicker', 'importfile', get_string('importfromfile', 'calendar'));
// Poll interval
$choices = calendar_get_pollinterval_choices();
$mform->addElement('select', 'pollinterval', get_string('pollinterval', 'calendar'), $choices);
@@ -70,6 +67,9 @@ class calendar_addsubscription_form extends moodleform {
$mform->addHelpButton('pollinterval', 'pollinterval', 'calendar');
$mform->setType('pollinterval', PARAM_INT);
// Import file
$mform->addElement('filepicker', 'importfile', get_string('importfromfile', 'calendar'));
// Disable appropriate elements depending on import from value.
$mform->disabledIf('pollinterval', 'importfrom', 'eq', CALENDAR_IMPORT_FROM_FILE);
$mform->disabledIf('url', 'importfrom', 'eq', CALENDAR_IMPORT_FROM_FILE);