[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm
raeburn
raeburn at source.lon-capa.org
Tue Feb 1 13:23:24 EST 2022
raeburn Tue Feb 1 18:23:24 2022 EDT
Modified files:
/loncom/interface courseprefs.pm
Log:
- Add autocomplete="off" attribute to form elements for Link Protection.
- Disable elements used to add new entry if no editing privilege.
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.97 loncom/interface/courseprefs.pm:1.98
--- loncom/interface/courseprefs.pm:1.97 Sun Jan 16 16:52:42 2022
+++ loncom/interface/courseprefs.pm Tue Feb 1 18:23:24 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.97 2022/01/16 16:52:42 raeburn Exp $
+# $Id: courseprefs.pm,v 1.98 2022/02/01 18:23:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5305,7 +5305,7 @@
'<label><input type="checkbox" name="linkprot_del" value="'.$i.'"'.$disabled.' />'.
&mt('Delete?').'</label></span></td>'.
'<td><span class="LC_nobreak">'.$lt{'name'}.
- ':<input type="text" size="15" name="linkprot_name_'.$i.'" value="'.$values{'name'}.'"'.$disabled.' /></span> '.
+ ':<input type="text" size="15" name="linkprot_name_'.$i.'" value="'.$values{'name'}.'" autocomplete="off"'.$disabled.' /></span> '.
(' 'x2).
'<span class="LC_nobreak">'.$lt{'version'}.':<select name="linkprot_version_'.$i.'">'.
'<option value="LTI-1p0" '.$selected.'>1.1</option></select></span> '."\n".
@@ -5314,11 +5314,11 @@
'value="'.$values{'lifetime'}.'" size="3"'.$disabled.' /></span>'.
'<br /><br />'.
'<span class="LC_nobreak">'.$lt{'key'}.
- ':<input type="text" size="25" name="linkprot_key_'.$i.'" value="'.$values{'key'}.'"'.$disabled.' /></span> '.
+ ':<input type="text" size="25" name="linkprot_key_'.$i.'" value="'.$values{'key'}.'" autocomplete="off"'.$disabled.' /></span> '.
(' 'x2).
'<span class="LC_nobreak">'.$lt{'secret'}.':'.
- '<input type="password" size="20" name="linkprot_secret_'.$i.'" value="'.$values{'secret'}.'"'.$disabled.' />'.
- '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.linkprot_secret_'.$i.'.type='."'text'".' } else { this.form.linkprot_secret_'.$i.'.type='."'password'".' }" />'.&mt('Visible input').'</label>'.
+ '<input type="password" size="20" name="linkprot_secret_'.$i.'" value="'.$values{'secret'}.'" autocomplete="off"'.$disabled.' />'.
+ '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.linkprot_secret_'.$i.'.type='."'text'".' } else { this.form.linkprot_secret_'.$i.'.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label>'.
'<input type="hidden" name="linkprot_id_'.$i.'" value="'.$num.'" /></span>'.
'</td></tr>';
$itemcount ++;
@@ -5328,20 +5328,20 @@
$css_class = $itemcount%2?' class="LC_odd_row"':'';
$datatable .= '<tr '.$css_class.'><td><span class="LC_nobreak">'."\n".
'<input type="hidden" name="linkprot_maxnum" value="'.$next.'" />'."\n".
- '<input type="checkbox" name="linkprot_add" value="1" />'.&mt('Add').'</span></td>'."\n".
+ '<input type="checkbox" name="linkprot_add" value="1"'.$disabled.' />'.&mt('Add').'</span></td>'."\n".
'<td>'.
'<span class="LC_nobreak">'.$lt{'name'}.
- ':<input type="text" size="15" name="linkprot_name_add" value="" /></span> '."\n".
+ ':<input type="text" size="15" name="linkprot_name_add" value="" autocomplete="off"'.$disabled.' /></span> '."\n".
(' 'x2).
- '<span class="LC_nobreak">'.$lt{'version'}.':<select name="linkprot_version_add">'.
+ '<span class="LC_nobreak">'.$lt{'version'}.':<select name="linkprot_version_add"'.$disabled.'>'.
'<option value="LTI-1p0" selected="selected">1.1</option></select></span> '."\n".
(' 'x2).
- '<span class="LC_nobreak">'.$lt{'lifetime'}.':<input type="text" size="3" name="linkprot_lifetime_add" value="300" /></span> '."\n".
+ '<span class="LC_nobreak">'.$lt{'lifetime'}.':<input type="text" size="3" name="linkprot_lifetime_add" value="300"'.$disabled.' /></span> '."\n".
'<br /><br />'.
- '<span class="LC_nobreak">'.$lt{'key'}.':<input type="text" size="25" name="linkprot_key_add" value="" /></span> '."\n".
+ '<span class="LC_nobreak">'.$lt{'key'}.':<input type="text" size="25" name="linkprot_key_add" value="" autocomplete="off"'.$disabled.' /></span> '."\n".
(' 'x2).
- '<span class="LC_nobreak">'.$lt{'secret'}.':<input type="password" size="20" name="linkprot_secret_add" value="" />'.
- '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.linkprot_secret_add.type='."'text'".' } else { this.form.linkprot_secret_add.type='."'password'".' }" />'.&mt('Visible input').'</label></span> '."\n".
+ '<span class="LC_nobreak">'.$lt{'secret'}.':<input type="password" size="20" name="linkprot_secret_add" value="" autocomplete="off"'.$disabled.' />'.
+ '<label><input type="checkbox" name="visible" onclick="if (this.checked) { this.form.linkprot_secret_add.type='."'text'".' } else { this.form.linkprot_secret_add.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label></span> '."\n".
'</td></tr>';
$$rowtotal ++;
return $datatable;;
More information about the LON-CAPA-cvs
mailing list