Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.200 and 1.203

version 1.200, 2023/09/15 22:32:46 version 1.203, 2025/03/03 21:42:46
Line 229  function folder_choice(targetform,caller Line 229  function folder_choice(targetform,caller
 <form method="post" action="/adm/email" name="folderlist">  <form method="post" action="/adm/email" name="folderlist">
    <div class="LC_columnSection"><fieldset>     <div class="LC_columnSection"><fieldset>
    <legend>'.&mt('Folder Actions').'</legend>     <legend>'.&mt('Folder Actions').'</legend>
    <table border="0" cellspacing="2" cellpadding="8">     <div class="LC_columnSection">
     <tr>       <div class="LC_mail_actions"><label><b>'.$html_lt{'fold'}.'</b><br />'."\n".
      <td><b>'.$html_lt{'fold'}.'</b><br />'."\n".           &Apache::loncommon::select_form($folder,'folder',\%formhash).'</label>
          &Apache::loncommon::select_form($folder,'folder',\%formhash).'       </div>
      </td>       <div class="LC_mail_actions"><label><b>'.$html_lt{'show'}.'</b><br />'."\n".
      <td><b>'.$html_lt{'show'}.'</b><br />'."\n".  
          &Apache::loncommon::select_form($env{'form.interdis'},'interdis',           &Apache::loncommon::select_form($env{'form.interdis'},'interdis',
  \%show).'   \%show).'</label>
      </td>       </div>
      <td><b>'.$html_lt{'status'}.'</b><br />'."\n".       <div class="LC_mail_actions"><label><b>'.$html_lt{'status'}.'</b><br />'."\n".
        &Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'         &Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'</label>
      </td>       </div>
      <td style="padding-right: 40px;">       <div class="LC_mail_actions" style="padding-right: 1em">
          <b>'.$html_lt{'actn'}.'</b><br />'."\n".'           <label><b>'.$html_lt{'actn'}.'</b><br />'."\n".'
          <span class="LC_nobreak">'.           <span class="LC_nobreak">'.
          &Apache::loncommon::select_form('view','folderaction',\%actions).           &Apache::loncommon::select_form('view','folderaction',\%actions).'</label>'.
          ' <input type="button" value="'.$html_lt{'go'}.           ' <input type="button" value="'.$html_lt{'go'}.
          '" onclick="javascript:folder_choice(this.form,'."'change'".');" />           '" onclick="javascript:folder_choice(this.form,'."'change'".');" />
          </span>           </span>
      </td>       </div>
      <td style="border-left: 1px solid;padding-left: 40px;">       <div class="LC_vertical_line" style="padding: 0; height: 4em; margin: 0">
          <b>'.&mt('New Folder').'</b><br />'."\n".'       </div>
        <div class="LC_mail_actions" style="padding-left: 3em">
          <span class="LC_nobreak">           <span class="LC_nobreak">
          <input type="text" size="15" name="newfolder" value="" />           <label><b>'.&mt('New Folder').'</b><br />'."\n".'
            <input type="text" size="15" name="newfolder" value="" /></label>
          <input type="button" value="'.$html_lt{'go'}.           <input type="button" value="'.$html_lt{'go'}.
          '" onclick="javascript:folder_choice(this.form,'."'new'".');" />           '" onclick="javascript:folder_choice(this.form,'."'new'".');" />
          </span>           </span>
      </td>       </div>
     </tr>  
    </table>  
    </fieldset></div>     </fieldset></div>
 '."\n".  '."\n".
     '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'.      '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'.
     '<input type="hidden" name="renamed" value="" />'.      '<input type="hidden" name="renamed" value="" />';
         ($folder=~/^critical/?'</form>':'');  
     return $output;      return $output;
 }  }
   
Line 301  sub scrollbuttons { Line 299  sub scrollbuttons {
     } else {      } else {
         $status = $statushash{$msgstatus};          $status = $statushash{$msgstatus};
     }      }
     my $output = '<b>'.&mt('Page:').'</b> ';      my $output;
     if ($maxdis == 1) {      if ($maxdis == 1) {
         # No buttons if only one page is displayed          # No buttons if only one page is displayed
         $output .= '1/1';          $output = '<b>'.&mt('Page:').'</b> 1/1'; 
     } else {      } else {
         $output .=          $output = '<b><label for="startdis">'.&mt('Page:').'</label></b> '.
            '<input type="submit" name="firstview" value="|&lt;" />'.             '<input type="submit" name="firstview" value="|&lt;" />'.
            '<input type="submit" name="prevview" value="&lt;" />'.             '<input type="submit" name="prevview" value="&lt;" />'.
            ' <input type="text" size="5" name="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '.             ' <input type="text" size="5" name="startdis" id="startdis" value="'.$start.'" onchange="this.form.submit()" /> / '.$maxdis.' '.
            '<input type="submit" name="nextview" value="&gt;" />'.             '<input type="submit" name="nextview" value="&gt;" />'.
            '<input type="submit" name="lastview" value="&gt;|" />';             '<input type="submit" name="lastview" value="&gt;|" />';
     }      }
Line 806  sub groupmail_header { Line 804  sub groupmail_header {
     $groupheader .= &Apache::lonhtmlcommon::breadcrumbs(      $groupheader .= &Apache::lonhtmlcommon::breadcrumbs(
                                     &mt('Group messages - [_1]',$description),                                      &mt('Group messages - [_1]',$description),
                                                         undef,undef,undef,undef,1);                                                          undef,undef,undef,undef,1);
     return $groupheader;      return $groupheader.'<div class="LC_landmark" role="main">';
 }  }
   
 sub groupmail_sent {  sub groupmail_sent {
Line 1135  ENDDISHEADER Line 1133  ENDDISHEADER
             $r->print(&blocked_in_folder($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom,              $r->print(&blocked_in_folder($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom,
                                          \%setters));                                           \%setters));
         }          }
           $r->print('</form>');
         return;          return;
     }      }
     my $interdis = $env{'form.interdis'};      my $interdis = $env{'form.interdis'};
Line 1152  ENDDISHEADER Line 1151  ENDDISHEADER
     $r->print('<form method="post" name="disall" action="/adm/email">'.      $r->print('<form method="post" name="disall" action="/adm/email">'.
       &Apache::loncommon::start_data_table().        &Apache::loncommon::start_data_table().
           &Apache::loncommon::start_data_table_row().            &Apache::loncommon::start_data_table_row().
           '<th colspan="1">&nbsp;</th><th>');            '<th colspan="1">#</th><th>');
     if ($env{'form.sortedby'} eq "revdate") {      if ($env{'form.sortedby'} eq "revdate") {
  $r->print('<a href = "/adm/email?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>');   $r->print('<a href = "/adm/email?sortedby=date'.$fsqs.'">'.&mt('Date').'</a></th>');
     } else {      } else {
Line 1231  ENDDISHEADER Line 1230  ENDDISHEADER
  }   }
     }      }
             my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime);              my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime);
     $r->print('<td align="right"><span class="LC_nobreak">'.(($status eq 'new')?'<b>':'').      $r->print('<td align="right"><span class="LC_nobreak"><label>'.(($status eq 'new')?'<b>':'').
                       $count.'.'.(($status eq 'new')?'</b>':'').'&nbsp;'.                        $count.'.'.(($status eq 'new')?'</b>':'').'&nbsp;'.
                       '<input type="checkbox" name="delmark"'.                         '<input type="checkbox" name="delmark"'. 
                       ' value="'.$origID.'" /></span></td>');                        ' value="'.$origID.'" /></label></span></td>');
             foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) {              foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) {
                 $r->print('<td>'.(($status eq 'new')?'<b>':'').                  $r->print('<td>'.(($status eq 'new')?'<b>':'').
                           '<a href="/adm/email?display='.$origID.$sqs.'">'.                            '<a href="/adm/email?display='.$origID.$sqs.'">'.
Line 1272  ENDDISHEADER Line 1271  ENDDISHEADER
     $r->print('      $r->print('
 <div class="LC_columnSection"><fieldset>  <div class="LC_columnSection"><fieldset>
 <legend>'.&mt('Message Actions').'</legend>  <legend>'.&mt('Message Actions').'</legend>
 <table border="0" cellspacing="2" cellpadding="8">  <div class="LC_mail_actions">
  <tr>     <b>'.&mt('Select Messages').'</b><br />
   <td><b>'.&mt('Select Messages').'</b><br />  
    <span class="LC_nobreak">     <span class="LC_nobreak">
    <input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n".     <input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n".
   ' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".    ' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".
   '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />    '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />
   </span>    </span>
   </td>'."\n".    </div>'."\n".
   '<td><b>'.&mt('Action').'</b><br />'."\n".    '<div class="LC_mail_actions"><label><b>'.&mt('Action').'</b><br />'."\n".
   '  <select name="checkedaction">'."\n");    '  <select name="checkedaction">'."\n");
   
     if ($folder ne 'trash') {      if ($folder ne 'trash') {
Line 1300  ENDDISHEADER Line 1298  ENDDISHEADER
         $r->print('   <option value="markedmove">'.&mt('Move to Folder ->').          $r->print('   <option value="markedmove">'.&mt('Move to Folder ->').
                   '</option>');                    '</option>');
     }      }
     $r->print("\n".'</select></td>'."\n");      $r->print("\n".'</select></label></div>'."\n");
   
     if (keys(%gotfolders) > 0) {      if (keys(%gotfolders) > 0) {
         $r->print('<td><b>'.&mt('Destination folder').'</b><br />');          $r->print('<td><b>'.&mt('Destination folder').'</b><br />');
Line 1312  ENDDISHEADER Line 1310  ENDDISHEADER
         $r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders).          $r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders).
                   '</td>');                    '</td>');
     }      }
     $r->print('<td style="vertical-align:bottom;">'.      $r->print('<div class="LC_mail_actions">'.
               '<input type="button" name="go" value="'.&mt('Go').                '<br /><input type="button" name="go" value="'.&mt('Go').
               '" onclick="javascript:validate_checkedaction()"/></td>'."\n".                '" onclick="javascript:validate_checkedaction()"/></div>'."\n".
               '</tr></table>'."\n".  
               '</fieldset></div>'."\n"                '</fieldset></div>'."\n"
     );      );
     my $postedstartdis=$startdis+1;      my $postedstartdis=$startdis+1;
Line 1363  sub compout { Line 1360  sub compout {
         }          }
         $r->print(&Apache::loncommon::start_page('Messages'));          $r->print(&Apache::loncommon::start_page('Messages'));
         $r->print(&Apache::lonhtmlcommon::breadcrumbs('Send and display messages'));          $r->print(&Apache::lonhtmlcommon::breadcrumbs('Send and display messages'));
         $r->print('<p class="LC_warning">'.          $r->print('<div class="LC_landmark" role="main"><p class="LC_warning">'.
                  &mt('Sending of LON-CAPA messages is blocked for your current IP address: [_1].',$clientip).'</p>'.                   &mt('Sending of LON-CAPA messages is blocked for your current IP address: [_1].',$clientip).'</p>'.
                  '<ul><li>'.                   '<ul><li>'.
                  &mt('Note: communication is being blocked for certain IP address(es).').                   &mt('Note: communication is being blocked for certain IP address(es).').
                  '</li><li>'.                   '</li><li>'.
                  &mt('This restriction was set by an administrator in the [_1] LON-CAPA domain.',$showdom).                   &mt('This restriction was set by an administrator in the [_1] LON-CAPA domain.',$showdom).
                  '</li></ul>');                   '</li></ul></div>');
         return;          return;
     }      }
     my $suffix=&Apache::lonmsg::foldersuffix($folder);      my $suffix=&Apache::lonmsg::foldersuffix($folder);
Line 1444  sub compout { Line 1441  sub compout {
                                        'uas' => 'Upload and Send',                                         'uas' => 'Upload and Send',
                                        'atta' => 'Attachment',                                         'atta' => 'Attachment',
                                        'to'   => 'To:',                                         'to'   => 'To:',
                                          'msgb' => 'Message body',
                                       );                                        );
     my %attachmax = (      my %attachmax = (
                      text => &mt('(1 MB max size)'),                       text => &mt('(1 MB max size)'),
                      num  => 1048576,                       num  => 1048576,
                     );                      );
     if (!$forwarding && !$multiforward) {      if (!$forwarding && !$multiforward) {
         $attachrow = '<tr><td colspan="3"><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}          $attachrow = '<tr><td colspan="3"><label><b>'.$lt{'atta'}.'</b> '.$attachmax{'text'}
             .': <input type="file" name="attachment" class="LC_flUpload" multiple />'              .': <input type="file" name="attachment" class="LC_flUpload" multiple /></label>'
             .'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />'              .'<input type="hidden" id="LC_free_space" value="'.$attachmax{'num'}.'" />'
             .'</td></tr>';              .'</td></tr>';
     }      }
Line 1757  $latexHelp."<br />\n". Line 1755  $latexHelp."<br />\n".
             $r->print(&reply_to_row(\%lt));              $r->print(&reply_to_row(\%lt));
         }          }
         $r->print(&msg_subject_row($dissub,\%lt,$subj_size));          $r->print(&msg_subject_row($dissub,\%lt,$subj_size));
           my $labeltext = &HTML::Entities::encode($lt{'msgb'}); 
         $r->print(<<"ENDCOMP");          $r->print(<<"ENDCOMP");
 $attachrow  $attachrow
 </table><br />  </table><br />
 $latexHelp<br />  $latexHelp<br />
 <textarea name="message" id="message" cols="80" rows="15" wrap="hard" $textareaclass>$dismsg  <textarea name="message" id="message" cols="80" rows="15" wrap="hard" $textareaclass aria-label="$labeltext">$dismsg
 </textarea>  </textarea>
 <br />  <br />
 $sendmode  $sendmode
Line 1785  ENDCOMP Line 1784  ENDCOMP
 <input type="hidden" name="send" value="on" />  <input type="hidden" name="send" value="on" />
 <h3>$lt{'gen'}</h3>  <h3>$lt{'gen'}</h3>
 <p>  <p>
 Subject: <input type="text" size="50" name="subject" />  <label>$lt{'sb'}: <input type="text" size="50" name="subject" /></label>
 </p>  </p>
 <p>$lt{'gmt'}:<br />  <p><label>$lt{'gmt'}:<br />
 <textarea name="message" id="message" cols="60" rows="10" wrap="hard" $textareaclass>$dismsg  <textarea name="message" id="message" cols="60" rows="10" wrap="hard" $textareaclass>$dismsg
 </textarea></p>  </textarea></label></p>
 <p>  <p>
 $lt{'tff'}:  $lt{'tff'}:
 ENDBLOCK  ENDBLOCK
Line 1841  sub recipient_input_row { Line 1840  sub recipient_input_row {
       &Apache::loncommon::selectstudent_link('compemail','recuname',        &Apache::loncommon::selectstudent_link('compemail','recuname',
                                              'recdomain');                                               'recdomain');
     my $output = <<"ENDREC";      my $output = <<"ENDREC";
 <tr><td colspan="3"><span class="LC_nobreak"><b>$lt{'to'}</b> $lt{'us'}:&nbsp;<input type="text" size="12" name="recuname" value="$env{'form.recname'}" />&nbsp;$lt{'do'}:&nbsp;$domform&nbsp;&nbsp;$selectlink</span></td></tr>  <tr><td colspan="3"><span class="LC_nobreak"><b>$lt{'to'}</b> <label>$lt{'us'}:&nbsp;<input type="text" size="12" name="recuname" value="$env{'form.recname'}" /></label>&nbsp;<label>$lt{'do'}:&nbsp;$domform</label>&nbsp;&nbsp;$selectlink</span></td></tr>
 ENDREC  ENDREC
     return $output;      return $output;
 }  }
Line 1863  sub additional_rec_row { Line 1862  sub additional_rec_row {
     my $exmpl = &mt('username:domain,username:domain,...');       my $exmpl = &mt('username:domain,username:domain,...'); 
     my $output = <<"ENDADD";      my $output = <<"ENDADD";
 <tr><td colspan="3"><fieldset id="LC_additionalrecips"><legend>$lt->{'ad'} <tt>($exmpl)</tt></legend><table>  <tr><td colspan="3"><fieldset id="LC_additionalrecips"><legend>$lt->{'ad'} <tt>($exmpl)</tt></legend><table>
 <tr><td>&nbsp;</td><td>$lt->{'to'}</td><td><input type="text" size="50" name="additionalrec_to" /></td></tr>  <tr><td>&nbsp;</td><td><label for="additionalrec_to">$lt->{'to'}</label></td><td><input type="text" size="50" name="additionalrec_to" id="additionalrec_to" /></td></tr>
 <tr><td>&nbsp;</td><td>$cc</td><td><input type="text" size="50" name="additionalrec_cc" /></td></tr>   <tr><td>&nbsp;</td><td><label for="additionalrec_cc">$cc</label></td><td><input type="text" size="50" name="additionalrec_cc" id="additionalrec_cc" /></td></tr> 
 <tr><td>&nbsp;</td><td>$bcc</td><td><input type="text" size="50" name="additionalrec_bcc" /></td></tr></table></fieldset></td></tr>  <tr><td>&nbsp;</td><td><label for="additionalrec_bcc">$bcc</label></td><td><input type="text" size="50" name="additionalrec_bcc" id="additionalrec_bcc" /></td></tr></table></fieldset></td></tr>
 ENDADD  ENDADD
     return $output;      return $output;
 }  }
Line 1895  sub submit_button_row { Line 1894  sub submit_button_row {
   
 sub msg_subject_row {  sub msg_subject_row {
     my ($dissub,$lt,$subj_size,$extra) = @_;      my ($dissub,$lt,$subj_size,$extra) = @_;
     my $output = '<tr><td colspan="3"><b>'.$lt->{'sb'}.'</b>:&nbsp;<input type="text" size="'.      my $output = '<tr><td colspan="3"><label><b>'.$lt->{'sb'}.'</b>:&nbsp;<input type="text" size="'.
                  $subj_size.'" name="subject" value="'.$dissub.'" />'.$extra.                   $subj_size.'" name="subject" value="'.$dissub.'" /></label>'.$extra.
                  '</td></tr>';                   '</td></tr>';
     return $output;      return $output;
 }  }
Line 2759  sub header { Line 2758  sub header {
     $r->print(&Apache::loncommon::start_page('Messages',      $r->print(&Apache::loncommon::start_page('Messages',
   $extra));    $extra));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs      $r->print(&Apache::lonhtmlcommon::breadcrumbs
       (($title?$title:'Send and display messages')));        (($title?$title:'Send and display messages')).
                 '<div class="LC_landmark" role="main">');
 }  }
   
 # ---------------------------------------------------------------- Print header  # ---------------------------------------------------------------- Print header
Line 3625  sub handler { Line 3625  sub handler {
  &Apache::loncommunicate::menu($r);   &Apache::loncommunicate::menu($r);
  &disall($r,($folder?$folder:$dismode),$msgstatus);   &disall($r,($folder?$folder:$dismode),$msgstatus);
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print('</div>'.&Apache::loncommon::end_page());
     return OK;      return OK;
 }  }
 # ================================================= Main program, reset counter  # ================================================= Main program, reset counter

Removed from v.1.200  
changed lines
  Added in v.1.203


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