[dw-free] Show 'display cross post links' on cross-posting summary page
[commit: http://hg.dwscoalition.org/dw-free/rev/18a19f24b6a8]
http://bugs.dwscoalition.org/show_bug.cgi?id=3292
Adds checkbox for the "show crosspost link" option to the general Other
Sites view, so that it's more visible.
Patch by Erin of
teamdestroyer.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3292
Adds checkbox for the "show crosspost link" option to the general Other
Sites view, so that it's more visible.
Patch by Erin of
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/en.dat
- cgi-bin/DW/Setting/XPostAccounts.pm
-------------------------------------------------------------------------------- diff -r 50c3866d1cec -r 18a19f24b6a8 bin/upgrading/en.dat --- a/bin/upgrading/en.dat Fri Dec 10 15:05:11 2010 +0800 +++ b/bin/upgrading/en.dat Fri Dec 10 15:16:55 2010 +0800 @@ -3079,6 +3079,8 @@ setting.xpost.option.footer.when.never=N setting.xpost.option.password=Password +setting.xpost.option.recordlink=Display Crosspost Link + setting.xpost.option.server=Server setting.xpost.option.username=Username diff -r 50c3866d1cec -r 18a19f24b6a8 cgi-bin/DW/Setting/XPostAccounts.pm --- a/cgi-bin/DW/Setting/XPostAccounts.pm Fri Dec 10 15:05:11 2010 +0800 +++ b/cgi-bin/DW/Setting/XPostAccounts.pm Fri Dec 10 15:16:55 2010 +0800 @@ -69,6 +69,7 @@ sub option { $ret .= "<th>" . $class->ml('setting.xpost.option.username') . "</th>\n"; $ret .= "<th>" . $class->ml('setting.xpost.option.server') . "</th>\n"; $ret .= "<th>" . $class->ml('setting.xpost.option.xpostbydefault') . "</th>\n"; + $ret .= "<th>" . $class->ml('setting.xpost.option.recordlink') . "</th>\n"; $ret .= "<th>" . $class->ml('setting.xpost.option.change') . "</th>\n"; $ret .= "<th>" . $class->ml('setting.xpost.option.delete') . "</th>\n"; $ret .= "</tr>\n"; @@ -84,6 +85,12 @@ sub option { value => 1, id => "${key}xpostbydefault[${acctid}]", selected => $externalacct->xpostbydefault + }) . "</td>"; + $ret .= "<td class='checkbox'>" . LJ::html_check({ + name => "${key}recordlink[${acctid}]", + value => 1, + id => "${key}recordlink[${acctid}]", + selected => $externalacct->recordlink }) . "</td>"; $ret .= "<td style='text-align: center;'><a href='$LJ::SITEROOT/manage/externalaccount?acctid=${acctid}'>" . $class->ml('setting.xpost.option.change') . "</a></td>\n"; $ret .= "<td class='checkbox'>" . LJ::html_check({ @@ -281,6 +288,10 @@ sub save { if ($class->get_arg($args, "xpostbydefault[$acctid]") ne $account->{'xpostbydefault'}) { $account->set_xpostbydefault($class->get_arg($args, "xpostbydefault[$acctid]")); } + # check to see if we need to reset the recordlink + if ($class->get_arg($args, "recordlink[$acctid]") ne $account->{'recordlink'}) { + $account->set_recordlink($class->get_arg($args, "recordlink[$acctid]")); + } } } } --------------------------------------------------------------------------------