[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 23 Apr 2002 21:06:07 -0000
matthew Tue Apr 23 17:06:07 2002 EDT
Modified files:
/loncom/interface lonmsg.pm
Log:
Minor cleanups, call to &Apache::loncommon::select_dom_form.
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.30 loncom/interface/lonmsg.pm:1.31
--- loncom/interface/lonmsg.pm:1.30 Thu Apr 11 16:46:21 2002
+++ loncom/interface/lonmsg.pm Tue Apr 23 17:06:07 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.30 2002/04/11 20:46:21 matthew Exp $
+# $Id: lonmsg.pm,v 1.31 2002/04/23 21:06:07 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -449,18 +449,21 @@
}
my $defdom=$ENV{'user.domain'};
$r->print(
- '<form action="/adm/email" name="compemail" method=post'.
- ' enctype="multipart/form-data">'.
- '<input type=hidden name=sendmail value=on><table>');
+ '<form action="/adm/email" name="compemail" method="post"'.
+ ' enctype="multipart/form-data">'."\n".
+ '<input type="hidden" name="sendmail" value="on">'."\n".
+ '<table>');
unless (($broadcast eq 'group') || ($broadcast eq 'upload')) {
+ my $domform = &Apache::loncommon::select_dom_form($defdom,'recdomain');
+
$r->print(<<"ENDREC");
<table>
<tr><td>Username:</td><td><input type=text size=12 name=recuname></td></tr>
<tr><td>Domain:</td>
-<td><input type=text size=12 name=recdomain value="$defdom"></td></tr>
+<td>$domform</td></tr>
ENDREC
}
- unless ($broadcast eq 'upload') {
+ if ($broadcast ne 'upload') {
$r->print(<<"ENDCOMP");
<tr><td>Additional Recipients<br><tt>username\@domain,username\@domain, ...
</tt></td><td>
@@ -472,23 +475,29 @@
$dispcrit
<input type=submit value="$func Mail">
ENDCOMP
- }
- if ($broadcast eq 'upload') {
+ } else { # $broadcast is 'upload'
$r->print(<<ENDUPLOAD);
<input type=hidden name=sendmode value=upload>
<h3>Generate messages from a file</h3>
+<p>
Subject: <input type=text size=50 name=subject>
+</p>
+<p>General message text<br />
+<textarea name=message cols=60 rows=10 wrap=hard>$dismsg
+</textarea></p>
+<p>
+The file format for the uploaded portion of the message is:
<pre>
username1\@domain1: text
username2\@domain2: text
-username1\@domain1: text
+username3\@domain1: text
</pre>
+</p>
+<p>
The messages will be assembled from all lines with the respective
-<tt>username\@domain</tt>, and appended to the general message text.<p>
+<tt>username\@domain</tt>, and appended to the general message text.</p>
+<p>
<input type=file name=upfile size=20><p>
-General message text:<p>
-<textarea name=message cols=60 rows=10 wrap=hard>$dismsg
-</textarea><p>
$dispcrit
<input type=submit value="Upload and send">
ENDUPLOAD