MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag

This commit is contained in:
Rossiani Wijaya
2012-03-30 17:13:50 +08:00
parent a7899ca45f
commit 0add004b0e
93 changed files with 339 additions and 193 deletions
+2
View File
@@ -242,6 +242,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Disable/off/on
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->active, null, 'active' . basename($filter));
$select->set_label(get_accesshide(get_string('isactive', 'filters')));
$row[] = $OUTPUT->render($select);
// Re-order
@@ -263,6 +264,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Apply to strings.
$select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . basename($filter));
$select->set_label(get_accesshide(get_string('applyto', 'filters')));
$select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
$row[] = $OUTPUT->render($select);
+4 -3
View File
@@ -203,17 +203,18 @@ echo get_string('username') . ":\n";
if (!empty($formerror['username'])) {
echo '<span class="error"> * </span>';
}
echo '<input type="text" name="username" size="20" maxlength="100" />';
echo html_writer::label(get_string('username'), 'menuusername', false, array('class' =>'accesshide'));
echo '<input id="menuusername" type="text" name="username" size="20" maxlength="100" />';
// choose a remote host
echo " " . get_string('remotehost', 'mnet') . ":\n";
echo html_writer::label(get_string('remotehost', 'mnet'), 'menumnet_host_id');
if (!empty($formerror['mnet_host_id'])) {
echo '<span class="error"> * </span>';
}
echo html_writer::select($mnethosts, 'mnet_host_id');
// choose an access level
echo " " . get_string('accesslevel', 'mnet') . ":\n";
echo html_writer::label(get_string('accesslevel', 'mnet'), 'menuaccessctrl');
if (!empty($formerror['accessctrl'])) {
echo '<span class="error"> * </span>';
}
+1
View File
@@ -197,6 +197,7 @@ if (($action == 'edit') || ($action == 'new')) {
$currentaction = 'hide';
}
$select = new single_select(portfolio_action_url($pluginid, 'pf'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . $pluginid);
$select->set_label(get_accesshide(get_string('portfolio', 'portfolio')));
$table->data[] = array($pluginname, $OUTPUT->render($select), $settings);
}
if (!in_array($plugin, $usedplugins)) {
+2 -1
View File
@@ -305,7 +305,7 @@ if (($action == 'edit') || ($action == 'new')) {
}
$select = new single_select(repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
$select->set_label(get_accesshide(get_string('action')));
// Display up/down link
$updown = '';
$spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -342,6 +342,7 @@ if (($action == 'edit') || ($action == 'new')) {
// Check that it has not already been listed
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
$select->set_label(get_accesshide(get_string('action')));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
}
}
+4 -1
View File
@@ -721,7 +721,10 @@ class define_role_table_advanced extends capability_table_with_risks {
foreach(get_role_archetypes() as $type) {
$options[$type] = get_string('archetype'.$type, 'role');
}
return html_writer::select($options, 'archetype', $this->role->archetype, false);
$return = html_writer::label(get_string('archetype'.$type, 'role'), 'menuarchetype', false, array('class' => 'accesshide'));
$return .= html_writer::select($options, 'archetype', $this->role->archetype, false);
return $return;
}
protected function get_assignable_levels_control() {
+1 -1
View File
@@ -42,7 +42,7 @@
$timezones = get_list_of_timezones();
echo '<center><form action="timezone.php" method="post">';
echo "$strusers ($strall): ";
echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone');
echo html_writer::select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime")));
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
echo '<input type="submit" value="'.s($strsavechanges).'" />';
+14 -14
View File
@@ -94,9 +94,9 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>:</td>
<td align="right"><label for="hostname"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>: </label></td>
<td>
<input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<input name="hostname" id="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<?php if (isset($err['hostname'])) { echo $OUTPUT->error_text($err['hostname']); } ?>
</td>
<td>
@@ -105,10 +105,10 @@ $yesno = array( get_string('no'), get_string('yes') );
</tr>
<tr valign="top" class="required">
<td align="right">
<?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>:
<label for="baseuri"><?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>: </label>
</td>
<td>
<input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<input name="baseuri" id="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<?php if (isset($err['baseuri'])) { echo $OUTPUT->error_text($err['baseuri']); } ?>
</td>
<td>
@@ -117,10 +117,10 @@ $yesno = array( get_string('no'), get_string('yes') );
</tr>
<tr valign="top" class="required">
<td align="right">
<?php print_string('auth_cas_port_key', 'auth_cas') ?>:
<label for="port"><?php print_string('auth_cas_port_key', 'auth_cas') ?>: </label>
</td>
<td>
<input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
<input name="port" id="port" type="text" size="30" value="<?php echo $config->port ?>" />
<?php if (isset($err['port'])) { echo $OUTPUT->error_text($err['port']); } ?>
</td>
<td>
@@ -129,7 +129,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</tr>
<tr valign="top" class="required">
<td align="right">
<?php print_string('auth_cas_casversion', 'auth_cas') ?>:
<?php echo html_writer::label(get_string('auth_cas_casversion', 'auth_cas'), 'menucasversion'); ?>:
</td>
<td>
<?php
@@ -145,7 +145,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_language_key', 'auth_cas') ?>:</td>
<td align="right"><?php echo html_writer::label(get_string('auth_cas_language_key', 'auth_cas'), 'menulanguage'); ?>:</td>
<td>
<?php echo html_writer::select($CASLANGUAGES, 'language', $config->language, false); ?>
</td>
@@ -155,7 +155,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</tr>
<tr valign="top" class="required">
<td align="right">
<?php print_string('auth_cas_proxycas_key', 'auth_cas') ?>:
<?php echo html_writer::label(get_string('auth_cas_proxycas_key', 'auth_cas'), 'menuproxycas'); ?>:
</td>
<td>
<?php echo html_writer::select($yesno, 'proxycas', $config->proxycas, false); ?>
@@ -165,7 +165,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth_cas') ?>:</td>
<td align="right"><?php echo html_writer::label(get_string('auth_cas_logoutcas_key', 'auth_cas'), 'menulogoutcas'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'logoutcas', $config->logoutcas, false); ?>
</td>
@@ -174,7 +174,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_multiauth_key', 'auth_cas') ?>:</td>
<td align="right"><?php echo html_writer::label(get_string('auth_cas_multiauth_key', 'auth_cas'), 'menumultiauth'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'multiauth', $config->multiauth, false); ?>
</td>
@@ -183,7 +183,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_certificate_check_key', 'auth_cas') ?>:</td>
<td align="right"><?php echo html_writer::label(get_string('auth_cas_certificate_check_key', 'auth_cas'), 'menucertificate_check'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'certificate_check', $config->certificate_check, false); ?>
</td>
@@ -192,7 +192,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>:</td>
<td align="right"><label for="certificate_path"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>: </label></td>
<td>
<input name="certificate_path" id="certificate_path" type="text" size="30" value="<?php echo $config->certificate_path ?>" />
<?php if (isset($err['certificate_path'])) echo $OUTPUT->error_text($err['certificate_path']); ?>
@@ -219,7 +219,7 @@ $yesno = array( get_string('no'), get_string('yes') );
</td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
<td align="right"><label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
<td>
<?php
$versions = array();
+8 -8
View File
@@ -27,9 +27,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string("auth_fchost_key", "auth_fc") ?>:</td>
<td align="right"><label for="host"><?php print_string("auth_fchost_key", "auth_fc") ?>:</label></td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host?>" />
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host?>" />
<?php if (isset($err["host"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -38,9 +38,9 @@
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string("auth_fcfppport_key", "auth_fc") ?>:</td>
<td align="right"><label for="fppport"><?php print_string("auth_fcfppport_key", "auth_fc") ?>: </label></td>
<td>
<input name="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
<input name="fppport" id="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
<?php if (isset($err["fppport"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -70,9 +70,9 @@
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string("auth_fccreators_key", "auth_fc") ?>:</td>
<td align="right"><label for="creators"><?php print_string("auth_fccreators_key", "auth_fc") ?>: </label></td>
<td>
<input name="creators" type="text" size="30" value="<?php echo $config->creators?>" />
<input name="creators" id="creators" type="text" size="30" value="<?php echo $config->creators?>" />
<?php if (isset($err["creators"])) echo $OUTPUT->error_text($err["creators"]); ?>
</td>
<td>
@@ -81,9 +81,9 @@
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+7 -7
View File
@@ -18,9 +18,9 @@ if (!isset($config->changepasswordurl)) {
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </td>
<td align="right"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -40,7 +40,7 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>: </td>
<td align="right"><?php echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
<td>
<?php
@@ -56,9 +56,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </td>
<td align="right"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
<td>
<input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
<input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -71,9 +71,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+1 -1
View File
@@ -118,7 +118,7 @@ $yesno = array(get_string('no'), get_string('yes'));
</tr>
<tr valign="top" class="required">
<td align="right">
<label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
<label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
</td>
<td>
<?php
+3 -3
View File
@@ -22,9 +22,9 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
<table cellspacing="0" cellpadding="5">
<tr valign="top" class="required">
<td align="right"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </td>
<td align="right"><label for="rpc_negotiation_timeout"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </label></td>
<td>
<input name="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
<input name="rpc_negotiation_timeout" id="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
<?php
if (isset($err['rpc_negotiation_timeout'])) {
@@ -45,7 +45,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
<?php /*
See MDL-21327 for why this is commented out
<tr valign="top" class="required">
<td align="right"><?php print_string('auto_add_remote_users', 'auth_mnet'); ?>: </td>
<td align="right"><?php echo html_writer::label(get_string('auto_add_remote_users', 'auth_mnet'), 'menuauto_add_remote_users'); ?>: </td>
<td>
<?php
+6 -6
View File
@@ -15,9 +15,9 @@ if (!isset($config->changepasswordurl)) {
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </td>
<td align="right"><label for="host"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </label></td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err["host"])) {
@@ -37,9 +37,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </td>
<td align="right"><label for="port"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </label></td>
<td>
<input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
<input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err["port"])) {
@@ -52,9 +52,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+9 -9
View File
@@ -21,9 +21,9 @@ if (!isset($config->changepasswordurl)) {
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </td>
<td align="right"><label for="host"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </label></td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -43,7 +43,7 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_pop3type_key', 'auth_pop3') ?>: </td>
<td align="right"><?php echo html_writer::label(get_string('auth_pop3type_key', 'auth_pop3'), 'menutype'); ?>: </td>
<td>
<?php
@@ -59,9 +59,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </td>
<td align="right"><label for="port"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </label></td>
<td>
<input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
<input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -74,9 +74,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" class="required">
<td align="right"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </td>
<td align="right"><label for="mailbox"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </label></td>
<td>
<input name="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
<input name="mailbox" id="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
<?php
if (isset($err['mailbox'])) {
@@ -89,9 +89,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+9 -9
View File
@@ -30,9 +30,9 @@ if (!isset($config->changepasswordurl)) {
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top">
<td align="right"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </td>
<td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
<td>
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
<input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -45,9 +45,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </td>
<td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
<td>
<input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
<input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
<?php
if (isset($err['nasport'])) {
@@ -60,7 +60,7 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top" >
<td align="right"><?php print_string('auth_radiustype_key', 'auth_radius') ?>: </td>
<td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius'), 'menuradiustype'); ?>: </td>
<td>
<?php
@@ -82,9 +82,9 @@ if (!isset($config->changepasswordurl)) {
<tr valign="top" >
<td align="right"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </td>
<td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
<td>
<input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
<input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
<?php
if (isset($err['secret'])) {
@@ -97,9 +97,9 @@ if (!isset($config->changepasswordurl)) {
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+11 -11
View File
@@ -20,7 +20,7 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><?php print_string("username") ?>:</td>
<td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
<td>
<input name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
</td>
@@ -28,9 +28,9 @@
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>:</td>
<td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
<td>
<input name="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
<input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
<?php
if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
@@ -82,9 +82,9 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>:</td>
<td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
<td>
<input name="logout_handler" type="text" size="30" value="<?php
<input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
if ( isset($config->logout_handler) and !empty($config->logout_handler)){
echo $config->logout_handler;
}
@@ -94,9 +94,9 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>:</td>
<td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
<td>
<input name="logout_return_url" type="text" size="30" value="<?php
<input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
echo $config->logout_return_url;
}
@@ -106,9 +106,9 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
</tr>
<tr valign="top">
<td align="right"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>:</td>
<td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
<td>
<input name="login_name" type="text" size="30" value="<?php
<input name="login_name" id="login_name" type="text" size="30" value="<?php
if ( isset($config->login_name) and !empty($config->login_name)){
echo htmlentities($config->login_name);
} else {
@@ -120,9 +120,9 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/
</tr>
<tr valign="top">
<td align="right"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </td>
<td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
<td>
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
+2 -2
View File
@@ -29,9 +29,9 @@ if ($show_instructions) {
?>
<div class="guestsub">
<p><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></p>
<p><label for="idp"><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></label></p>
<form action="login.php" method="post" id="guestlogin">
<select name="idp">
<select id="idp" name="idp">
<option value="-" ><?php print_string("auth_shibboleth_select_member", "auth_shibboleth"); ?></option>
<?php
print_idp_list();
+10 -1
View File
@@ -343,7 +343,16 @@ class core_backup_renderer extends plugin_renderer_base {
} else {
$description = '';
}
return $this->backup_detail_pair($label, html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
if ($type == 'text') {
if (empty($attributes['id'])) {
$attributes['id'] = $name;
}
$label = html_writer::label($name, $attibutes['id'], false, array('class' => 'accesshide'));
} else {
$label = '';
}
return $this->backup_detail_pair($label, $label . html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
}
/**
+2 -2
View File
@@ -66,7 +66,7 @@ for($i = 1; $i < 3; $i++){
?>
<tr valign="top">
<td align="right">
<?php print_string('numsections'.$i, 'block_section_links'); ?>:
<label for="menunumsections<?php echo $i; ?>"><?php print_string('numsections'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($numberofsections, 'numsections'.$i, $selected[$i][0]); ?>
@@ -77,7 +77,7 @@ for($i = 1; $i < 3; $i++){
</tr>
<tr valign="top">
<td align="right">
<?php print_string('incby'.$i, 'block_section_links'); ?>:
<label for="menuincby<?php echo $i;?>"><?php print_string('incby'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($increments, 'incby'.$i, $selected[$i][1]); ?>
+2 -2
View File
@@ -225,7 +225,6 @@ class block_tags extends block_base {
if ($officialtags) { $this->content->text .= $officialtagscontent; }
if ($coursetags) { $this->content->text .= $coursetagscontent; }
if ($commtags) { $this->content->text .= $commtagscontent; }
// add the input form section (allowing a user to tag the current course) and navigation, or loggin message
if ($loggedin) {
// only show the input form on course pages for those allowed (or not barred)
@@ -250,7 +249,8 @@ class block_tags extends block_base {
<div class="coursetag_form_wrapper">
<div class="coursetag_form_positioner">
<div class="coursetag_form_input1">
<input type="text" name="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
<label class="accesshide" for="coursetag_sug_keyword">$tagthisunit</label>
<input type="text" name="coursetag_sug_keyword" id="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
</div>
<div class="coursetag_form_input2">
<input type="text" name="coursetag_new_tag" id="coursetag_new_tag" class="coursetag_form_input2a"
+1
View File
@@ -1472,6 +1472,7 @@ function calendar_print_month_selector($name, $selected) {
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
}
echo html_writer::label(get_string('months'), 'menu'. $name, false, array('class' => 'accesshide'));
echo html_writer::select($months, $name, $selected, false);
}
+3 -1
View File
@@ -704,7 +704,9 @@ class core_calendar_renderer extends plugin_renderer_base {
$select = new single_select(new moodle_url(CALENDAR_URL.'set.php', array('return' => base64_encode($returnurl->out(false)), 'var' => 'setcourse', 'sesskey'=>sesskey())), 'id', $courseoptions, $selected, null);
$select->class = 'cal_courses_flt';
if ($label !== null) {
$select->label = $label;
$select->set_label($label);
} else {
$select->set_label(get_accesshide(get_string('course')));
}
return $this->output->render($select);
}
+1
View File
@@ -369,6 +369,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
}
$popupurl = new moodle_url("index.php?move=$category->id&sesskey=".sesskey());
$select = new single_select($popupurl, 'moveto', $tempdisplaylist, $category->parent, null, "moveform$category->id");
$select->set_label(get_accesshide(get_string('frontpagecategorynames')));
echo $OUTPUT->render($select);
}
echo '</td>';
+3
View File
@@ -70,6 +70,7 @@ if ($scaleid) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -101,6 +102,7 @@ if ($scales = $DB->get_records("scale", array("courseid"=>$course->id), "name AS
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -127,6 +129,7 @@ if ($scales = $DB->get_records("scale", array("courseid"=>0), "name ASC")) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
+5 -1
View File
@@ -58,7 +58,9 @@ function authorize_print_orders($courseid, $userid) {
$searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour);
$buttons = "<form method='post' action='index.php' autocomplete='off'><div>";
$buttons .= html_writer::label(get_string('orderdetails', 'enrol_authorize'), 'menusearchtype', false, array('class' => 'accesshide'));
$buttons .= html_writer::select($searchmenu, 'searchtype', $searchtype, false);
$buttons .= html_writer::label(get_string('search'), 'menusearchtype', false, array('class' => 'accesshide'));
$buttons .= "<input type='text' size='16' name='searchquery' value='' />";
$buttons .= "<input type='submit' value='$strs->search' />";
$buttons .= "</div></form>";
@@ -81,7 +83,8 @@ function authorize_print_orders($courseid, $userid) {
if (($popupcrs = $DB->get_records_sql_menu($sql, $params))) {
$popupcrs = array($SITE->id => $SITE->fullname) + $popupcrs;
}
$popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, null, 'coursesmenu');
$popmenulabel = array('' => get_accesshide(get_string('course')));
$popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, $popmenulabel, 'coursesmenu');
$popupmenu .= '<br />';
$statusmenu = array(
AN_STATUS_NONE => $strs->all,
@@ -97,6 +100,7 @@ function authorize_print_orders($courseid, $userid) {
AN_STATUS_TEST => $authstrs->tested
);
$popmenulabel = array('' => get_accesshide(get_string('status')));
$popupmenu .= $OUTPUT->single_select(new moodle_url($baseurl.'&course='.$courseid), 'status', $statusmenu, $status, null, 'statusmenu');
if ($canmanagepayments) {
$popupmenu .= '<br />';
+3 -3
View File
@@ -162,13 +162,13 @@ echo $OUTPUT->heading($instancename);
<div class="enroloptions">
<p><label for="roleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
<p><label for="menuroleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
<?php echo html_writer::select($roles, 'roleid', $roleid, false); ?></p>
<p><label for="extendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
<p><label for="menuextendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
<?php echo html_writer::select($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod); ?></p>
<p><label for="extendbase"><?php print_string('startingfrom') ?></label><br />
<p><label for="menuextendbase"><?php print_string('startingfrom') ?></label><br />
<?php echo html_writer::select($basemenu, 'extendbase', $extendbase, false); ?></p>
</div>
+3 -3
View File
@@ -275,12 +275,12 @@ function slasharguments($texexp, $md5) {
<html>
<head><title>Algebra Filter Debugger</title></head>
<body>
<p>Please enter an algebraic expression <b>without</b> any surrounding @@ into
the text box below. (Click <a href="#help">here for help.</a>)
<p><label for="algebra">Please enter an algebraic expression <b>without</b> any surrounding @@ into
the text box below. (Click <a href="#help">here for help.</a>)</label>
<form action="algebradebug.php" method="get"
target="inlineframe">
<center>
<input type="text" name="algebra" size="50"
<input type="text" id="algebra" name="algebra" size="50"
value="sin(z)/(x^2+y^2)" />
</center>
<ol>
+4 -1
View File
@@ -181,7 +181,10 @@ if (empty($availablefilters)) {
} else {
$activechoices[TEXTFILTER_INHERIT] = $strdefaultoff;
}
$row[] = html_writer::select($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false);
$filtername = str_replace('/', '_', $filter);
$select = html_writer::label($filterinfo->localstate, 'menu'. $filtername, false, array('class' => 'accesshide'));
$select .= html_writer::select($activechoices, $filtername, $filterinfo->localstate, false);
$row[] = $select;
// Settings link, if required
if ($settingscol) {
+1
View File
@@ -177,6 +177,7 @@ function get_grade_tree(&$gtree, $element, $current_itemid=null, $errors=null) {
$name .= '<div class="error"><span class="error">' . $errors[$grade_item->id].'</span><br />'."\n";
$closingdiv = "</div>\n";
}
$name .= '<label class="accesshide" for="id_idnumber_' . $grade_item->id . '">' . get_string('gradeitems', 'grades') .'</label>';
$name .= '<input class="idnumber" id="id_idnumber_'.$grade_item->id.'" type="text" name="idnumbers['.$grade_item->id.']" />' . "\n";
$name .= $closingdiv;
}
+1 -1
View File
@@ -343,8 +343,8 @@ if (!$moving) {
if (!$moving && count($grade_edit_tree->categories) > 1) {
echo '<br /><br />';
echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
echo get_string('moveselectedto', 'grades') . ' ';
$attributes = array('id'=>'menumoveafter');
echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter', false, array('class' => 'accesshide'));
echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes);
$OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter');
echo '<div id="noscriptgradetreeform" class="hiddenifjs">
+2 -1
View File
@@ -666,7 +666,8 @@ class grade_edit_tree_column_aggregation extends grade_edit_tree_column_category
} else {
$attributes = array();
$attributes['id'] = 'aggregation_'.$category->id;
$aggregation = html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
$aggregation = html_writer::label(get_string('aggregation', 'grades'), 'aggregation_'.$category->id, false, array('class' => 'accesshide'));
$aggregation .= html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
$action = new component_action('change', 'update_category_aggregation', array('courseid' => $params['id'], 'category' => $category->id, 'sesskey' => sesskey()));
$OUTPUT->add_action_handler($action, 'aggregation_'.$category->id);
}
+1 -1
View File
@@ -380,7 +380,7 @@ function print_grade_plugin_selector($plugin_info, $active_type, $active_plugin,
// finally print/return the popup form
if ($count > 1) {
$select = new url_select($menu, $active, null, 'choosepluginreport');
$select->set_label(get_accesshide(get_string('gradereport', 'grades')));
if ($return) {
return $OUTPUT->render($select);
} else {
+2 -1
View File
@@ -954,7 +954,8 @@ class grade_report_grader extends grade_report {
}
$itemcell->text .= '<input type="hidden" id="oldgrade_'.$userid.'_'.$item->id.'" name="oldgrade_'.$userid.'_'.$item->id.'" value="'.$oldval.'"/>';
$attributes = array('tabindex' => $tabindices[$item->id]['grade'], 'id'=>'grade_'.$userid.'_'.$item->id);
$itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);;
$itemcell->text .= html_writer::label(get_string('typescale', 'grades'), 'grade_'.$userid.'_'.$item->id, false, array('class' => 'accesshide'));
$itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);
} elseif(!empty($scale)) {
$scales = explode(",", $scale->scale);
+2
View File
@@ -1032,6 +1032,8 @@ $string['missingsummary'] = 'Missing summary';
$string['missingteacher'] = 'Must choose something';
$string['missingurl'] = 'Missing URL';
$string['missingusername'] = 'Missing username';
$string['month'] = 'Month';
$string['months'] = 'Months';
$string['modified'] = 'Modified';
$string['moduledeleteconfirm'] = 'You are about to completely delete the module \'{$a}\'. This will completely delete everything in the database associated with this activity module. Are you SURE you want to continue?';
$string['moduledeletefiles'] = 'All data associated with the module \'{$a->module}\' has been deleted from the database. To complete the deletion (and prevent the module re-installing itself), you should now delete this directory from your server: {$a->directory}';
+18 -6
View File
@@ -1768,7 +1768,7 @@ class admin_setting_configtext extends admin_setting {
return format_admin_setting($this, $this->visiblename,
'<div class="form-text defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" /></div>',
$this->description, true, '', $default, $query);
$this->description, true, '', $default, $query);
}
}
@@ -1973,7 +1973,7 @@ class admin_setting_configfile extends admin_setting_configtext {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
$this->description, true, '', $default, $query);
$this->description, true, '', $default, $query);
}
}
@@ -2007,7 +2007,7 @@ class admin_setting_configexecutable extends admin_setting_configfile {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
$this->description, true, '', $default, $query);
$this->description, true, '', $default, $query);
}
}
@@ -2041,7 +2041,7 @@ class admin_setting_configdirectory extends admin_setting_configfile {
return format_admin_setting($this, $this->visiblename,
'<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
$this->description, true, '', $default, $query);
$this->description, true, '', $default, $query);
}
}
@@ -2732,11 +2732,14 @@ class admin_setting_configtime extends admin_setting {
}
$return = '<div class="form-time defaultsnext">'.
'<label class="accesshide" for="' . $this->get_id() . '">' . get_string('hour') . '</label>' .
'<select id="'.$this->get_id().'h" name="'.$this->get_full_name().'[h]">';
for ($i = 0; $i < 24; $i++) {
$return .= '<option value="'.$i.'"'.($i == $data['h'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
$return .= '</select>:<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
$return .= '</select>:';
$return .= '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('minutes') . '</label>';
$return .= '<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
for ($i = 0; $i < 60; $i += 5) {
$return .= '<option value="'.$i.'"'.($i == $data['m'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
@@ -3149,6 +3152,7 @@ class admin_setting_courselist_frontpage extends admin_setting {
if (!array_key_exists($i, $currentsetting)) {
$currentsetting[$i] = 'none'; //none
}
$return .= '<label class="accesshide" for="' . $this->get_id().$i . '">' . get_string($this->name, 'admin') . '</label>';
$return .='<select class="form-select" id="'.$this->get_id().$i.'" name="'.$this->get_full_name().'[]">';
foreach ($this->choices as $key => $value) {
$return .= '<option value="'.$key.'"'.("$key" == $currentsetting[$i] ? ' selected="selected"' : '').'>'.$value.'</option>';
@@ -3420,8 +3424,10 @@ class admin_setting_emoticons extends admin_setting {
}
$out .= html_writer::tag('td',
html_writer::label($value, $this->get_full_name() . $field, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
'id' => $this->get_full_name() . $field,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'['.$field.']',
@@ -6515,7 +6521,7 @@ class admin_setting_managerepository extends admin_setting {
}
$select = new single_select($this->repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
$select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
// Display up/down link
$updown = '';
$spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -6552,6 +6558,7 @@ class admin_setting_managerepository extends admin_setting {
// Check that it has not already been listed
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select($this->repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
$select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
}
}
@@ -7665,6 +7672,7 @@ class admin_setting_configcolourpicker extends admin_setting {
$PAGE->requires->js_init_call('M.util.init_colour_picker', array($this->get_id(), $this->previewconfig));
$content = html_writer::start_tag('div', array('class'=>'form-colourpicker defaultsnext'));
$content .= html_writer::tag('div', $OUTPUT->pix_icon('i/loading', get_string('loading', 'admin'), 'moodle', array('class'=>'loadingicon')), array('class'=>'admin_colourpicker clearfix'));
$content .= html_writer::label($this->get_full_name(), $this->get_id(), false, array('class' => 'accesshide'));
$content .= html_writer::empty_tag('input', array('type'=>'text','id'=>$this->get_id(), 'name'=>$this->get_full_name(), 'value'=>$this->get_setting(), 'size'=>'12'));
if (!empty($this->previewconfig)) {
$content .= html_writer::empty_tag('input', array('type'=>'button','id'=>$this->get_id().'_preview', 'value'=>get_string('preview'), 'class'=>'admin_colourpicker_preview'));
@@ -7764,8 +7772,10 @@ class admin_setting_devicedetectregex extends admin_setting {
}
$out .= html_writer::tag('td',
html_writer::label($this->get_full_name(), $this->get_full_name() . 'expression' . $i, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
'id' => $this->get_full_name() . 'expression' . $i,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'[expression'.$i.']',
@@ -7783,8 +7793,10 @@ class admin_setting_devicedetectregex extends admin_setting {
}
$out .= html_writer::tag('td',
html_writer::label($this->get_full_name(), $this->get_full_name() . 'value' . $i, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
'id' => $this->get_full_name() . 'value' . $i,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'[value'.$i.']',
+3 -3
View File
@@ -3626,12 +3626,12 @@ function print_textfield($name, $value, $alt = '', $size=50, $maxlength=0, $retu
}
$style = "width: {$size}px;";
$attributes = array('type'=>'text', 'name'=>$name, 'alt'=>$alt, 'style'=>$style, 'value'=>$value);
$attributes = array('type' => 'text', 'id' => $name, 'name' => $name, 'alt' => $alt, 'style' => $style, 'value' => $value);
if ($maxlength) {
$attributes['maxlength'] = $maxlength;
}
$output = html_writer::empty_tag('input', $attributes);
$output = html_writer::label($name, $name, false, array('class' => 'accesshide'));
$output .= html_writer::empty_tag('input', $attributes);
if (empty($return)) {
echo $output;
+3 -2
View File
@@ -238,9 +238,10 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
$str .= '<div>';
if (count($formats)>1) {
$str.= html_writer::select($formats, $elname.'[format]', $format, false);
$str .= html_writer::label(get_string('format'), 'menu'. $elname. '[format]', false, array('class' => 'accesshide'));
$str .= html_writer::select($formats, $elname.'[format]', $format, false);
} else {
$str.= html_writer::empty_tag('input',
$str .= html_writer::empty_tag('input',
array('name'=>$elname.'[format]', 'type'=> 'hidden', 'value' => array_pop(array_keys($formats))));
}
$str .= '</div>';
+13 -1
View File
@@ -1198,6 +1198,12 @@ class core_renderer extends renderer_base {
if ($select->label) {
$output .= html_writer::label($select->label, $select->attributes['id']);
} else {
if (isset($select->nothing)) {
$label = $select->nothing;
$label = array_pop($label);
$output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
}
}
if ($select->helpicon instanceof help_icon) {
@@ -1205,7 +1211,6 @@ class core_renderer extends renderer_base {
} else if ($select->helpicon instanceof old_help_icon) {
$output .= $this->render($select->helpicon);
}
$output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes);
$go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go')));
@@ -1274,6 +1279,12 @@ class core_renderer extends renderer_base {
if ($select->label) {
$output .= html_writer::label($select->label, $select->attributes['id']);
} else {
if (isset($select->nothing)) {
$label = $select->nothing;
$label = array_pop($label);
$output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
}
}
if ($select->helpicon instanceof help_icon) {
@@ -1484,6 +1495,7 @@ class core_renderer extends renderer_base {
$scalearray = array(RATING_UNSET_RATING => $strrate.'...') + $rating->settings->scale->scaleitems;
$scaleattrs = array('class'=>'postratingmenu ratinginput','id'=>'menurating'.$rating->itemid);
$ratinghtml .= html_writer::label($rating->rating, 'menurating'.$rating->itemid, false, array('class' => 'accesshide'));
$ratinghtml .= html_writer::select($scalearray, 'rating', $rating->rating, false, $scaleattrs);
//output submit button
+2 -1
View File
@@ -443,7 +443,8 @@ function portfolio_instance_select($instances, $callerformats, $callbackclass, $
$pinsane = portfolio_plugin_sanity_check();
$count = 0;
$selectoutput = "\n" . '<select name="' . $selectname . '">' . "\n";
$selectoutput = "\n" . '<label class="accesshide" for="' . $selectname . '">' . get_string('plugin', 'portfolio') . '</label>';
$selectoutput .= "\n" . '<select id="' . $selectname . '" name="' . $selectname . '">' . "\n";
$existingexports = portfolio_existing_exports_by_plugin($USER->id);
foreach ($instances as $instance) {
$formats = portfolio_supported_formats_intersect($callerformats, $instance->supported_formats());
+1 -1
View File
@@ -1003,7 +1003,7 @@ function question_category_select_menu($contexts, $top = false, $currentcat = 0,
foreach ($categoriesarray as $group => $opts) {
$options[] = array($group => $opts);
}
echo html_writer::label($selected, 'menucategory', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'category', $selected, $choose);
}
+1
View File
@@ -929,6 +929,7 @@ class flexible_table {
$html = '<form action="'. $this->baseurl .'" method="post">';
$html .= '<div class="mdl-align">';
$html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';
$html .= html_writer::label($this->defaultdownloadformat, 'menudownload', false, array('class' => 'accesshide'));
$html .= html_writer::select($downloadoptions, 'download', $this->defaultdownloadformat, false);
$html .= '</div></form>';
+1
View File
@@ -2304,6 +2304,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret
for ($i=100; $i>=1; $i--) {
$grades[$i] = $i;
}
$output .= html_writer::label(get_string('gradeitems', 'grades'), 'menu' . $name, false, array('class' => 'accesshide'));
$output .= html_writer::select($grades, $name, $current, false);
$linkobject = '<span class="helplink"><img class="iconhelp" alt="'.$strscales.'" src="'.$OUTPUT->pix_url('help') . '" /></span>';
+4 -3
View File
@@ -507,9 +507,10 @@ function message_print_usergroup_selector($viewing, $courses, $coursecontexts, $
}
echo html_writer::start_tag('form', array('id' => 'usergroupform','method' => 'get','action' => ''));
echo html_writer::start_tag('fieldset');
echo html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()'));
echo html_writer::end_tag('fieldset');
echo html_writer::start_tag('fieldset');
echo html_writer::label(get_string('gotomessages', 'message'), 'viewing', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()'));
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
}
+6 -2
View File
@@ -1391,7 +1391,8 @@ class assignment_base {
} else if ($quickgrade) {
$attributes = array();
$attributes['tabindex'] = $tabindex++;
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
$menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'. $menu .'</div>';
} else {
$grade = '<div id="g'.$auser->id.'">'.$this->display_grade($auser->grade).'</div>';
@@ -1404,6 +1405,7 @@ class assignment_base {
} else if ($quickgrade) {
$attributes = array();
$attributes['tabindex'] = $tabindex++;
html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
} else {
@@ -1432,6 +1434,7 @@ class assignment_base {
} else if ($quickgrade) { // allow editing
$attributes = array();
$attributes['tabindex'] = $tabindex++;
html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
$hassubmission = true;
@@ -1476,7 +1479,7 @@ class assignment_base {
if ($uses_outcomes) {
foreach($grading_info->outcomes as $n=>$outcome) {
$outcomes .= '<div class="outcome"><label>'.$outcome->name.'</label>';
$outcomes .= '<div class="outcome"><label for="'. 'outcome_'.$n.'_'.$auser->id .'">'.$outcome->name.'</label>';
$options = make_grades_menu(-$outcome->scaleid);
if ($outcome->grades[$auser->id]->locked or !$quickgrade) {
@@ -1486,6 +1489,7 @@ class assignment_base {
$attributes = array();
$attributes['tabindex'] = $tabindex++;
$attributes['id'] = 'outcome_'.$n.'_'.$auser->id;
html_writer::label(get_string('assignment:grade', 'assignment'), 'outcome_'.$n.'_'.$auser->id, false, array('class' => 'accesshide'));
$outcomes .= ' '.html_writer::select($options, 'outcome_'.$n.'['.$auser->id.']', $outcome->grades[$auser->id]->grade, array(0=>get_string('nooutcome', 'grades')), $attributes);
}
$outcomes .= '</div>';
+1 -1
View File
@@ -76,7 +76,7 @@ echo $OUTPUT->box('', '', 'chat-options');
echo $OUTPUT->box('<ul id="messages-list"></ul>', '', 'chat-messages');
$table = new html_table();
$table->data = array(
array(' &raquo; <input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
array(' &raquo; <label class="accesshide" for="input-message">' . get_string('messages', 'chat') . ' </label><input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
);
echo $OUTPUT->box(html_writer::table($table), '', 'chat-input-area');
echo $OUTPUT->box('', '', 'chat-notify');
+1
View File
@@ -46,6 +46,7 @@ $PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo html_writer::start_tag('form', array('action'=>'../empty.php', 'method'=>'post', 'target'=>'empty', 'id'=>'inputForm', 'style'=>'margin:0'));
echo html_writer::label(get_string('messages', 'chat'), 'input_chat_message', false, array('class' => 'accesshide'));
echo html_writer::empty_tag('input', array('type'=>'text', 'id'=>'input_chat_message', 'name'=>'chat_message', 'size'=>'50', 'value'=>''));
echo html_writer::empty_tag('input', array('type'=>'checkbox', 'id'=>'auto', 'checked'=>'checked', 'value'=>''));
echo html_writer::tag('label', get_string('autoscroll', 'chat'), array('for'=>'auto'));
+1
View File
@@ -28,6 +28,7 @@ echo $OUTPUT->header();
<form action="../empty.php" method="get" target="empty" id="inputform"
onsubmit="return empty_field_and_submit();">
<label class="accesshide" for="chat_message"><?php get_string('modulename', 'chat'); ?> . ' ' .<?php strtolower(get_string('messages', 'chat')); ?> </label>
<input type="text" name="chat_message" id="chat_message" size="60" value="" />
<?php echo $OUTPUT->help_icon('usingchat', 'chat'); ?>
</form>
+1
View File
@@ -352,6 +352,7 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { ///
$options = array(0 => get_string('ascending', 'data'),
1 => get_string('descending', 'data'));
echo html_writer::label(get_string('sortby'), 'menudefaultsortdir', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'defaultsortdir', $data->defaultsortdir, false);
echo '<input type="submit" value="'.get_string('save', 'data').'" />';
echo '</div>';
+2 -1
View File
@@ -91,7 +91,8 @@ class data_field_file extends data_field_base {
}
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>' .
'<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function generate_sql($tablealias, $value) {
+1
View File
@@ -14,6 +14,7 @@
<?php
$course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
echo html_writer::label($this->field->param3, 'menuparam3', false, array('class' => 'accesshide'));
echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id' => 'param3'));
?>
</td>
+6 -2
View File
@@ -82,7 +82,9 @@ class data_field_latlong extends data_field_base {
}
$latlongsrs->close();
return html_writer::select($options, 'f_'.$this->field->id, $value);
$return = html_writer::label(get_string('latlong', 'data'), 'menuf_'.$this->field->id, false, array('class' => 'accesshide'));
$return .= html_writer::select($options, 'f_'.$this->field->id, $value);
return $return;
}
function parse_search_field() {
@@ -150,7 +152,9 @@ class data_field_latlong extends data_field_base {
. str_replace(array_keys($urlreplacements), array_values($urlreplacements), $this->linkoutservices[$servicesshown[0]])
."' title='$servicesshown[0]'>$compasslat, $compasslong</a>";
} elseif (sizeof($servicesshown)>1) {
$str .= "$compasslat, $compasslong\n<select name='jumpto'>";
$str .= "$compasslat, $compasslong\n";
$str .= "<label class='accesshide' for='jumpto'>". get_string('jumpto') ."</label>";
$str .= "<select id='jumpto' name='jumpto'>";
foreach($servicesshown as $servicename){
// Add a link to a service
$str .= "\n <option value='"
+4 -2
View File
@@ -46,7 +46,7 @@ class data_field_menu extends data_field_base {
}
}
$str .= html_writer::label(get_string('menuchoose', 'data'), 'field_'.$this->field->id, false, array('class' => 'accesshide'));
$str .= html_writer::select($options, 'field_'.$this->field->id, $content, array(''=>get_string('menuchoose', 'data')), array('id'=>'field_'.$this->field->id));
$str .= '</div>';
@@ -86,7 +86,9 @@ class data_field_menu extends data_field_base {
return '';
}
return html_writer::select($options, 'f_'.$this->field->id, $content);
$return = html_writer::label(get_string('namemenu', 'data'), 'menuf_'. $this->field->id, false, array('class' => 'accesshide'));
$return .= html_writer::select($options, 'f_'.$this->field->id, $content);
return $return;
}
function parse_search_field() {
+3 -1
View File
@@ -38,6 +38,7 @@ class data_field_multimenu extends data_field_base {
$str = '<div title="'.s($this->field->description).'">';
$str .= '<input name="field_' . $this->field->id . '[xxx]" type="hidden" value="xxx"/>'; // hidden field - needed for empty selection
$str .= '<label class="cell" for=field_"' . $this->field->id . '">' . $this->field->name. ': </label>';
$str .= '<select name="field_' . $this->field->id . '[]" id="field_' . $this->field->id . '" multiple="multiple">';
foreach (explode("\n",$this->field->param1) as $option) {
@@ -71,7 +72,8 @@ class data_field_multimenu extends data_field_base {
static $c = 0;
$str = '<select name="f_'.$this->field->id.'[]" multiple="multiple">';
$str = '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>';
$str .= '<select id="f_'.$this->field->id.'" name="f_'.$this->field->id.'[]" multiple="multiple">';
// display only used options
$varcharcontent = $DB->sql_compare_text('content', 255);
+2 -1
View File
@@ -70,7 +70,8 @@ class data_field_number extends data_field_base {
}
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
'<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
+2 -1
View File
@@ -118,7 +118,8 @@ class data_field_picture extends data_field_base {
}
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
'<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
+1
View File
@@ -46,6 +46,7 @@
<?php
$course->maxbytes = $DB->get_field('course', 'maxbytes', array('id'=>$this->data->course));
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
echo html_writer::label($this->field->param3, 'menuparam3', false, array('class' => 'accesshide'));
echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id'=>'param3'));
?>
</td>
+3 -1
View File
@@ -78,7 +78,9 @@ class data_field_radiobutton extends data_field_base {
$options[$rec->content] = $rec->content; //Build following indicies from the sql.
}
}
return html_writer::select($options, 'f_'.$this->field->id, $value);
$return = html_writer::label(get_string('nameradiobutton', 'data'), 'menuf_'. $this->field->id, false, array('class' => 'accesshide'));
$return .= html_writer::select($options, 'f_'.$this->field->id, $value);
return $return;
}
function parse_search_field() {
+1 -1
View File
@@ -27,7 +27,7 @@ class data_field_text extends data_field_base {
var $type = 'text';
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for=f_"' . $this->field->id . '">'. $this->field->name.'</label>' . '<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
+4 -2
View File
@@ -126,7 +126,8 @@ class data_field_textarea extends data_field_base {
$editor->use_editor($field, $options, $fpoptions);
$str .= '<input type="hidden" name="'.$field.'_itemid" value="'.$draftitemid.'" />';
$str .= '<div><textarea id="'.$field.'" name="'.$field.'" rows="'.$this->field->param3.'" cols="'.$this->field->param2.'">'.s($text).'</textarea></div>';
$str .= '<div><select name="'.$field.'_content1">';
$str .= '<div><label class="accesshide" for="' . $field . '_content1">' . get_string('format') . '</label>';
$str .= '<select id="' . $field . '_content1" name="'.$field.'_content1">';
foreach ($formats as $key=>$desc) {
$selected = ($format == $key) ? 'selected="selected"' : '';
$str .= '<option value="'.s($key).'" '.$selected.'>'.$desc.'</option>';
@@ -140,7 +141,8 @@ class data_field_textarea extends data_field_base {
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for=f_"' . $this->field->id . '">' . $this->field->name . '</label>' .
'<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
+6 -2
View File
@@ -52,11 +52,14 @@ class data_field_url extends data_field_base {
$str = '<div title="'.s($this->field->description).'">';
if (!empty($this->field->param1) and empty($this->field->param2)) {
$str .= '<table><tr><td align="right">';
$str .= get_string('url','data').':</td><td><input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.$url.'" size="60" /></td></tr>';
$str .= get_string('url','data').':</td><td>';
$str .= '<label class="accesshide" for="' . $fieldid . '">'. $this->field->name .'</label>';
$str .= '<input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.$url.'" size="60" /></td></tr>';
$str .= '<tr><td align="right">'.get_string('text','data').':</td><td><input type="text" name="field_'.$this->field->id.'_1" id="field_'.$this->field->id.'_1" value="'.s($text).'" size="60" /></td></tr>';
$str .= '</table>';
} else {
// Just the URL field
$str .= '<label class="accesshide" for="' . $fieldid . '">'. $this->field->name .'</label>';
$str .= '<input type="text" name="field_'.$this->field->id.'_0" id="'.$fieldid.'" value="'.s($url).'" size="60" />';
}
@@ -74,7 +77,8 @@ class data_field_url extends data_field_base {
}
function display_search_field($value = '') {
return '<input type="text" size="16" name="f_'.$this->field->id.'" value="'.$value.'" />';
return '<label class="accesshide" for="f_'.$this->field->id.'">' . get_string('fieldname', 'data') . '</label>' .
'<input type="text" size="16" id="f_'.$this->field->id.'" name="f_'.$this->field->id.'" value="'.$value.'" />';
}
function parse_search_field() {
+4 -4
View File
@@ -136,9 +136,9 @@ if ($courseitemfilter > 0) {
echo '<tr><td>'.get_string('noresults').'</td></tr>';
}
} else {
echo get_string('search_course', 'feedback') . ': ';
echo '<input type="text" name="searchcourse" value="'.s($searchcourse).'"/> <input type="submit" value="'.get_string('search').'"/>';
echo html_writer::label(get_string('search_course', 'feedback') . ': ', 'searchcourse');
echo '<input id="searchcourse" type="text" name="searchcourse" value="'.s($searchcourse).'"/> ';
echo '<input type="submit" value="'.get_string('search').'"/>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="id" value="'.$id.'" />';
echo '<input type="hidden" name="courseitemfilter" value="'.$courseitemfilter.'" />';
@@ -157,7 +157,7 @@ if ($courseitemfilter > 0) {
if ($courses = $DB->get_records_sql_menu($sql, $params)) {
echo ' ' . get_string('filter_by_course', 'feedback') . ': ';
echo html_writer::label(get_string('filter_by_course', 'feedback'), 'coursefilterid');
echo html_writer::select($courses, 'coursefilter', $coursefilter, null, array('id'=>'coursefilterid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('analysis-form', 'coursefilterid', false));
}
+2 -1
View File
@@ -660,7 +660,8 @@ class feedback_item_multichoice extends feedback_item_base {
?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
<select name="<?php echo $item->typ .'_' . $item->id;?>" size="1">
<label class="accesshide" for="<?php echo $item->typ .'_' . $item->id;?>"><?php echo $item->name; ?></label>
<select id="<?php echo $item->typ .'_' . $item->id;?>" name="<?php echo $item->typ .'_' . $item->id;?>[]" size="1">
<option value="0">&nbsp;</option>
<?php
$index = 1;
+2 -1
View File
@@ -503,7 +503,8 @@ class feedback_item_multichoicerated extends feedback_item_base {
echo '<ul>';
?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
<select name="<?php echo $item->typ.'_'.$item->id;?>">
<label for="<?php echo $item->typ.'_'.$item->id;?>"><?php echo $item->name; ?></label>
<select id="<?php echo $item->typ.'_'.$item->id;?>" name="<?php echo $item->typ.'_'.$item->id;?>">
<option value="0">&nbsp;</option>
<?php
$index = 1;
+1 -1
View File
@@ -91,7 +91,7 @@ $sql = "select c.id, c.shortname
$params = array("%{$searchcourse}%", "%{$searchcourse}%");
if (($courses = $DB->get_records_sql_menu($sql, $params)) && !empty($searchcourse)) {
echo ' ' . get_string('courses') . ': ';
echo html_writer::label(get_string('courses'), 'menucoursefilter', false);
echo html_writer::select($courses, 'coursefilter', $coursefilter);
echo '<input type="submit" value="'.get_string('mapcourse', 'feedback').'"/>';
echo $OUTPUT->help_icon('mapcourses', 'feedback');
+1
View File
@@ -252,6 +252,7 @@
print_string('formathtml');
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
echo '<label for="menuformat" class="accesshide">'. get_string('format') .'</label>';
choose_from_menu(format_text_menu(), "format", $format, "");
}
echo '<br /><div class="buttons">';
+2
View File
@@ -3791,9 +3791,11 @@ function forum_print_mode_form($id, $mode, $forumtype='') {
global $OUTPUT;
if ($forumtype == 'single') {
$select = new single_select(new moodle_url("/mod/forum/view.php", array('f'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_accesshide(get_string('displaymode', 'forum')));
$select->class = "forummode";
} else {
$select = new single_select(new moodle_url("/mod/forum/discuss.php", array('d'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_accesshide(get_string('displaymode', 'forum')));
}
echo $OUTPUT->render($select);
}
+12 -2
View File
@@ -343,10 +343,15 @@ function forum_print_big_search_form($course) {
}
echo '<input name="timefromrestrict" type="checkbox" value="1" alt="'.get_string('searchdatefrom', 'forum').'" onclick="return lockoptions(\'searchform\', \'timefromrestrict\', timefromitems)" '. $datefromchecked . ' /> ';
$selectors = html_writer::select_time('days', 'fromday', $datefrom)
$selectors = html_writer::label(get_string('days'), 'menufromday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'fromday', $datefrom)
. html_writer::label(get_string('month'), 'menufrommonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'frommonth', $datefrom)
. html_writer::label(get_string('year'), 'menufromyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'fromyear', $datefrom)
. html_writer::label(get_string('hour'), 'menufromhour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'fromhour', $datefrom)
. html_writer::label(get_string('minutes'), 'menufromminute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'fromminute', $datefrom);
echo $selectors;
echo '<input type="hidden" name="hfromday" value="0" />';
@@ -369,10 +374,15 @@ function forum_print_big_search_form($course) {
}
echo '<input name="timetorestrict" type="checkbox" value="1" alt="'.get_string('searchdateto', 'forum').'" onclick="return lockoptions(\'searchform\', \'timetorestrict\', timetoitems)" ' .$datetochecked. ' /> ';
$selectors = html_writer::select_time('days', 'fromday', $dateto)
$selectors = html_writer::label(get_string('days'), 'menufromday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'fromday', $dateto)
. html_writer::label(get_string('month'), 'menufrommonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'frommonth', $dateto)
. html_writer::label(get_string('year'), 'menufromyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'fromyear', $dateto)
. html_writer::label(get_string('hour'), 'menufromhour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'fromhour', $dateto)
. html_writer::label(get_string('minutes'), 'menufromminute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'fromminute', $dateto);
echo $selectors;
+4 -4
View File
@@ -7,15 +7,15 @@
<div>
<table class="generalbox" cellpadding="5">
<tr valign="top">
<td align="right"><?php echo get_string("name") ?>:</td>
<td align="right"><label for="name"><?php echo get_string("name") ?>:</label></td>
<td>
<input type="text" name="name" size="30" value="<?php p($name) ?>" />
<input type="text" name="name" id="name" size="30" value="<?php p($name) ?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><?php echo get_string("linkcategory","glossary") ?>:</td>
<td align="right"><label for="usedynalink"><?php echo get_string("linkcategory","glossary") ?>:</label></td>
<td>
<select size="1" name="usedynalink">
<select size="1" id="usedynalink" name="usedynalink">
<option value="1" <?php
if ( $usedynalink ) {
echo "selected=\"selected\"";
+11 -11
View File
@@ -69,7 +69,7 @@ echo '<table width="90%" align="center" class="generalbox">';
</strong></td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string('popupformat','glossary'); ?></td>
<td align="right" width="20%"><?php echo html_writer::label(get_string('popupformat','glossary'), 'menupopupformatname'); ?></td>
<td>
<?php
//get and update available formats
@@ -92,9 +92,9 @@ echo '<table width="90%" align="center" class="generalbox">';
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string('defaultmode','glossary'); ?></td>
<td align="right" width="20%"><label for="defaultmode"><?php print_string('defaultmode','glossary'); ?></label></td>
<td>
<select size="1" name="defaultmode">
<select size="1" id="defaultmode" name="defaultmode">
<?php
$sletter = '';
$scat = '';
@@ -129,9 +129,9 @@ echo '<table width="90%" align="center" class="generalbox">';
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string('defaulthook','glossary'); ?></td>
<td align="right" width="20%"><label for="defaulthook"><?php print_string('defaulthook','glossary'); ?></label></td>
<td>
<select size="1" name="defaulthook">
<select size="1" id="defaulthook" name="defaulthook">
<?php
$sall = '';
$sspecial = '';
@@ -166,9 +166,9 @@ echo '<table width="90%" align="center" class="generalbox">';
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string('defaultsortkey','glossary'); ?></td>
<td align="right" width="20%"><label for="sortkey"><?php print_string('defaultsortkey','glossary'); ?></label></td>
<td>
<select size="1" name="sortkey">
<select size="1" id="sortkey" name="sortkey">
<?php
$sfname = '';
$slname = '';
@@ -203,9 +203,9 @@ echo '<table width="90%" align="center" class="generalbox">';
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string('defaultsortorder','glossary'); ?></td>
<td align="right" width="20%"><label for="sortorder"><?php print_string('defaultsortorder','glossary'); ?></label></td>
<td>
<select size="1" name="sortorder">
<select size="1" id="sortorder" name="sortorder">
<?php
$sasc = '';
$sdesc = '';
@@ -228,9 +228,9 @@ echo '<table width="90%" align="center" class="generalbox">';
</td>
</tr>
<tr valign="top">
<td align="right" width="20%"><?php print_string("includegroupbreaks", "glossary"); ?>:</td>
<td align="right" width="20%"><label for="showgroup"><?php print_string("includegroupbreaks", "glossary"); ?>:</label></td>
<td>
<select size="1" name="showgroup">
<select size="1" id="showgroup" name="showgroup">
<?php
$yselected = "";
$nselected = "";
+4 -2
View File
@@ -1049,7 +1049,7 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',
foreach ($aliases as $alias) {
if (trim($alias->alias)) {
if ($return == '') {
$return = '<select style="font-size:8pt">';
$return = '<select id="keyword" style="font-size:8pt">';
}
$return .= "<option>$alias->alias</option>";
}
@@ -1205,7 +1205,8 @@ function glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $m
echo '<table>';
if ( $aliases ) {
echo '<tr valign="top"><td class="aliases">' .
get_string('aliases','glossary').': '.$aliases . '</td></tr>';
'<label for="keyword">' . get_string('aliases','glossary').': </label>' .
$aliases . '</td></tr>';
}
if ($icons) {
echo '<tr valign="top"><td class="icons">'.$icons.'</td></tr>';
@@ -1763,6 +1764,7 @@ function glossary_print_categories_menu($cm, $glossary, $hook, $category) {
echo '<td align="center" style="width:20%">';
$select = new single_select(new moodle_url("/mod/glossary/view.php", array('id'=>$cm->id, 'mode'=>'cat')), 'hook', $menu, $selected, null, "catmenu");
$select->set_label(get_accesshide(get_string('categories', 'glossary')));
echo $OUTPUT->render($select);
echo '</td>';
+6 -3
View File
@@ -400,16 +400,19 @@ class lesson_page_type_matching extends lesson_page {
$answerdata->score = get_string("didnotreceivecredit", "lesson");
}
} elseif ($n > 1) {
$data = "<select disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->answer))."</option></select>";
$data = '<label class="accesshide" for="answer_' . $n . '">' . get_string('answer', 'lesson') . '</label>';
$data .= "<select id=\"answer_". $n ."\" disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->answer))."</option></select>";
if ($useranswer != NULL) {
$userresponse = explode(",", $useranswer->useranswer);
$data .= "<select disabled=\"disabled\"><option selected=\"selected\">";
$data .= '<label class="accesshide" for="stu_answer_response_' . $n . '">' . get_string('matchesanswer', 'lesson') . '</label>';
$data .= "<select id=\"stu_answer_response_" . $n . "\" disabled=\"disabled\"><option selected=\"selected\">";
if (array_key_exists($i, $userresponse)) {
$data .= strip_tags(format_string($answers[$userresponse[$i]]->response));
}
$data .= "</option></select>";
} else {
$data .= "<select disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->response))."</option></select>";
$data .= '<label class="accesshide" for="answer_response_' . $n . '">' . get_string('matchesanswer', 'lesson') . '</label>';
$data .= "<select id=\"answer_response_" . $n . "\" disabled=\"disabled\"><option selected=\"selected\">".strip_tags(format_string($answer->response))."</option></select>";
}
if ($n == 2) {
+1
View File
@@ -314,6 +314,7 @@ if ($action === 'delete') {
if (has_capability('mod/lesson:edit', $context)) {
$checklinks = '<a href="javascript: checkall();">'.get_string('selectall').'</a> / ';
$checklinks .= '<a href="javascript: checknone();">'.get_string('deselectall').'</a>';
$checklinks .= html_writer::label('action', 'menuaction', false, array('class' => 'accesshide'));
$checklinks .= html_writer::select(array('delete' => get_string('deleteselected')), 'action', 0, array(''=>'choosedots'), array('id'=>'actionid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('theform', 'actionid', ''));
echo $OUTPUT->box($checklinks, 'center');
+7 -2
View File
@@ -403,9 +403,11 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
get_string('areyousureremoveselected', 'quiz') . '\');" value="' .
get_string('removeselected', 'quiz') . '" ' . $disabled . ' /></div>';
$a = '<input name="moveselectedonpagetop" type="text" size="2" ' .
$a = '<label class="accesshide" for="moveselectedonpagetop">' . get_string('moveup') . '</label>';
$a .= '<input name="moveselectedonpagetop" id="moveselectedonpagetop" type="text" size="2" ' .
$pagingdisabled . ' />';
$b = '<input name="moveselectedonpagebottom" type="text" size="2" ' .
$b = '<label class="accesshide" for="moveselectedonpagebottom">' . get_string('movedown') . '</label>';
$b .='<input name="moveselectedonpagebottom" id="moveselectedonpagebottom" type="text" size="2" ' .
$pagingdisabled . ' />';
$reordercontrols2top = '<div class="moveselectedonpage">' .
@@ -602,6 +604,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
<?php echo html_writer::input_hidden_params($pageurl); ?>
<input type="hidden" name="savechanges" value="save" />
<?php
echo '<label class="accesshide" for="inputq' . $question->id .'">' . get_string('question', 'quiz') . '</label>';
echo '<input type="text" name="g' . $question->id .
'" id="inputq' . $question->id .
'" size="' . ($quiz->decimalpoints + 2) .
@@ -628,7 +631,9 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
?>
<div class="qorder">
<?php
echo '<label class="accesshide" for="o' . $question->id . '">' . get_string('reorderquestions', 'quiz') . '</label>';
echo '<input type="text" name="o' . $question->id .
'" id="o' . $question->id . '"' .
'" size="2" value="' . (10*$count + 10) .
'" tabindex="' . ($lastindex + $qno) . '" />';
?>
+2 -1
View File
@@ -973,7 +973,8 @@ class quiz_statistics_report extends quiz_default_report {
$output .= '<input type="hidden" name="everything" value="1"/>';
$output .= '<input type="submit" value="' .
get_string('downloadeverything', 'quiz_statistics') . '"/>';
$output .= html_writer::select($downloadoptions, 'download',
$output .= html_writer('action', 'menudownload', false, array('class' => 'accesshide'));
$output .= html_writer::select($this->table->defaultdownloadformat, 'download',
$this->table->defaultdownloadformat, false);
$output .= '</div></form>';
+2 -1
View File
@@ -1483,7 +1483,8 @@ function scorm_get_toc($user,$scorm,$cmid,$toclink=TOCJSLINK,$currentorg='',$sco
}
$url = new moodle_url('/mod/scorm/player.php?a='.$scorm->id.'&currentorg='.$currentorg.$modestr);
$result->tocmenu = $OUTPUT->single_select($url, 'scoid', $tocmenus, $sco->id, null, "tocmenu");
$toclabel = array('' => get_accesshide(get_string('organization', 'scorm')));
$result->tocmenu = $OUTPUT->single_select($url, 'scoid', $tocmenus, $sco->id, $toclabel, "tocmenu");
return $result;
}
+2 -1
View File
@@ -120,7 +120,8 @@ class MoodleQuickForm_wikieditor extends MoodleQuickForm_textarea {
$html .= html_writer::empty_tag('img', array('alt' => $button[1], 'src' => $CFG->wwwroot . '/mod/wiki/editors/wiki/images/' . $button[0]));
$html .= "</a>";
}
$html .= "<select onchange=\"insertTags('{$imagetag[0]}', '{$imagetag[1]}', this.value)\">";
$html .= "<label class='accesshide' for='addtags'>" . get_string('add') . ' ' . get_string('tags') . "</label>";
$html .= "<select id='addtags' onchange=\"insertTags('{$imagetag[0]}', '{$imagetag[1]}', this.value)\">";
$html .= "<option value='" . s(get_string('wikiimage', 'wiki')) . "'>" . get_string('insertimage', 'wiki') . '</option>';
foreach ($this->files as $filename) {
$html .= "<option value='".s($filename)."'>";
+6 -3
View File
@@ -346,7 +346,8 @@ class mod_wiki_renderer extends plugin_renderer_base {
$baseurl->params($params);
$name = 'uid';
$selected = $subwiki->userid;
echo $this->output->single_select($baseurl, $name, $options, $selected);
$label = get_accesshide(get_string('user'));
echo $this->output->single_select($baseurl, $name, $options, $selected, $label);
echo $this->output->container_end();
}
return;
@@ -403,7 +404,8 @@ class mod_wiki_renderer extends plugin_renderer_base {
$baseurl->params($params);
$name = 'groupanduser';
$selected = $subwiki->groupid . '-' . $subwiki->userid;
echo $this->output->single_select($baseurl, $name, $options, $selected);
$label = get_accesshide(get_string('group'));
echo $this->output->single_select($baseurl, $name, $options, $selected, $label);
echo $this->output->container_end();
return;
@@ -449,7 +451,8 @@ class mod_wiki_renderer extends plugin_renderer_base {
$baseurl->params($params);
$name = 'groupanduser';
$selected = $subwiki->groupid . '-' . $subwiki->userid;
echo $this->output->single_select($baseurl, $name, $options, $selected);
$label = get_accesshide(get_string('user'));
echo $this->output->single_select($baseurl, $name, $options, $selected, $label);
echo $this->output->container_end();
return;
+1
View File
@@ -94,6 +94,7 @@ abstract class qbehaviour_renderer extends plugin_renderer_base {
'name' => $inputname . 'format', 'value' => key($formats)));
} else {
$commenteditor .= html_writer::label($commentformat, 'menu' . $inputname, false, array('class' => 'accesshide'));
$commenteditor .= html_writer::select(
$formats, $inputname . 'format', $commentformat, '');
}
+2 -1
View File
@@ -114,7 +114,8 @@ class qformat_xhtml extends qformat_default {
shuffle( $ans_list ); // random display order
// build drop down for answers
$dropdown = "<select name=\"quest_$id\">\n";
$dropdown = '<label class="accesshide" for="quest_' . $id . '">' . get_string('options', 'question') . '</label>';
$dropdown .= "<select name=\"quest_$id\">\n";
foreach($ans_list as $ans) {
$dropdown .= "<option value=\"" . s($ans) . "\">" . s($ans) . "</option>\n";
}
+8 -4
View File
@@ -753,11 +753,13 @@ class qtype_calculated extends question_type {
? 'decimals'
: 'significantfigures'), 'qtype_calculated', $i);
}
$menu1 = html_writer::select($lengthoptions, 'calclength[]', $regs[4], null);
$menu1 = html_writer::label($regs[4], 'menucalclength', false, array('class' => 'accesshide'));
$menu1 .= html_writer::select($lengthoptions, 'calclength[]', $regs[4], null);
$options = array('uniform' => get_string('uniformbit', 'qtype_calculated'),
'loguniform' => get_string('loguniformbit', 'qtype_calculated'));
$menu2 = html_writer::select($options, 'calcdistribution[]', $regs[1], null);
$menu2 = html_writer::label($regs[1], 'menucalcdistribution', false, array('class' => 'accesshide'));
$menu2 .= html_writer::select($options, 'calcdistribution[]', $regs[1], null);
return '<input type="submit" onclick="'
. "getElementById('addform').regenerateddefid.value='$defid'; return true;"
.'" value="'. get_string('generatevalue', 'qtype_calculated') . '"/><br/>'
@@ -1197,7 +1199,8 @@ class qtype_calculated extends question_type {
list($options, $selected) =
$this->dataset_options($form, $datasetname);
unset($options['0']); // Mandatory...
$datasetmenus[$datasetname] = html_writer::select(
$datasetmenus[$datasetname] = html_writer::label($selected, 'menudataset', false , array('class' => 'accesshide'));
$datasetmenus[$datasetname] .= html_writer::select(
$options, 'dataset[]', $selected, null);
}
}
@@ -1205,7 +1208,8 @@ class qtype_calculated extends question_type {
if (!isset($datasetmenus[$datasetname])) {
list($options, $selected) =
$this->dataset_options($form, $datasetname);
$datasetmenus[$datasetname] = html_writer::select(
$datasetmenus[$datasetname] = html_writer::label($selected, 'menudataset', false , array('class' => 'accesshide'));
$datasetmenus[$datasetname] .= html_writer::select(
$options, 'dataset[]', $selected, null);
}
}
+1
View File
@@ -223,6 +223,7 @@ class qtype_essay_format_editor_renderer extends plugin_renderer_base {
'name' => $inputname . 'format', 'value' => key($formats)));
} else {
$output .= html_writer::label($responseformat, 'menu' . $inputname . 'format');
$output .= html_writer::select($formats, $inputname . 'format', $responseformat, '');
}
$output .= html_writer::end_tag('div');
+1
View File
@@ -80,6 +80,7 @@ class qtype_match_renderer extends qtype_with_combined_feedback_renderer {
}
$result .= html_writer::tag('td',
html_writer::label($selected, 'menu' . $qa->get_qt_field_name('sub' . $key), false, array('class' => 'accesshide')) .
html_writer::select($choices, $qa->get_qt_field_name('sub' . $key), $selected,
array('0' => 'choose'), array('disabled' => $options->readonly)) .
' ' . $feedbackimage, array('class' => $classes));
+3 -3
View File
@@ -223,7 +223,7 @@ class qtype_multianswer_textfield_renderer extends qtype_multianswer_subq_render
s($correctanswer->answer), $options);
$output = '';
$output .= html_writer::start_tag('label', array('class' => 'subq'));
$output .= html_writer::start_tag('label', array('class' => 'subq', 'for' => $inputattributes['id']));
$output .= html_writer::empty_tag('input', $inputattributes);
$output .= $feedbackimg;
$output .= $feedbackpopup;
@@ -274,8 +274,8 @@ class qtype_multianswer_multichoice_inline_renderer
$inputattributes['class'] = $this->feedback_class($matchinganswer->fraction);
$feedbackimg = $this->feedback_image($matchinganswer->fraction);
}
$select = html_writer::select($choices, $qa->get_qt_field_name($fieldname),
$selecg = html_writer::label($response, $inputattributes['id']);
$select .= html_writer::select($choices, $qa->get_qt_field_name($fieldname),
$response, array('' => ''), $inputattributes);
$order = $subq->get_order($qa);
+4 -2
View File
@@ -76,7 +76,8 @@ class qtype_numerical_renderer extends qtype_renderer {
$inputattributes['size'] = round(strlen($placeholder) * 1.1);
}
$input = html_writer::empty_tag('input', $inputattributes) . $feedbackimg;
$input = html_writer::label($inputattributes['name'], $inputattributes['id']);
$input .= html_writer::empty_tag('input', $inputattributes) . $feedbackimg;
if ($question->has_separate_unit_field()) {
if ($question->unitdisplay == qtype_numerical::UNITRADIO) {
@@ -98,7 +99,8 @@ class qtype_numerical_renderer extends qtype_renderer {
array('class' => 'unitchoices'));
} else if ($question->unitdisplay == qtype_numerical::UNITSELECT) {
$unitchoice = html_writer::select($question->ap->get_unit_options(),
$unitchoice = html_writer::label($selectedunit, 'menu' . $qa->get_qt_field_name('unit'));
$unitchoice .= html_writer::select($question->ap->get_unit_options(),
$qa->get_qt_field_name('unit'), $selectedunit, array(''=>'choosedots'),
array('disabled' => $options->readonly));
}
+2 -2
View File
@@ -71,8 +71,8 @@ class qtype_shortanswer_renderer extends qtype_renderer {
$placeholder = $matches[0];
$inputattributes['size'] = round(strlen($placeholder) * 1.1);
}
$input = html_writer::empty_tag('input', $inputattributes) . $feedbackimg;
$input = html_writer::label($inputattributes['name'], $inputattributes['id']);
$input .= html_writer::empty_tag('input', $inputattributes) . $feedbackimg;
if ($placeholder) {
$questiontext = substr_replace($questiontext, $input,
+1 -1
View File
@@ -217,7 +217,7 @@ class repository_alfresco extends repository {
public function print_search() {
$str = parent::print_search();
$str .= '<label>Space: </label><br /><select name="space">';
$str .= '<label for="space">Space: </label><br /><select id="space" name="space">';
foreach ($this->user_session->stores as $v) {
$str .= '<option ';
if ($v->__toString() === 'workspace://SpacesStore') {
+3 -1
View File
@@ -111,6 +111,7 @@ case 'renameform':
$home_url->param('draftpath', $draftpath);
$home_url->param('action', 'rename');
echo ' <form method="post" action="'.$home_url->out().'">';
echo ' <label class="accesshide" for="newfilename">' . get_string('enternewname', 'repository') . '</label>';
echo ' <input name="newfilename" type="text" value="'.s($filename).'" />';
echo ' <input name="filename" type="hidden" value="'.s($filename).'" />';
echo ' <input name="draftpath" type="hidden" value="'.s($draftpath).'" />';
@@ -227,7 +228,8 @@ case 'mkdirform':
$home_url->param('draftpath', $draftpath);
$home_url->param('action', 'mkdir');
echo ' <form method="post" action="'.$home_url->out().'">';
echo ' <input name="newdirname" type="text" />';
echo ' <label class="accesshide" for="newdirname">' . get_string('entername', 'repository') . '</label>';
echo ' <input name="newdirname" id="newdirname" type="text" />';
echo ' <input name="draftpath" type="hidden" value="'.s($draftpath).'" />';
echo ' <input type="submit" value="'.s(get_string('makeafolder', 'moodle')).'" />';
echo ' </form>';
+2 -2
View File
@@ -305,8 +305,8 @@ case 'confirm':
echo '<form method="post">';
echo '<table>';
echo ' <tr>';
echo ' <td><label>'.get_string('filename', 'repository').'</label></td>';
echo ' <td><input type="text" name="filename" value="'.s($filename).'" /></td>';
echo ' <td><label for="filename">'.get_string('filename', 'repository').'</label></td>';
echo ' <td><input type="text" id="filename" name="filename" value="'.s($filename).'" /></td>';
echo ' <td><input type="hidden" name="fileurl" value="'.s($fileurl).'" /></td>';
echo ' <td><input type="hidden" name="action" value="download" /></td>';
echo ' <td><input type="hidden" name="itemid" value="'.s($itemid).'" /></td>';
+7 -4
View File
@@ -141,11 +141,12 @@ echo $OUTPUT->header();
<div class="coursetag_edit_centered">
<div class="coursetag_edit_row">
<div class="coursetag_edit_left">
$edittagthisunit
<label for="coursetag_new_tag">$edittagthisunit</label>
</div>
<div class="coursetag_edit_right">
<div class="coursetag_form_input1">
<input type="text" name="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
<label clas="accesshide" for="coursetag_sug_keyword">$edittagthisunit</label>
<input type="text" name="coursetag_sug_keyword" id="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
</div>
<div class="coursetag_form_input2">
<input type="text" name="coursetag_new_tag" id="coursetag_new_tag" class="coursetag_form_input2a"
@@ -164,10 +165,12 @@ EOT;
$outstr .= <<<EOT1
<div class="coursetag_edit_row">
<div class="coursetag_edit_left">
$editdeletemytag
<label for="del_tag">
$editdeletemytag
</label>
</div>
<div class="coursetag_edit_right">
<select name="del_tag">
<select id="del_tag" name="del_tag">
$selectoptions
</select>
</div>
+5 -2
View File
@@ -260,8 +260,10 @@ if ($tagrecords = $DB->get_records_sql($query, $params, $table->get_page_start()
$flag = $tag->flag;
$timemodified = format_time(time() - $tag->timemodified);
$checkbox = '<input type="checkbox" name="tagschecked[]" value="'.$tag->id.'" />';
$text = '<input type="text" name="newname['.$tag->id.']" />';
$tagtype = html_writer::select($existing_tagtypes, 'tagtypes['.$tag->id.']', $tag->tagtype, false);
$text = html_writer::label(get_string('newname', 'tag'), 'newname_' . $tag->id, false, array('class' => 'accesshide'));
$text .= '<input type="text" id="newname_' . $tag->id. '" name="newname['.$tag->id.']" />';
$tagtype = html_writer::label(get_string('tagtype', 'tag'), 'menutagtypes'. $tag->id, false, array('class' => 'accesshide'));
$tagtype .= html_writer::select($existing_tagtypes, 'tagtypes['.$tag->id.']', $tag->tagtype, false);
//if the tag if flagged, highlight it
if ($tag->flag > 0) {
@@ -283,6 +285,7 @@ if ($tagrecords = $DB->get_records_sql($query, $params, $table->get_page_start()
echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" /> ';
echo '<br/><br/>';
echo html_writer::label(get_string('withselectedtags', 'tag'), 'menuformaction', false, array('class' => 'accesshide'));
echo '<select id="menuformaction" name="action">
<option value="" selected="selected">'. get_string('withselectedtags', 'tag') .'</option>
<option value="reset">'. get_string('resetflag', 'tag') .'</option>
+5 -4
View File
@@ -46,7 +46,8 @@ require_capability('moodle/notes:manage', $context);
if (empty($CFG->enablenotes)) {
print_error('notesdisabled', 'notes');
}
$testusers = $users;
$users = '';
if (!empty($users) && confirm_sesskey()) {
if (count($users) != count($contents) || count($users) != count($states)) {
print_error('invalidformdata', '', $CFG->wwwroot.'/user/index.php?id='.$id);
@@ -79,7 +80,7 @@ $PAGE->set_title("$course->shortname: ".get_string('extendenrol'));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$users = $testusers;
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
echo $OUTPUT->heading($straddnote);
@@ -104,12 +105,12 @@ if (empty($users)) {
}
}
}
foreach ($users as $k => $v) {
if(!$user = $DB->get_record('user', array('id'=>$v))) {
continue;
}
$checkbox = html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false);
$checkbox = html_writer::label('menustates[' . $k . ']', 'menustates', false, array('class' => 'accesshide'));
$checkbox .= html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false);
$table->data[] = array(
'<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true),
'<textarea name="contents['. $k . ']" rows="2" cols="40">' . strip_tags(@$contents[$k]) . '</textarea>',
+1
View File
@@ -119,6 +119,7 @@ echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content
echo '<p>';
echo get_string('publishstate', 'notes');
echo $OUTPUT->help_icon('publishstate', 'notes');
echo html_writer::label(get_string('state'), 'menustate', false, array('class' => 'accesshide'));
echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false);
echo '</p>';
+2 -1
View File
@@ -788,7 +788,8 @@
if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) {
echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
echo '<input type="text" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
echo '<label class="accesshide" for="search">' . get_string('search', 'search') . '</label>';
echo '<input type="text" id="search" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
}
$perpageurl = clone($baseurl);
+1 -1
View File
@@ -14,7 +14,7 @@
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("formattexttype"); ?>:</b></td>
<td align="right"><label for="menuformat"><b><?php print_string("formattexttype"); ?>:</b></label></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while