--- loncom/interface/lonconfigsettings.pm 2011/12/08 22:10:18 1.21 +++ loncom/interface/lonconfigsettings.pm 2013/04/08 23:21:15 1.24 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.21 2011/12/08 22:10:18 www Exp $ +# $Id: lonconfigsettings.pm,v 1.24 2013/04/08 23:21:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,7 +39,7 @@ use Apache::lonparmset(); sub print_header { my ($r,$phase,$context,$jscript,$container) = @_; - my ($pagetitle,$brcrumtitle,$action,$call_category_check); + my ($pagetitle,$brcrumtitle,$action,$call_category_check,$crstype); if ($context eq 'domain') { ($pagetitle, $brcrumtitle) = ('View/Modify Domain Settings','View/Modify Domain Settings'); $action = '/adm/domainprefs'; @@ -56,7 +56,8 @@ sub print_header { } } } else { - if (&Apache::loncommon::course_type() eq 'Community') { + $crstype = &Apache::loncommon::course_type(); + if ($crstype eq 'Community') { ($pagetitle,$brcrumtitle) = ('Community Configuration','Community Configuration'); } else { ($pagetitle,$brcrumtitle) = ('Course Configuration','Course Configuration'); @@ -94,9 +95,11 @@ function changePage(formname,newphase) { formname.submit(); }'."\n"; if ($phase eq 'pickactions') { + $js .= &Apache::lonhtmlcommon::color_picker(); $js .= &Apache::lonhtmlcommon::set_form_elements({actions => 'checkbox'})."\n"; } elsif ($phase eq 'display') { + $js .= &Apache::lonhtmlcommon::color_picker(); $js .= &color_pick_js()."\n"; } $js .= &Apache::loncommon::viewport_size_js().' @@ -128,7 +131,7 @@ $jscript '); if ($container) { - &Apache::lonparmset::startSettingsScreen($r,$container); + &Apache::lonparmset::startSettingsScreen($r,$container,$crstype); } $r->print('
'); @@ -151,7 +154,9 @@ sub print_footer { } my $dest='"javascript:changePage(document.'.$phase.','."'$newphase'".')"'; if ($phase eq 'process') { - $r->print('

'.$button_text.'

'); + $r->print( + &Apache::lonhtmlcommon::actionbox( + [''.$button_text.''])); } else { my $onclick; if ($phase eq 'display') {