Diff for /loncom/interface/slotrequest.pm between versions 1.109 and 1.110

version 1.109, 2010/10/31 15:32:10 version 1.110, 2011/01/03 18:04:56
Line 641  sub get_slot { Line 641  sub get_slot {
    <input type="hidden" name="releaseslot" value="$slot_name" />     <input type="hidden" name="releaseslot" value="$slot_name" />
    <input type="hidden" name="command" value="change" />     <input type="hidden" name="command" value="change" />
 STUFF  STUFF
             $r->print('<p class="LC_error">'.&mt('Reservation currently unchanged').'</p>'.              $r->print('<p class="LC_error">'.&mt('Reservation currently unchanged').'</p>');
                       '<p class="LC_warning">');  
             if ($slot_name ne '') {              if ($slot_name ne '') {
                 $r->print(&mt('To complete the transaction you [_1]must[_2] confirm you want the change to [_3] to be processed.'                  $r->print('<p>'.&mt('To complete the transaction you [_1]must confirm[_2] you want to [_3]process the change[_4] to [_5].'
                          ,'<b>','</b>','<b>'.$description2.'</b>').'<br />'                           ,'<b>','</b>','<i>','</i>','<b>'.$description2.'</b>')
                          .'<input type="submit" name="change" value="'.&mt('Process change').'" /></p>'                            .'<br />'
                          .&mt('or').'<br /><p>'.&mt('you will continue with the reservation you already had: [_1]'                           .&mt('Or you can choose to [_1]make no change[_2] and continue[_2] with the reservation you already had: [_3].'
                          ,'<b>'.$description1.'</b>').'</p>');                           ,'<i>','</i>','<b>'.$description1.'</b>')
                            .'</p><p><span class="LC_nobreak">'
                            .'<input type="submit" name="change" value="'.&mt('Process the change').'" />' 
                            .('&nbsp;'x3)
                            .'<input type="submit" name="nochange" value="'.&mt('Make no change').'" />'
                            .'</span></p>');
             }              }
     &return_link($r);  
     $r->print(<<STUFF);      $r->print(<<STUFF);
 </form>  </form>
 STUFF  STUFF
Line 2163  sub slot_change_messaging { Line 2166  sub slot_change_messaging {
             $msgtitle = &mt('Status of messages about saved reservation');              $msgtitle = &mt('Status of messages about saved reservation');
         } elsif ($action eq 'release') {          } elsif ($action eq 'release') {
             $msgtitle = &mt('Status of messages about dropped reservation');              $msgtitle = &mt('Status of messages about dropped reservation');
           } elsif ($action eq 'nochange') {
               $msgtitle = &mt('Status of messages about unchanged existing reservation');
         }          }
         return '<span class="LC_info">'.$msgtitle.'</span>'          return '<span class="LC_info">'.$msgtitle.'</span>'
                .'<ul>'                 .'<ul>'
Line 2625  sub handler { Line 2630  sub handler {
  } elsif ($env{'form.command'} eq 'get') {   } elsif ($env{'form.command'} eq 'get') {
     &get_slot($r,$symb);      &get_slot($r,$symb);
  } elsif ($env{'form.command'} eq 'change') {   } elsif ($env{'form.command'} eq 'change') {
     if (&get_slot($r,$symb,$env{'form.releaseslot'},1)) {              if ($env{'form.nochange'}) {
                   my $slot_name = $env{'form.releaseslot'};
                   my @slots = &check_for_reservation($symb,'allslots');
                   my $msg;
                   if (($slot_name ne '') && (grep(/^\Q$slot_name\E/,@slots))) { 
                        my %slot=&Apache::lonnet::get_slot($env{'form.releaseslot'});
                        my $description=&get_description($slot_name,\%slot);
                        $msg = '<span style="font-weight: bold;">'.
                               &mt('Unchanged reservation: [_1]',$description).'</span><br /><br />';
                        my $person = 
                            &Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'});
                        my $subject = &mt('Reservation unchanged: [_1]',$description);
                        my $msgbody = &mt('No change to existing registration by [_1] for [_2].',$person,$description);
                        $msg .= &slot_change_messaging($slot{'reservationmsg'},$subject,$msgbody,'nochange');
                   } else {
                       $msg = '<span class="LC_warning">'.&mt('Reservation no longer reported as available.').'</span>';
                   }
                   $r->print($msg);
                   &return_link($r);
       } elsif (&get_slot($r,$symb,$env{'form.releaseslot'},1)) {
  &release_slot($r,$symb,$env{'form.releaseslot'});   &release_slot($r,$symb,$env{'form.releaseslot'});
     }      }
  } else {   } else {

Removed from v.1.109  
changed lines
  Added in v.1.110


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>