fix subs closed, add quotes around tag values

This commit is contained in:
Kay Marquardt (Gnadelwartz)
2017-05-31 11:05:13 +02:00
parent a41915611e
commit 32ecbaaf02
3 changed files with 44 additions and 44 deletions

View File

@@ -10,11 +10,11 @@ local $cspan=' colspan="3"',$bcss=' style="display: box; float: left; padding: 1
print <<EOF;
<form action=create_list.cgi method=post>
<table border width=100%>
<table border width=\"100%\">
<tr $tb> <td><b>$text{'create_header'}</b></td> </tr>
<tr $cb> <td><table width=100%>
<tr $cb> <td><table width=\"100%\">
<tr> <td><b>$text{'create_name'} *</b></td>
<td $cspan><input name=name size=20></td> </tr>
<td $cspan><input name=\"name\" size=\"20\"></td> </tr>
EOF
print "<tr>". &opt_input("reply_to", $text{'mesg_reply'},
@@ -24,32 +24,32 @@ print &opt_input("subject_prefix", $text{'mesg_subject'},
print <<EOF;
<tr> <td><b>$text{'create_owner'} *</b></td>
<td width=30%><input name=owner size=30></td>
<td width=\"30%\"><input name=\"owner\" size=\"30\"></td>
<td><b>$text{'create_password'} *</b></td>
<td><input name=password type=password size=30></td> </tr>
<td><input name=\"password\" type=\"password\" size=\"30\"></td> </tr>
<tr> <td><b>$text{'create_desc'}</b></td>
<td $cspan><input name=desc size=60></td> </tr>
<td $cspan><input name=\"desc\" size=\"60\"></td> </tr>
<tr> <td valign=top><b>$text{'create_info'}</b></td>
<td $cspan><textarea name=info rows=5 cols=50></textarea></td> </tr>
<td $cspan><textarea name=\"info\" rows=\"5\" cols=\"50\"></textarea></td> </tr>
<tr> <td valign=top><b>$text{'create_footer'}</b></td>
<td $cspan><textarea name=footer rows=3 cols=60></textarea></td> </tr>
<td $cspan><textarea name=\"footer\" rows=\"3\" cols=\"60\"></textarea></td> </tr>
<tr> <td><b>$text{'create_moderate'}</b></td>
<td><input type=radio name=moderate value=yes> $text{'yes'}
<input type=radio name=moderate value=no checked> $text{'no'}
<td><input type=\"radio\" name=\"moderate\" value=\"yes\"> $text{'yes'}
<input type=\"radio\" name=\"moderate\" value=\"no\" checked> $text{'no'}
</td> </tr>
<tr> <td><b>$text{'create_moderator'}</b></td>
<td $cspan nowrap=""><input type=radio name=moderator_def value=1 checked>
<td $cspan nowrap=""><input type=\"radio\" name=\"moderator_def\" value=\"1\" checked>
$text{'create_same'}
<input type=radio name=moderator_def value=0>
<input name=moderator size=20></td> </tr>
<input type=\"radio\" name=\"moderator_def\" value=\"0\">
<input name=\"moderator\" size=\"20\"></td> </tr>
<tr> <td><b>$text{'create_archive'}</b></td>
<td $cspan><select name=archive>
<option value=''>$text{'no'}</option>
<option value=Y selected>$text{'create_archiveyear'}</option>
<option value=M>$text{'create_archivemonth'}</option>
<option value=D>$text{'create_archiveday'}</option>
<td $cspan><select name=\"archive\">
<option value=\"\"$text{'no'}</option>
<option value=\"Y\" selected>$text{'create_archiveyear'}</option>
<option value=\"M\">$text{'create_archivemonth'}</option>
<option value=\"D\">$text{'create_archiveday'}</option>
</select></td> </tr>
</table></td></tr></table>

View File

@@ -42,22 +42,22 @@ local $vcss='style="width: 40%; border: 1px solid lightgrey; padding: 0.3em !imp
local $xcss='style="width: 25%; border: 1px solid lightgrey; padding: 0.3em !important;"';
# list options
print "<table border width=100%>\n";
print "<table border width=\"100%\">\n";
print "<tr $tb> <td><b>$text{'mesg_header'}</b></td>";
print "<td width=10% nowrap><form action=\"edit_mesg.cgi".$name_link."\" method=\"post\">",
print "<td width=\"10%\" nowrap><form action=\"edit_mesg.cgi".$name_link."\" method=\"post\">",
&ui_submit($text{'modify'}),"</form>\n</tr>\n";
print "<tr $cb> <td colspan=2><table $tcss>\n";
print "<tr $cb> <td colspan=\"2\"><table $tcss>\n";
print "<tr><td $dcss><b>".$text{'mesg_reply'}."</b></td><td $vcss>",&find_value("reply_to", $conf)."</td></tr>\n";
print "<tr><td $dcss><b>".$text{'mesg_subject'}."</b></td><td $vcss>".&find_value("subject_prefix", $conf)."</td></tr>\n";
print "</table></td></tr></table>\n";
# title, descritpion, info
print "<table border width=100%>\n";
print "<table border width=\"100%\">\n";
print "<tr $tb> <td><b>".$text{'info_title'}."</b></td>";
print "<td width=10% nowrap><form action=\"edit_info.cgi".$name_link."\" method=\"post\">",
print "<td width=\"10%\" nowrap><form action=\"edit_info.cgi".$name_link."\" method=\"post\">",
&ui_submit($text{'modify'}),"</form>\n</tr>\n";
print "<tr $cb> <td colspan=2><table $tcss>\n";
print "<tr $cb> <td colspan=\"2\"><table $tcss>\n";
print "<tr> <td $dcss><b>".$text{'info_desc'}."</b></td>\n";
$desc = &find_value("description", $conf);
print "<td $vcss>$desc</td> </tr>\n";
@@ -79,11 +79,11 @@ print "</td> </tr>\n";
print "</table></td></tr></table>\n";
# header and footer
print "<table border width=100%>\n";
print "<table border width=\"100%\">\n";
print "<tr $tb> <td><b>".$text{'head_title'}."</b></td>";
print "<td width=10% nowrap><form action=\"edit_head.cgi".$name_link."\" method=\"post\">",
print "<td width=\"10%\" nowrap><form action=\"edit_head.cgi".$name_link."\" method=\"post\">",
&ui_submit($text{'modify'}),"</form>\n</tr>\n";
print "<tr $cb> <td colspan=2><table $tcss>\n";
print "<tr $cb> <td colspan=\"2\"><table $tcss>\n";
print "<tr> <td $dcss><b>".$text{'head_fronter'}."</b></td> <td $vcss>\n";
print &find_value("message_fronter", $conf);
print "</td></tr>\n";
@@ -96,21 +96,21 @@ print "</td></tr>\n";
print "</table></td></tr></table>\n";
# owner and moderation
print "<table border width=100%>\n";
print "<table border width=\"100%\">\n";
print "<tr $tb> <td><b>$text{'subs_title'}</b></td>";
print "<td width=10% nowrap><form action=\"edit_subs.cgi".$name_link."\" method=\"post\">",
print "<td width=\"10%\" nowrap><form action=\"edit_subs.cgi".$name_link."\" method=\"post\">",
&ui_submit($text{'modify'}),"</form>\n</tr>\n";
print "<tr $cb> <td colspan=2><table $tcss>\n";
print "<tr $cb> <td colspan=\"2\"><table $tcss>\n";
$pol = &find_value("subscribe_policy", $conf);
if ($pol =~ /(\S+)\+confirm/) { $pol = $1; $confirm = 1; }
print "<tr> <td $dcss><b>$text{'subs_sub'}:</b></td> <td $xcss nowrap>\n";
printf $text{'subs_s'.$pol};
print $pol eq "closed" ? $text{'subs_closed'} : $text{'subs_s'.$pol};
print "</td>\n";
$upol = &find_value("unsubscribe_policy", $conf);
$pol = &find_value("unsubscribe_policy", $conf);
print "<td $dcss><b>$text{'subs_unsub'}:</b></td> <td $xcss nowrap>\n";
printf $text{'subs_u'.$upol};
print $pol eq "closed" ? $text{'subs_closed'} : $text{'subs_u'.$pol};
print "</td> </tr>\n";
$aliases_files = &get_aliases_file();
@@ -130,11 +130,11 @@ print "<td $xcss >".$approval."</td> </tr>\n";
print "</table></td></tr></table>\n";
# members
print "<table border width=100%>\n";
print "<table border width=\"100%\">\n";
print "<tr $tb> <td><b>".$text{'members_title'}."</b></td>";
print "<td width=10% nowrap><form action=\"edit_members.cgi".$name_link."\" method=\"post\">",
print "<td width=\"10%\" nowrap><form action=\"edit_members.cgi".$name_link."\" method=\"post\">",
&ui_submit($text{'modify'}),"</form>\n</tr>\n";
print "<tr $cb> <td colspan=2>\n";
print "<tr $cb> <td colspan=\"2\">\n";
local @cols, @tds, $count=0;
print &ui_columns_start(\@cols, $tcss, 0, \@tds);
open(MEMS, $list->{'members'});

View File

@@ -321,7 +321,7 @@ local $v = &find_value($_[0], $_[2]);
local $rv = "<td><b>$_[1]</b></td> <td nowrap>";
for($i=3; $i<@_; $i+=2) {
local $ch = $v eq $_[$i] ? "checked" : "";
$rv .= "<input name=$_[0] type=radio value='$_[$i]' $ch> ".$_[$i+1];
$rv .= "<input name=\"$_[0]\" type=\"radio\" value=\"$_[$i]\" $ch> ".$_[$i+1];
}
$rv .= "</td>\n";
return $rv;
@@ -338,13 +338,13 @@ sub opt_input
{
local $v = &find_value($_[0], $_[2]);
local $rv = "<td><b>$_[1]</b></td> <td nowrap ".
($_[4] > 30 ? "colspan=3" : "").">";
$rv .= sprintf "<input type=radio name=$_[0]_def value=1 %s> $_[3]\n",
($_[4] > 30 ? "colspan=\"3\"" : "").">";
$rv .= sprintf "<input type=\"radio\" name=\"$_[0]_def\" value=\"1\" %s> $_[3]\n",
$v eq "" ? "checked" : "";
$rv .= sprintf "<input type=radio name=$_[0]_def value=0 %s>\n",
$rv .= sprintf "<input type=\"radio\" name=\"$_[0]_def\" value=\"0\" %s>\n",
$v eq "" ? "" : "checked";
local $passwd = $_[0] =~ /passwd/ ? "type=password" : "";
$rv .= "<input $passwd name=$_[0] size=$_[4] value=\"$v\"> $_[5]</td>\n";
local $passwd = $_[0] =~ /passwd/ ? "type=\"password\"" : "";
$rv .= "<input $passwd name=\"$_[0]\" size=\"$_[4]\" value=\"$v\"> $_[5]</td>\n";
return $rv;
}
@@ -379,8 +379,8 @@ sub save_select
sub multi_input
{
local $v = &find_value($_[0], $_[2]);
local $rv = "<td valign=top><b>$_[1]</b></td> <td colspan=3>".
"<textarea rows=4 cols=80 name=$_[0]>\n$v</textarea></td>\n";
local $rv = "<td valign=\"top\"><b>$_[1]</b></td> <td colspan=\"3\">".
"<textarea rows=\"4\" cols=\"80\" name=\"$_[0]\">\n$v</textarea></td>\n";
return $rv;
}