mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
fix remote(sendmail), convert all <input submit> to &ui_submit()
This commit is contained in:
@ -20,6 +20,6 @@ if ($in{'owner_a'}) {
|
||||
$email = { 'enabled' => 1,
|
||||
'name' => $in{'email_a'},
|
||||
'values' => [ "|$wrapper_path majordomo" ] };
|
||||
&foreign_call("sendmail", "create_alias", $email, $aliases_files);
|
||||
&foreign_call($aliases_module, "create_alias", $email, $aliases_files);
|
||||
&redirect("");
|
||||
|
||||
|
@ -83,8 +83,9 @@ if (&find_value("date_info", $list) eq "yes") {
|
||||
# create the archive directory
|
||||
$adir = &perl_var_replace(&find_value("filedir", $conf), $conf);
|
||||
$aext = &perl_var_replace(&find_value("filedir_suffix", $conf), $conf);
|
||||
if( -d "$adir") {
|
||||
$arch = "$adir/$in{'name'}";
|
||||
if( -d "$adir" && $adir =~ /\/archive$/) {
|
||||
# filedir exist and ends with /archive
|
||||
$arch = "$adir/$in{'name'}";
|
||||
}
|
||||
elsif ($adir && $aext) {
|
||||
&lock_file("$adir/$in{'name'}$aext");
|
||||
|
@ -85,8 +85,8 @@ if ($in{'confirm'}) {
|
||||
else {
|
||||
# css for table
|
||||
local $tcss='style="width: 98%; margin: 1% !important;"';
|
||||
local $dcss='style="text-align: right; vertical-align: top; padding: 5px !important; min_heigth: 5em;"';
|
||||
local $vcss='style="width: 40%; border: 1px solid lightgrey; padding: 5px !important;"';
|
||||
local $dcss='style="text-align: right; vertical-align: middle; padding: 0.3em 1em !important; min_heigth: 5em;"';
|
||||
local $vcss='style="width: 40%; border: 1px solid lightgrey; padding: 0.3em !important;"';
|
||||
|
||||
# ask the user if he is sure
|
||||
&ui_print_header(undef, $text{'delete_title'}.": ".&html_escape($in{'name'}), "");
|
||||
|
@ -83,7 +83,7 @@ print "</tr>\n";
|
||||
print "<tr> <td colspan=4>$text{'access_taboo'}</td> </tr>\n";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value=\"$text{'save'}\"></form>\n";
|
||||
print &ui_submit($text{'save'}),"</form>\n";
|
||||
|
||||
&ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});
|
||||
|
||||
|
@ -30,6 +30,6 @@ print &multi_input("message_headers", $text{'head_headers'}, $conf);
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value=\"$text{'save'}\"></form>\n";
|
||||
print &ui_submit($text{'save'}),"</form>\n";
|
||||
|
||||
&ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});
|
||||
|
@ -13,9 +13,7 @@ local $moderate= (&find_value('moderate', $conf) =~ /no/) ? "" : " (".$text{'ind
|
||||
|
||||
&ui_print_header( $text{'misc_header'}, $text{'edit_title'}.": ".&html_escape($in{'name'})."<tt>$moderate</tt>", "");
|
||||
|
||||
@links = ( "edit_subs.cgi",
|
||||
"edit_mesg.cgi", "edit_access.cgi",
|
||||
"edit_misc.cgi" );
|
||||
@links = ( "edit_subs.cgi", "edit_access.cgi", "edit_misc.cgi" );
|
||||
foreach $a (&foreign_call($aliases_module, "list_aliases",
|
||||
&get_aliases_file())) {
|
||||
if ($a->{'name'} =~ /-digestify$/i &&
|
||||
@ -39,8 +37,19 @@ print $otherbut;
|
||||
|
||||
# css for table
|
||||
local $tcss='style="width: 98%; margin: 1% !important;"';
|
||||
local $dcss='style="text-align: right; vertical-align: top; padding: 5px !important; min_heigth: 5em;"';
|
||||
local $vcss='style="width: 40%; border: 1px solid lightgrey; padding: 5px !important;"';
|
||||
local $dcss='style="text-align: right; vertical-align: middle; padding: 0.3em 1em !important; min_heigth: 5em;"';
|
||||
local $vcss='style="width: 40%; border: 1px solid lightgrey; padding: 0.3em !important;"';
|
||||
|
||||
# list optionen
|
||||
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\">",
|
||||
&ui_submit($text{'modify'}),"</form>\n</tr>\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";
|
||||
@ -111,4 +120,7 @@ print "<div $bcss><form action=\"delete_list.cgi".$name_link."\" method=\"post\"
|
||||
print "<div style=\"padding-top: 20px;\">$text{'edit_deletemsg'}</div>\n";
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
print "<script>",
|
||||
"document.querySelectorAll('.btn.btn-default').forEach(function(button) {",
|
||||
" button.innerHTML=button.innerHTML.replace(/^/,'<i class=\"fa fa-fw fa-pencil-square-o\"></i> ');});",
|
||||
"</script>";
|
||||
|
@ -48,7 +48,7 @@ print &opt_input("maxlength", $text{'mesg_maxlength'}, $conf,
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value=\"$text{'save'}\"></form>\n";
|
||||
print &ui_submit($text{'save'}),"</form>\n";
|
||||
|
||||
&ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});
|
||||
|
||||
|
@ -32,7 +32,7 @@ print &choice_input("date_intro", $text{'misc_intro'},
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value=\"$text{'save'}\"></form>\n";
|
||||
print &ui_submit($text{'save'}),"</form>\n";
|
||||
|
||||
&ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});
|
||||
|
||||
|
@ -91,7 +91,7 @@ print "<td><b>$text{'subs_approval'}</b></td>\n";
|
||||
print "<td><input name=approval size=20 value='$approval'></td> </tr>\n";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value=\"$text{'save'}\"></form>\n";
|
||||
print &ui_submit($text{'save'}),"</form>\n";
|
||||
|
||||
&ui_print_footer("edit_list.cgi?name=$in{'name'}", $text{'edit_return'});
|
||||
|
||||
|
@ -165,6 +165,9 @@ print "<script>",
|
||||
" 'btn btn-transparent btn-xs vertical-align-top margined-top-2', 'fa-edit');",
|
||||
"document.querySelectorAll('tbody td .btn.btn-transparent').forEach(function(button) {",
|
||||
" button.innerHTML=button.innerHTML.replace(/<\\/i>.*edit/,'');});",
|
||||
"document.querySelectorAll('.btn.btn-default').forEach(function(button) {",
|
||||
" button.className += \" btn-success\";",
|
||||
" button.innerHTML=button.innerHTML.replace(/^/,'<i class=\"fa fa-fw fa-plus-circle\"></i> ');});",
|
||||
"</script>",
|
||||
"<style>.btn.btn-transparent { padding: 0 !important; color: grey;}</style>";
|
||||
|
||||
|
@ -32,15 +32,15 @@ foreach $a (@aliases) {
|
||||
$ownerlist = $a if (lc($a->{'name'}) eq lc("owner-$in{'name'}"));
|
||||
$approval = $a if (lc($a->{'name'}) eq lc("$in{'name'}-approval"));
|
||||
}
|
||||
&foreign_call('sendmail', 'modify_alias', $listowner,
|
||||
&foreign_call($aliases_module, 'modify_alias', $listowner,
|
||||
{ 'name' => "$in{'name'}-owner",
|
||||
'values' => [ $in{'owner'} ],
|
||||
'enabled' => 1 }) if ($listowner);
|
||||
&foreign_call('sendmail', 'modify_alias', $ownerlist,
|
||||
&foreign_call($aliases_module, 'modify_alias', $ownerlist,
|
||||
{ 'name' => "owner-$in{'name'}",
|
||||
'values' => [ $in{'owner'} ],
|
||||
'enabled' => 1 }) if ($ownerlist);
|
||||
&foreign_call('sendmail', 'modify_alias', $approval,
|
||||
&foreign_call($aliases_module, 'modify_alias', $approval,
|
||||
{ 'name' => "$in{'name'}-approval",
|
||||
'values' => [ $in{'approval'} ],
|
||||
'enabled' => 1 }) if ($approval);
|
||||
|
Reference in New Issue
Block a user