Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
aa414527
Commit
aa414527
authored
Jul 27, 2012
by
Rossiani Wijaya
Committed by
Aparup Banerjee
Jul 31, 2012
Browse files
MDL-34552 accessibility compliance for admin: Add forform input text and select tag
parent
e462de97
Changes
11
Hide whitespace changes
Inline
Side-by-side
admin/filters.php
View file @
aa414527
...
...
@@ -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_string
(
'isactive'
,
'filters'
),
array
(
'class'
=>
'accesshide'
));
$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_string
(
'applyto'
,
'filters'
),
array
(
'class'
=>
'accesshide'
));
$select
->
disabled
=
$filterinfo
->
active
==
TEXTFILTER_DISABLED
;
$row
[]
=
$OUTPUT
->
render
(
$select
);
...
...
admin/mnet/access_control.php
View file @
aa414527
...
...
@@ -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'
)
.
":
\n
"
;
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'
)
.
":
\n
"
;
if
(
!
empty
(
$formerror
[
'accessctrl'
]))
{
echo
'<span class="error"> * </span>'
;
}
...
...
admin/portfolio.php
View file @
aa414527
...
...
@@ -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_string
(
'action'
),
array
(
'class'
=>
'accesshide'
));
$table
->
data
[]
=
array
(
$pluginname
,
$OUTPUT
->
render
(
$select
),
$settings
);
}
if
(
!
in_array
(
$plugin
,
$usedplugins
))
{
...
...
@@ -218,6 +219,7 @@ if (($action == 'edit') || ($action == 'new')) {
$insaneplugins
[]
=
$p
;
}
else
{
$select
=
new
single_select
(
portfolio_action_url
(
$p
,
'pf'
),
'action'
,
$actionchoicesfornew
,
'delete'
,
null
,
'applyto'
.
$p
);
$select
->
set_label
(
get_string
(
'action'
),
array
(
'class'
=>
'accesshide'
));
$table
->
data
[]
=
array
(
portfolio_static_function
(
$p
,
'get_name'
),
$OUTPUT
->
render
(
$select
),
''
);
}
}
...
...
admin/repository.php
View file @
aa414527
...
...
@@ -352,7 +352,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_string
(
'action'
),
array
(
'class'
=>
'accesshide'
));
// Display up/down link
$updown
=
''
;
$spacer
=
$OUTPUT
->
spacer
(
array
(
'height'
=>
15
,
'width'
=>
15
));
// should be done with CSS instead
...
...
@@ -389,6 +389,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_string
(
'action'
),
array
(
'class'
=>
'accesshide'
));
$table
->
data
[]
=
array
(
get_string
(
'pluginname'
,
'repository_'
.
$plugin
),
$OUTPUT
->
render
(
$select
),
''
,
''
);
}
}
...
...
admin/timezone.php
View file @
aa414527
...
...
@@ -44,7 +44,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
)
.
'" />'
;
...
...
admin/tool/langimport/index.php
View file @
aa414527
...
...
@@ -287,7 +287,7 @@ $url = new moodle_url('/admin/tool/langimport/index.php', array('mode' => DELETI
echo
html_writer
::
start_tag
(
'td'
,
array
(
'valign'
=>
'top'
));
echo
html_writer
::
start_tag
(
'form'
,
array
(
'id'
=>
'uninstallform'
,
'action'
=>
$url
->
out
(),
'method'
=>
'post'
));
echo
html_writer
::
start_tag
(
'fieldset'
);
echo
html_writer
::
label
(
get_string
(
'installedlangs'
,
'tool_langimport'
),
'uninstalllang'
);
echo
html_writer
::
label
(
get_string
(
'installedlangs'
,
'tool_langimport'
),
'
menu
uninstalllang'
);
echo
html_writer
::
empty_tag
(
'br'
);
echo
html_writer
::
select
(
$installedlangs
,
'uninstalllang'
,
''
,
false
,
array
(
'size'
=>
15
));
echo
html_writer
::
empty_tag
(
'input'
,
array
(
'type'
=>
'hidden'
,
'name'
=>
'sesskey'
,
'value'
=>
sesskey
()));
...
...
@@ -315,7 +315,7 @@ if (!empty($options)) {
$url
=
new
moodle_url
(
'/admin/tool/langimport/index.php'
,
array
(
'mode'
=>
INSTALLATION_OF_SELECTED_LANG
));
echo
html_writer
::
start_tag
(
'form'
,
array
(
'id'
=>
'installform'
,
'action'
=>
$url
->
out
(),
'method'
=>
'post'
));
echo
html_writer
::
start_tag
(
'fieldset'
);
echo
html_writer
::
label
(
get_string
(
'availablelangs'
,
'install'
),
'pack'
);
echo
html_writer
::
label
(
get_string
(
'availablelangs'
,
'install'
),
'
menu
pack'
);
echo
html_writer
::
empty_tag
(
'br'
);
echo
html_writer
::
select
(
$options
,
'pack[]'
,
''
,
false
,
array
(
'size'
=>
15
,
'multiple'
=>
'multiple'
));
echo
html_writer
::
empty_tag
(
'input'
,
array
(
'type'
=>
'hidden'
,
'name'
=>
'sesskey'
,
'value'
=>
sesskey
()));
...
...
admin/tool/spamcleaner/index.php
View file @
aa414527
...
...
@@ -96,6 +96,7 @@ echo $OUTPUT->box_start(); // The forms section at the top
<form
method=
"post"
action=
"index.php"
>
<div>
<label
class=
"accesshide"
for=
"keyword_el"
>
<?php
print_string
(
'spamkeyword'
,
'tool_spamcleaner'
)
?>
</label>
<input
type=
"text"
name=
"keyword"
id=
"keyword_el"
value=
"
<?php
p
(
$keyword
)
?>
"
/>
<input
type=
"hidden"
name=
"sesskey"
value=
"
<?php
echo
sesskey
();
?>
"
/>
<input
type=
"submit"
value=
"
<?php
echo
get_string
(
'spamsearch'
,
'tool_spamcleaner'
)
?>
"
/>
...
...
admin/tool/spamcleaner/lang/en/tool_spamcleaner.php
View file @
aa414527
...
...
@@ -38,6 +38,7 @@ $string['spamfromcomments'] = 'From comments:';
$string
[
'spamfrommessages'
]
=
'From messages:'
;
$string
[
'spamfromforumpost'
]
=
'From forum post:'
;
$string
[
'spaminvalidresult'
]
=
'Unknown but invalid result'
;
$string
[
'spamkeyword'
]
=
'Keyword'
;
$string
[
'spamoperation'
]
=
'Operation'
;
$string
[
'spamresult'
]
=
'Results of searching user profiles containing:'
;
$string
[
'spamsearch'
]
=
'Search for these keywords'
;
admin/tool/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
View file @
aa414527
...
...
@@ -113,7 +113,7 @@ class new_table_from_mysql extends XMLDBAction {
$o
.
=
' <input type="hidden" name ="postaction" value="edit_table" />'
;
$o
.
=
' <input type="hidden" name ="sesskey" value="'
.
sesskey
()
.
'" />'
;
$o
.
=
' <table id="formelements" class="boxaligncenter" cellpadding="5">'
;
$o
.
=
' <tr><td><label for="table" accesskey="t">'
.
$this
->
str
[
'createtable'
]
.
' </label>'
.
html_writer
::
select
(
$selecttables
,
'table'
)
.
'<label for="after" accesskey="a">'
.
$this
->
str
[
'aftertable'
]
.
' </label>'
.
html_writer
::
select
(
$aftertables
,
'after'
)
.
'</td></tr>'
;
$o
.
=
' <tr><td><label for="
menu
table" accesskey="t">'
.
$this
->
str
[
'createtable'
]
.
' </label>'
.
html_writer
::
select
(
$selecttables
,
'table'
)
.
'<label for="
menu
after" accesskey="a">'
.
$this
->
str
[
'aftertable'
]
.
' </label>'
.
html_writer
::
select
(
$aftertables
,
'after'
)
.
'</td></tr>'
;
$o
.
=
' <tr><td colspan="2" align="center"><input type="submit" value="'
.
$this
->
str
[
'create'
]
.
'" /></td></tr>'
;
$o
.
=
' <tr><td colspan="2" align="center"><a href="index.php?action=edit_xml_file&dir='
.
urlencode
(
str_replace
(
$CFG
->
dirroot
,
''
,
$dirpath
))
.
'">['
.
$this
->
str
[
'back'
]
.
']</a></td></tr>'
;
$o
.
=
' </table>'
;
...
...
admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
View file @
aa414527
...
...
@@ -114,7 +114,7 @@ class view_structure_php extends XMLDBAction {
$o
.
=
' <input type="hidden" name ="dir" value="'
.
str_replace
(
$CFG
->
dirroot
,
''
,
$dirpath
)
.
'" />'
;
$o
.
=
' <input type="hidden" name ="action" value="view_structure_php" />'
;
$o
.
=
' <table id="formelements" class="boxaligncenter" cellpadding="5">'
;
$o
.
=
' <tr><td><label for="
action
" accesskey="c">'
.
$this
->
str
[
'selectaction'
]
.
' </label>'
.
html_writer
::
select
(
$popcommands
,
'command'
,
$commandparam
,
false
)
.
' <label for="table" accesskey="t">'
.
$this
->
str
[
'selecttable'
]
.
' </label>'
.
html_writer
::
select
(
$poptables
,
'table'
,
$tableparam
,
false
)
.
'</td></tr>'
;
$o
.
=
' <tr><td><label for="
menucommand
" accesskey="c">'
.
$this
->
str
[
'selectaction'
]
.
' </label>'
.
html_writer
::
select
(
$popcommands
,
'command'
,
$commandparam
,
false
)
.
' <label for="
menu
table" accesskey="t">'
.
$this
->
str
[
'selecttable'
]
.
' </label>'
.
html_writer
::
select
(
$poptables
,
'table'
,
$tableparam
,
false
)
.
'</td></tr>'
;
$o
.
=
' <tr><td colspan="2" align="center"><input type="submit" value="'
.
$this
->
str
[
'view'
]
.
'" /></td></tr>'
;
$o
.
=
' </table>'
;
$o
.
=
'</div></form>'
;
...
...
admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
View file @
aa414527
...
...
@@ -163,7 +163,7 @@ class view_table_php extends XMLDBAction {
$o
.
=
' <input type="hidden" name ="table" value="'
.
s
(
$tableparam
)
.
'" />'
;
$o
.
=
' <input type="hidden" name ="action" value="view_table_php" />'
;
$o
.
=
' <table id="formelements" class="boxaligncenter" cellpadding="5">'
;
$o
.
=
' <tr><td><label for="
action
" accesskey="c">'
.
$this
->
str
[
'selectaction'
]
.
' </label>'
.
html_writer
::
select
(
$popcommands
,
'command'
,
$commandparam
,
false
)
.
' <label for="fieldkeyindex" accesskey="f">'
.
$this
->
str
[
'selectfieldkeyindex'
]
.
' </label>'
.
html_writer
::
select
(
$popfields
,
'fieldkeyindex'
,
$origfieldkeyindexparam
,
false
)
.
'</td></tr>'
;
$o
.
=
' <tr><td><label for="
menucommand
" accesskey="c">'
.
$this
->
str
[
'selectaction'
]
.
' </label>'
.
html_writer
::
select
(
$popcommands
,
'command'
,
$commandparam
,
false
)
.
' <label for="
menu
fieldkeyindex" accesskey="f">'
.
$this
->
str
[
'selectfieldkeyindex'
]
.
' </label>'
.
html_writer
::
select
(
$popfields
,
'fieldkeyindex'
,
$origfieldkeyindexparam
,
false
)
.
'</td></tr>'
;
$o
.
=
' <tr><td colspan="2" align="center"><input type="submit" value="'
.
$this
->
str
[
'view'
]
.
'" /></td></tr>'
;
$o
.
=
' </table>'
;
$o
.
=
'</div></form>'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment