version 1.358.2.15, 2019/07/27 00:38:33
|
version 1.358.2.17.2.2, 2020/09/02 00:48:18
|
Line 1693 sub show_return_link {
|
Line 1693 sub show_return_link {
|
(($env{'request.noversionuri'}=~/^\/adm\//) && |
(($env{'request.noversionuri'}=~/^\/adm\//) && |
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && |
($env{'request.noversionuri'}!~ |
($env{'request.noversionuri'}!~ |
m{^/adm/.*/(smppg|bulletinboard)($|\?)}) |
m{^/adm/.*/(smppg|bulletinboard|ext\.tool)($|\?)}) |
)); |
)); |
} |
} |
|
|
Line 2539 sub course_custom_roles {
|
Line 2539 sub course_custom_roles {
|
|
|
|
|
sub resource_info_box { |
sub resource_info_box { |
my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)=@_; |
my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp,$divforres)=@_; |
my $return=''; |
my $return=''; |
if ($stuvcurrent ne '') { |
if (($stuvcurrent ne '') || ($divforres)) { |
$return = '<div class="LC_left_float">'; |
$return = '<div class="LC_left_float">'; |
} |
} |
if ($symb) { |
if ($symb) { |
Line 2570 sub resource_info_box {
|
Line 2570 sub resource_info_box {
|
} else { |
} else { |
$return='<p><span class="LC_error">'.&mt('No context provided.').'</span></p>'; |
$return='<p><span class="LC_error">'.&mt('No context provided.').'</span></p>'; |
} |
} |
if ($stuvcurrent ne '') { |
if (($stuvcurrent ne '') || ($divforres)) { |
$return .= '</div>'; |
$return .= '</div>'; |
} |
} |
return $return; |
return $return; |
Line 3415 ENDUTILITY
|
Line 3415 ENDUTILITY
|
|
|
sub jump_to_editres { |
sub jump_to_editres { |
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath, |
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath, |
$title,$idx,$suppurl,$todocs,$suppanchor) = @_; |
$title,$hostname,$idx,$suppurl,$todocs,$suppanchor) = @_; |
my ($jscall,$anchor,$usehttp,$usehttps,$is_ext); |
my ($jscall,$anchor,$usehttp,$usehttps,$is_ext); |
if ($switchserver) { |
if ($switchserver) { |
if ($home) { |
if ($home) { |
Line 3528 sub jump_to_editres {
|
Line 3528 sub jump_to_editres {
|
# javascript_valid_email |
# javascript_valid_email |
# |
# |
# Generates javascript to validate an e-mail address. |
# Generates javascript to validate an e-mail address. |
# Returns a javascript function which accetps a form field as argumnent, and |
# Returns a javascript function which accepts a form field as argument, and |
# returns false if field.value does not satisfy two regular expression matches |
# returns false if field.value does not satisfy two regular expression matches |
# for a valid e-mail address. Backwards compatible with old browsers without |
# for a valid e-mail address. Backwards compatible with old browsers without |
# support for javascript RegExp (just checks for @ in field.value in this case). |
# support for javascript RegExp (just checks for @ in field.value in this case). |
|
|
sub javascript_valid_email { |
sub javascript_valid_email { |
my $scripttag .= <<'END'; |
my $scripttag .= <<'END'; |
function validmail(field) { |
function validmail(field,suffix) { |
var str = field.value; |
var str = field.value; |
|
if (suffix != '' && suffix != undefined) { |
|
str += suffix; |
|
} |
if (window.RegExp) { |
if (window.RegExp) { |
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"; |
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"; |
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //" |
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //" |