Merge branch '1.0.x' into directory

* 1.0.x:
  * translator documentation updated. * superfluous whitespace removed. * small refactoring in noticeform.php to allow proper translator hints.
  * translator documntation updated * superfluous whitespace remove * minor L10n and i18n updates
  Cleanup & minification for migration to reusable notice form in inline replies. Yay!
  Work in progress: inline reply form reusing the main reply form now inserts the successful result more or less right
  style fixes for new notice form being reused in reply area
  Reusable notice form fixes for geolocation
  Loading the original form instead of faking up our own. Sorta works but not pretty :D
  Kill some more hardcoded ids...
  More hardcoded id cleanup in notice form...
  'link' to 'links' in feed document
This commit is contained in:
Zach Copley 2011-03-05 01:57:50 -08:00
commit 1256181d36
34 changed files with 333 additions and 240 deletions

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
*/ */
class LicenseadminpanelAction extends AdminPanelAction class LicenseadminpanelAction extends AdminPanelAction
{ {
/** /**
* Returns the page title * Returns the page title
* *
@ -62,6 +61,7 @@ class LicenseadminpanelAction extends AdminPanelAction
*/ */
function getInstructions() function getInstructions()
{ {
// TRANS: Form instructions for the site license admin panel.
return _('License for this StatusNet site'); return _('License for this StatusNet site');
} }
@ -131,7 +131,8 @@ class LicenseadminpanelAction extends AdminPanelAction
$types = array('private', 'allrightsreserved', 'cc'); $types = array('private', 'allrightsreserved', 'cc');
if (!in_array($values['license']['type'], $types)) { if (!in_array($values['license']['type'], $types)) {
$this->clientError(_("Invalid license selection.")); // TRANS: Client error displayed selecting an invalid license in the license admin panel.
$this->clientError(_('Invalid license selection.'));
} }
// Make sure the user has set an owner if the site has a private // Make sure the user has set an owner if the site has a private
@ -141,13 +142,15 @@ class LicenseadminpanelAction extends AdminPanelAction
&& empty($values['license']['owner']) && empty($values['license']['owner'])
) { ) {
$this->clientError( $this->clientError(
_("You must specify the owner of the content when using the All Rights Reserved license.") // TRANS: Client error displayed when not specifying an owner for the all rights reserved license in the license admin panel.
_('You must specify the owner of the content when using the All Rights Reserved license.')
); );
} }
// Make sure the license title is not too long // Make sure the license title is not too long
if (mb_strlen($values['license']['type']) > 255) { if (mb_strlen($values['license']['type']) > 255) {
$this->clientError( $this->clientError(
// TRANS: Client error displayed selecting a too long license title in the license admin panel.
_('Invalid license title. Maximum length is 255 characters.') _('Invalid license title. Maximum length is 255 characters.')
); );
} }
@ -160,10 +163,12 @@ class LicenseadminpanelAction extends AdminPanelAction
if ($values['license']['type'] == 'cc') { if ($values['license']['type'] == 'cc') {
if (!Validate::uri($values['license']['url'], $options)) { if (!Validate::uri($values['license']['url'], $options)) {
$this->clientError(_("Invalid license URL.")); // TRANS: Client error displayed specifying an invalid license URL in the license admin panel.
$this->clientError(_('Invalid license URL.'));
} }
if (!Validate::uri($values['license']['image'], $options)) { if (!Validate::uri($values['license']['image'], $options)) {
$this->clientError(_("Invalid license image URL.")); // TRANS: Client error displayed specifying an invalid license image URL in the license admin panel.
$this->clientError(_('Invalid license image URL.'));
} }
} }
@ -171,7 +176,8 @@ class LicenseadminpanelAction extends AdminPanelAction
if (!empty($values['license']['url'])) { if (!empty($values['license']['url'])) {
if (!Validate::uri($values['license']['url'], $options)) { if (!Validate::uri($values['license']['url'], $options)) {
$this->clientError(_("License URL must be blank or a valid URL.")); // TRANS: Client error displayed specifying an invalid license URL in the license admin panel.
$this->clientError(_('License URL must be blank or a valid URL.'));
} }
} }
@ -179,7 +185,8 @@ class LicenseadminpanelAction extends AdminPanelAction
if (!empty($values['license']['image'])) { if (!empty($values['license']['image'])) {
if (!Validate::uri($values['license']['image'], $options)) { if (!Validate::uri($values['license']['image'], $options)) {
$this->clientError(_("License image must be blank or valid URL.")); // TRANS: Client error displayed specifying an invalid license image URL in the license admin panel.
$this->clientError(_('License image must be blank or valid URL.'));
} }
} }
} }
@ -229,22 +236,28 @@ class LicenseAdminPanelForm extends AdminForm
$this->out->elementStart( $this->out->elementStart(
'fieldset', array('id' => 'settings_license-selection') 'fieldset', array('id' => 'settings_license-selection')
); );
// TRANS: Form legend in the license admin panel.
$this->out->element('legend', null, _('License selection')); $this->out->element('legend', null, _('License selection'));
$this->out->elementStart('ul', 'form_data'); $this->out->elementStart('ul', 'form_data');
$this->li(); $this->li();
$types = array( $types = array(
// TRANS: License option in the license admin panel.
'private' => _('Private'), 'private' => _('Private'),
// TRANS: License option in the license admin panel.
'allrightsreserved' => _('All Rights Reserved'), 'allrightsreserved' => _('All Rights Reserved'),
// TRANS: License option in the license admin panel.
'cc' => _('Creative Commons') 'cc' => _('Creative Commons')
); );
$this->out->dropdown( $this->out->dropdown(
'type', 'type',
// TRANS: Dropdown field label in the license admin panel.
_('Type'), _('Type'),
$types, $types,
_('Select license'), // TRANS: Dropdown field instructions in the license admin panel.
_('Select a license.'),
false, false,
$this->value('type', 'license') $this->value('type', 'license')
); );
@ -258,13 +271,16 @@ class LicenseAdminPanelForm extends AdminForm
'fieldset', 'fieldset',
array('id' => 'settings_license-details') array('id' => 'settings_license-details')
); );
// TRANS: Form legend in the license admin panel.
$this->out->element('legend', null, _('License details')); $this->out->element('legend', null, _('License details'));
$this->out->elementStart('ul', 'form_data'); $this->out->elementStart('ul', 'form_data');
$this->li(); $this->li();
$this->input( $this->input(
'owner', 'owner',
// TRANS: Field label in the license admin panel.
_('Owner'), _('Owner'),
// TRANS: Field title in the license admin panel.
_('Name of the owner of the site\'s content (if applicable).'), _('Name of the owner of the site\'s content (if applicable).'),
'license' 'license'
); );
@ -273,7 +289,9 @@ class LicenseAdminPanelForm extends AdminForm
$this->li(); $this->li();
$this->input( $this->input(
'title', 'title',
// TRANS: Field label in the license admin panel.
_('License Title'), _('License Title'),
// TRANS: Field title in the license admin panel.
_('The title of the license.'), _('The title of the license.'),
'license' 'license'
); );
@ -282,7 +300,9 @@ class LicenseAdminPanelForm extends AdminForm
$this->li(); $this->li();
$this->input( $this->input(
'url', 'url',
// TRANS: Field label in the license admin panel.
_('License URL'), _('License URL'),
// TRANS: Field title in the license admin panel.
_('URL for more information about the license.'), _('URL for more information about the license.'),
'license' 'license'
); );
@ -290,7 +310,9 @@ class LicenseAdminPanelForm extends AdminForm
$this->li(); $this->li();
$this->input( $this->input(
// TRANS: Field label in the license admin panel.
'image', _('License Image URL'), 'image', _('License Image URL'),
// TRANS: Field title in the license admin panel.
_('URL for an image to display with the license.'), _('URL for an image to display with the license.'),
'license' 'license'
); );
@ -308,7 +330,13 @@ class LicenseAdminPanelForm extends AdminForm
function formActions() function formActions()
{ {
$this->out->submit( $this->out->submit(
'submit', _('Save'), 'submit', null, _('Save license settings') 'submit',
// TRANS: Button text in the license admin panel.
_m('BUTTON','Save'),
'submit',
null,
// TRANS: Button title in the license admin panel.
_('Save license settings.')
); );
} }
} }

View File

@ -94,6 +94,7 @@ class LoginAction extends Action
parent::handle($args); parent::handle($args);
if (common_is_real_login()) { if (common_is_real_login()) {
// TRANS: Client error displayed when trying to log in while already logged in.
$this->clientError(_('Already logged in.')); $this->clientError(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->checkLogin(); $this->checkLogin();
@ -122,12 +123,14 @@ class LoginAction extends Action
$user = common_check_user($nickname, $password); $user = common_check_user($nickname, $password);
if (!$user) { if (!$user) {
// TRANS: Form validation error displayed when trying to log in with incorrect credentials.
$this->showForm(_('Incorrect username or password.')); $this->showForm(_('Incorrect username or password.'));
return; return;
} }
// success! // success!
if (!common_set_user($user)) { if (!common_set_user($user)) {
// TRANS: Server error displayed when during login a server error occurs.
$this->serverError(_('Error setting user. You are probably not authorized.')); $this->serverError(_('Error setting user. You are probably not authorized.'));
return; return;
} }
@ -182,6 +185,7 @@ class LoginAction extends Action
*/ */
function title() function title()
{ {
// TRANS: Page title for login page.
return _('Login'); return _('Login');
} }
@ -219,25 +223,32 @@ class LoginAction extends Action
'class' => 'form_settings', 'class' => 'form_settings',
'action' => common_local_url('login'))); 'action' => common_local_url('login')));
$this->elementStart('fieldset'); $this->elementStart('fieldset');
// TRANS: Form legend on login page.
$this->element('legend', null, _('Login to site')); $this->element('legend', null, _('Login to site'));
$this->elementStart('ul', 'form_data'); $this->elementStart('ul', 'form_data');
$this->elementStart('li'); $this->elementStart('li');
// TRANS: Field label on login page.
$this->input('nickname', _('Nickname')); $this->input('nickname', _('Nickname'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
// TRANS: Field label on login page.
$this->password('password', _('Password')); $this->password('password', _('Password'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
// TRANS: Checkbox label label on login page.
$this->checkbox('rememberme', _('Remember me'), false, $this->checkbox('rememberme', _('Remember me'), false,
// TRANS: Checkbox title on login page.
_('Automatically login in the future; ' . _('Automatically login in the future; ' .
'not for shared computers!')); 'not for shared computers!'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
$this->submit('submit', _('Login')); // TRANS: Button text for log in on login page.
$this->submit('submit', _m('BUTTON','Login'));
$this->elementEnd('fieldset'); $this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
$this->elementStart('p'); $this->elementStart('p');
$this->element('a', array('href' => common_local_url('recoverpassword')), $this->element('a', array('href' => common_local_url('recoverpassword')),
// TRANS: Link text for link to "reset password" on login page.
_('Lost or forgotten password?')); _('Lost or forgotten password?'));
$this->elementEnd('p'); $this->elementEnd('p');
} }
@ -256,13 +267,17 @@ class LoginAction extends Action
common_get_returnto()) { common_get_returnto()) {
// rememberme logins have to reauthenticate before // rememberme logins have to reauthenticate before
// changing any profile settings (cookie-stealing protection) // changing any profile settings (cookie-stealing protection)
// TRANS: Form instructions on login page before being able to change user settings.
return _('For security reasons, please re-enter your ' . return _('For security reasons, please re-enter your ' .
'user name and password ' . 'user name and password ' .
'before changing your settings.'); 'before changing your settings.');
} else { } else {
// TRANS: Form instructions on login page.
$prompt = _('Login with your username and password.'); $prompt = _('Login with your username and password.');
if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) { if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) {
$prompt .= ' '; $prompt .= ' ';
// TRANS: Form instructions on login page. This message contains Markdown links in the form [Link text](Link).
// TRANS: %%action.register%% is a link to the registration page.
$prompt .= _('Don\'t have a username yet? ' . $prompt .= _('Don\'t have a username yet? ' .
'[Register](%%action.register%%) a new account.'); '[Register](%%action.register%%) a new account.');
} }

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/ */
class LogoutAction extends Action class LogoutAction extends Action
{ {
/** /**
* This is read only. * This is read only.
* *

View File

@ -58,6 +58,7 @@ class MakeadminAction extends RedirectingAction
{ {
parent::prepare($args); parent::prepare($args);
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed when trying to access the "make admin" page while not logged in.
$this->clientError(_('Not logged in.')); $this->clientError(_('Not logged in.'));
return false; return false;
} }
@ -68,31 +69,38 @@ class MakeadminAction extends RedirectingAction
} }
$id = $this->trimmed('profileid'); $id = $this->trimmed('profileid');
if (empty($id)) { if (empty($id)) {
// TRANS: Client error displayed when not providing a profile ID on the Make Admin page.
$this->clientError(_('No profile specified.')); $this->clientError(_('No profile specified.'));
return false; return false;
} }
$this->profile = Profile::staticGet('id', $id); $this->profile = Profile::staticGet('id', $id);
if (empty($this->profile)) { if (empty($this->profile)) {
// TRANS: Client error displayed when specifying an invalid profile ID on the Make Admin page.
$this->clientError(_('No profile with that ID.')); $this->clientError(_('No profile with that ID.'));
return false; return false;
} }
$group_id = $this->trimmed('groupid'); $group_id = $this->trimmed('groupid');
if (empty($group_id)) { if (empty($group_id)) {
// TRANS: Client error displayed when not providing a group ID on the Make Admin page.
$this->clientError(_('No group specified.')); $this->clientError(_('No group specified.'));
return false; return false;
} }
$this->group = User_group::staticGet('id', $group_id); $this->group = User_group::staticGet('id', $group_id);
if (empty($this->group)) { if (empty($this->group)) {
// TRANS: Client error displayed when providing an invalid group ID on the Make Admin page.
$this->clientError(_('No such group.')); $this->clientError(_('No such group.'));
return false; return false;
} }
$user = common_current_user(); $user = common_current_user();
if (!$user->isAdmin($this->group) && if (!$user->isAdmin($this->group) &&
!$user->hasRight(Right::MAKEGROUPADMIN)) { !$user->hasRight(Right::MAKEGROUPADMIN)) {
// TRANS: Client error displayed when trying to make another user admin on the Make Admin page while not an admin.
$this->clientError(_('Only an admin can make another user an admin.'), 401); $this->clientError(_('Only an admin can make another user an admin.'), 401);
return false; return false;
} }
if ($this->profile->isAdmin($this->group)) { if ($this->profile->isAdmin($this->group)) {
// TRANS: Client error displayed when trying to make another user admin on the Make Admin page who already is admin.
// TRANS: %1$s is the user that is already admin, %2$s is the group user is already admin for.
$this->clientError(sprintf(_('%1$s is already an admin for group "%2$s".'), $this->clientError(sprintf(_('%1$s is already an admin for group "%2$s".'),
$this->profile->getBestName(), $this->profile->getBestName(),
$this->group->getBestName()), $this->group->getBestName()),
@ -130,6 +138,9 @@ class MakeadminAction extends RedirectingAction
'profile_id' => $this->profile->id)); 'profile_id' => $this->profile->id));
if (empty($member)) { if (empty($member)) {
// TRANS: Server error displayed when trying to make another user admin on the Make Admin page fails
// TRANS: because the group membership record could not be gotten.
// TRANS: %1$s is the to be admin user, %2$s is the group user should be admin for.
$this->serverError(_('Can\'t get membership record for %1$s in group %2$s.'), $this->serverError(_('Can\'t get membership record for %1$s in group %2$s.'),
$this->profile->getBestName(), $this->profile->getBestName(),
$this->group->getBestName()); $this->group->getBestName());
@ -143,6 +154,9 @@ class MakeadminAction extends RedirectingAction
if (!$result) { if (!$result) {
common_log_db_error($member, 'UPDATE', __FILE__); common_log_db_error($member, 'UPDATE', __FILE__);
// TRANS: Server error displayed when trying to make another user admin on the Make Admin page fails
// TRANS: because the group adminship record coud not be saved properly.
// TRANS: %1$s is the to be admin user, %2$s is the group user is already admin for.
$this->serverError(_('Can\'t make %1$s an admin for group %2$s.'), $this->serverError(_('Can\'t make %1$s an admin for group %2$s.'),
$this->profile->getBestName(), $this->profile->getBestName(),
$this->group->getBestName()); $this->group->getBestName());

View File

@ -46,7 +46,7 @@ class MicrosummaryAction extends Action
{ {
/** /**
* Class handler. * Class handler.
* *
* @param array $args array of arguments * @param array $args array of arguments
* *
* @return nothing * @return nothing
@ -59,18 +59,20 @@ class MicrosummaryAction extends Action
$user = User::staticGet('nickname', $nickname); $user = User::staticGet('nickname', $nickname);
if (!$user) { if (!$user) {
// TRANS: Client error displayed trying to make a micro summary without providing a valid user.
$this->clientError(_('No such user.'), 404); $this->clientError(_('No such user.'), 404);
return; return;
} }
$notice = $user->getCurrentNotice(); $notice = $user->getCurrentNotice();
if (!$notice) { if (!$notice) {
// TRANS: Client error displayed trying to make a micro summary without providing a status.
$this->clientError(_('No current status.'), 404); $this->clientError(_('No current status.'), 404);
} }
header('Content-Type: text/plain'); header('Content-Type: text/plain');
print $user->nickname . ': ' . $notice->content; print $user->nickname . ': ' . $notice->content;
} }

View File

@ -68,6 +68,7 @@ class NewmessageAction extends Action
function title() function title()
{ {
// TRANS: Page title for new direct message page.
return _('New message'); return _('New message');
} }
@ -84,6 +85,7 @@ class NewmessageAction extends Action
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed trying to create a new direct message while not logged in.
$this->clientError(_('Not logged in.'), 403); $this->clientError(_('Not logged in.'), 403);
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->saveNewMessage(); $this->saveNewMessage();
@ -113,12 +115,15 @@ class NewmessageAction extends Action
$this->other = User::staticGet('id', $this->to); $this->other = User::staticGet('id', $this->to);
if (!$this->other) { if (!$this->other) {
// TRANS: Client error displayed trying to send a direct message to a non-existing user.
$this->clientError(_('No such user.'), 404); $this->clientError(_('No such user.'), 404);
return false; return false;
} }
if (!$user->mutuallySubscribed($this->other)) { if (!$user->mutuallySubscribed($this->other)) {
$this->clientError(_('You can\'t send a message to this user.'), 404); // TRANS: Client error displayed trying to send a direct message to a user while sender and
// TRANS: receiver are not subscribed to each other.
$this->clientError(_('You cannot send a message to this user.'), 404);
return false; return false;
} }
} }
@ -141,6 +146,7 @@ class NewmessageAction extends Action
assert($user); // XXX: maybe an error instead... assert($user); // XXX: maybe an error instead...
if (!$this->content) { if (!$this->content) {
// TRANS: Form validator error displayed trying to send a direct message without content.
$this->showForm(_('No content!')); $this->showForm(_('No content!'));
return; return;
} else { } else {
@ -158,12 +164,16 @@ class NewmessageAction extends Action
} }
if (!$this->other) { if (!$this->other) {
// TRANS: Form validation error displayed trying to send a direct message without specifying a recipient.
$this->showForm(_('No recipient specified.')); $this->showForm(_('No recipient specified.'));
return; return;
} else if (!$user->mutuallySubscribed($this->other)) { } else if (!$user->mutuallySubscribed($this->other)) {
$this->clientError(_('You can\'t send a message to this user.'), 404); // TRANS: Client error displayed trying to send a direct message to a user while sender and
// TRANS: receiver are not subscribed to each other.
$this->clientError(_('You cannot send a message to this user.'), 404);
return; return;
} else if ($user->id == $this->other->id) { } else if ($user->id == $this->other->id) {
// TRANS: Client error displayed trying to send a direct message to self.
$this->clientError(_('Don\'t send a message to yourself; ' . $this->clientError(_('Don\'t send a message to yourself; ' .
'just say it to yourself quietly instead.'), 403); 'just say it to yourself quietly instead.'), 403);
return; return;
@ -181,10 +191,13 @@ class NewmessageAction extends Action
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8'); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title after sending a direct message.
$this->element('title', null, _('Message sent')); $this->element('title', null, _('Message sent'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
$this->element('p', array('id' => 'command_result'), $this->element('p', array('id' => 'command_result'),
// TRANS: Confirmation text after sending a direct message.
// TRANS: %s is the direct message recipient.
sprintf(_('Direct message to %s sent.'), sprintf(_('Direct message to %s sent.'),
$this->other->nickname)); $this->other->nickname));
$this->elementEnd('body'); $this->elementEnd('body');
@ -210,6 +223,7 @@ class NewmessageAction extends Action
{ {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8', true);
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title after an AJAX error occurred on the "send direct message" page.
$this->element('title', null, _('Ajax Error')); $this->element('title', null, _('Ajax Error'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
@ -231,6 +245,7 @@ class NewmessageAction extends Action
$this->xw->startDocument('1.0', 'UTF-8'); $this->xw->startDocument('1.0', 'UTF-8');
$this->elementStart('html'); $this->elementStart('html');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title on page for sending a direct message.
$this->element('title', null, _('New message')); $this->element('title', null, _('New message'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');

View File

@ -47,13 +47,11 @@ require_once INSTALLDIR . '/lib/mediafile.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class NewnoticeAction extends Action class NewnoticeAction extends Action
{ {
/** /**
* Error message, if any * Error message, if any
*/ */
var $msg = null; var $msg = null;
/** /**
@ -63,9 +61,9 @@ class NewnoticeAction extends Action
* *
* @return string page title * @return string page title
*/ */
function title() function title()
{ {
// TRANS: Page title for sending a new notice.
return _('New notice'); return _('New notice');
} }
@ -85,6 +83,7 @@ class NewnoticeAction extends Action
function handle($args) function handle($args)
{ {
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed trying to send a notice while not logged in.
$this->clientError(_('Not logged in.')); $this->clientError(_('Not logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// check for this before token since all POST and FILES data // check for this before token since all POST and FILES data
@ -127,7 +126,6 @@ class NewnoticeAction extends Action
* *
* @return void * @return void
*/ */
function saveNewNotice() function saveNewNotice()
{ {
$user = common_current_user(); $user = common_current_user();
@ -137,6 +135,7 @@ class NewnoticeAction extends Action
Event::handle('StartSaveNewNoticeWeb', array($this, $user, &$content, &$options)); Event::handle('StartSaveNewNoticeWeb', array($this, $user, &$content, &$options));
if (!$content) { if (!$content) {
// TRANS: Client error displayed trying to send a notice without content.
$this->clientError(_('No content!')); $this->clientError(_('No content!'));
return; return;
} }
@ -227,6 +226,7 @@ class NewnoticeAction extends Action
$this->xw->startDocument('1.0', 'UTF-8'); $this->xw->startDocument('1.0', 'UTF-8');
$this->elementStart('html'); $this->elementStart('html');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title after sending a notice.
$this->element('title', null, _('Notice posted')); $this->element('title', null, _('Notice posted'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
@ -256,11 +256,11 @@ class NewnoticeAction extends Action
* *
* @return void * @return void
*/ */
function ajaxErrorMsg($msg) function ajaxErrorMsg($msg)
{ {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8', true);
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title after an AJAX error occurs on the send notice page.
$this->element('title', null, _('Ajax Error')); $this->element('title', null, _('Ajax Error'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
@ -269,6 +269,30 @@ class NewnoticeAction extends Action
$this->elementEnd('html'); $this->elementEnd('html');
} }
/**
* Show an Ajax-y notice form
*
* Goes back to the browser, where it's shown in a popup.
*
* @param string $msg Message to show
*
* @return void
*/
function ajaxShowForm()
{
$this->startHTML('text/xml;charset=utf-8', true);
$this->elementStart('head');
$this->element('title', null, _('New notice'));
$this->elementEnd('head');
$this->elementStart('body');
$form = new NoticeForm($this);
$form->show();
$this->elementEnd('body');
$this->elementEnd('html');
}
/** /**
* Formerly page output * Formerly page output
* *
@ -283,11 +307,14 @@ class NewnoticeAction extends Action
* *
* @return void * @return void
*/ */
function showForm($msg=null) function showForm($msg=null)
{ {
if ($msg && $this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->ajaxErrorMsg($msg); if ($msg) {
$this->ajaxErrorMsg($msg);
} else {
$this->ajaxShowForm();
}
return; return;
} }
@ -302,7 +329,6 @@ class NewnoticeAction extends Action
* *
* @return void * @return void
*/ */
function showNoticeForm() function showNoticeForm()
{ {
$content = $this->trimmed('status_textarea'); $content = $this->trimmed('status_textarea');
@ -331,7 +357,6 @@ class NewnoticeAction extends Action
* *
* @todo maybe show some instructions? * @todo maybe show some instructions?
*/ */
function showPageNotice() function showPageNotice()
{ {
if ($this->msg) { if ($this->msg) {
@ -348,7 +373,6 @@ class NewnoticeAction extends Action
* *
* @return void * @return void
*/ */
function showNotice($notice) function showNotice($notice)
{ {
$nli = new NoticeListItem($notice, $this); $nli = new NoticeListItem($notice, $this);

View File

@ -60,6 +60,7 @@ class NudgeAction extends Action
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed trying to nudge a user without being logged in.
$this->clientError(_('Not logged in.')); $this->clientError(_('Not logged in.'));
return; return;
} }
@ -82,6 +83,7 @@ class NudgeAction extends Action
} }
if (!$other->email || !$other->emailnotifynudge) { if (!$other->email || !$other->emailnotifynudge) {
// TRANS: Client error displayed trying to nudge a user that cannot be nudged.
$this->clientError(_('This user doesn\'t allow nudges or hasn\'t confirmed or set their email address yet.')); $this->clientError(_('This user doesn\'t allow nudges or hasn\'t confirmed or set their email address yet.'));
return; return;
} }
@ -91,9 +93,11 @@ class NudgeAction extends Action
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8'); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title after sending a nudge.
$this->element('title', null, _('Nudge sent')); $this->element('title', null, _('Nudge sent'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
// TRANS: Confirmation text after sending a nudge.
$this->element('p', array('id' => 'nudge_response'), _('Nudge sent!')); $this->element('p', array('id' => 'nudge_response'), _('Nudge sent!'));
$this->elementEnd('body'); $this->elementEnd('body');
$this->elementEnd('html'); $this->elementEnd('html');
@ -129,4 +133,3 @@ class NudgeAction extends Action
return true; return true;
} }
} }

View File

@ -61,6 +61,8 @@ class OembedAction extends Action
$proxy_args = $r->map($path); $proxy_args = $r->map($path);
if (!$proxy_args) { if (!$proxy_args) {
// TRANS: Server error displayed in oEmbed action when path not found.
// TRANS: %s is a path.
$this->serverError(sprintf(_('"%s" not found.'),$path), 404); $this->serverError(sprintf(_('"%s" not found.'),$path), 404);
} }
$oembed=array(); $oembed=array();
@ -73,13 +75,17 @@ class OembedAction extends Action
$id = $proxy_args['notice']; $id = $proxy_args['notice'];
$notice = Notice::staticGet($id); $notice = Notice::staticGet($id);
if(empty($notice)){ if(empty($notice)){
// TRANS: Server error displayed in oEmbed action when notice not found.
// TRANS: %s is a notice.
$this->serverError(sprintf(_("Notice %s not found."),$id), 404); $this->serverError(sprintf(_("Notice %s not found."),$id), 404);
} }
$profile = $notice->getProfile(); $profile = $notice->getProfile();
if (empty($profile)) { if (empty($profile)) {
// TRANS: Server error displayed in oEmbed action when notice has not profile.
$this->serverError(_('Notice has no profile.'), 500); $this->serverError(_('Notice has no profile.'), 500);
} }
$authorname = $profile->getFancyName(); $authorname = $profile->getFancyName();
// TRANS: oEmbed title. %1$s is the author name, %2$s is the creation date.
$oembed['title'] = sprintf(_('%1$s\'s status on %2$s'), $oembed['title'] = sprintf(_('%1$s\'s status on %2$s'),
$authorname, $authorname,
common_exact_date($notice->created)); common_exact_date($notice->created));
@ -92,6 +98,8 @@ class OembedAction extends Action
$id = $proxy_args['attachment']; $id = $proxy_args['attachment'];
$attachment = File::staticGet($id); $attachment = File::staticGet($id);
if(empty($attachment)){ if(empty($attachment)){
// TRANS: Server error displayed in oEmbed action when attachment not found.
// TRANS: %d is an attachment ID.
$this->serverError(sprintf(_('Attachment %s not found.'),$id), 404); $this->serverError(sprintf(_('Attachment %s not found.'),$id), 404);
} }
if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){ if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){
@ -133,6 +141,8 @@ class OembedAction extends Action
if($attachment->title) $oembed['title']=$attachment->title; if($attachment->title) $oembed['title']=$attachment->title;
break; break;
default: default:
// TRANS: Server error displayed in oEmbed request when a path is not supported.
// TRANS: %s is a path.
$this->serverError(sprintf(_('"%s" not supported for oembed requests.'),$path), 501); $this->serverError(sprintf(_('"%s" not supported for oembed requests.'),$path), 501);
} }
switch($args['format']){ switch($args['format']){
@ -190,6 +200,7 @@ class OembedAction extends Action
} }
break; break;
default: default:
// TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
$this->serverError(_('Not a supported data format.'), 501); $this->serverError(_('Not a supported data format.'), 501);
break; break;
} }
@ -209,6 +220,7 @@ class OembedAction extends Action
} }
break; break;
default: default:
// TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
$this->serverError(_('Not a supported data format.'), 501); $this->serverError(_('Not a supported data format.'), 501);
break; break;
} }

View File

@ -63,8 +63,8 @@ class OpensearchAction extends Action
// TRANS: ShortName in the OpenSearch interface when trying to find users. // TRANS: ShortName in the OpenSearch interface when trying to find users.
$short_name = _('People Search'); $short_name = _('People Search');
} else { } else {
// TRANS: ShortName in the OpenSearch interface when trying to find notices.
$type = 'noticesearch'; $type = 'noticesearch';
// TRANS: ShortName in the OpenSearch interface when trying to find notices.
$short_name = _('Notice Search'); $short_name = _('Notice Search');
} }
header('Content-Type: application/opensearchdescription+xml'); header('Content-Type: application/opensearchdescription+xml');

View File

@ -50,12 +50,6 @@ var SN = { // StatusNet
Processing: 'processing', Processing: 'processing',
CommandResult: 'command_result', CommandResult: 'command_result',
FormNotice: 'form_notice', FormNotice: 'form_notice',
NoticeInReplyTo: 'notice_in-reply-to',
NoticeLat: 'notice_data-lat',
NoticeLon: 'notice_data-lon',
NoticeLocationId: 'notice_data-location_id',
NoticeLocationNs: 'notice_data-location_ns',
NoticeGeoName: 'notice_data-geo_name',
NoticeDataGeo: 'notice_data-geo', NoticeDataGeo: 'notice_data-geo',
NoticeDataGeoCookie: 'NoticeDataGeo', NoticeDataGeoCookie: 'NoticeDataGeo',
NoticeDataGeoSelected: 'notice_data-geo_selected', NoticeDataGeoSelected: 'notice_data-geo_selected',
@ -393,9 +387,24 @@ var SN = { // StatusNet
// New notice post was successful. If on our timeline, show it! // New notice post was successful. If on our timeline, show it!
var notice = document._importNode($('li', data)[0], true); var notice = document._importNode($('li', data)[0], true);
var notices = $('#notices_primary .notices:first'); var notices = $('#notices_primary .notices:first');
if (notices.length > 0 && SN.U.belongsOnTimeline(notice)) { var replyItem = form.closest('li.notice-reply');
if (replyItem.length > 0) {
// If this is an inline reply, insert it in place.
var id = $(notice).attr('id');
if ($("#"+id).length == 0) {
var parentNotice = replyItem.closest('li.notice');
replyItem.replaceWith(notice);
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
} else {
// Realtime came through before us...
replyItem.remove();
}
} else if (notices.length > 0 && SN.U.belongsOnTimeline(notice)) {
// Not a reply. If on our timeline, show it at the top!
if ($('#'+notice.id).length === 0) { if ($('#'+notice.id).length === 0) {
var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val(); var notice_irt_value = form.find('[name=inreplyto]').val();
var notice_irt = '#notices_primary #notice-'+notice_irt_value; var notice_irt = '#notices_primary #notice-'+notice_irt_value;
if($('body')[0].id == 'conversation') { if($('body')[0].id == 'conversation') {
if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) { if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
@ -412,10 +421,10 @@ var SN = { // StatusNet
SN.U.NoticeWithAttachment($('#'+notice.id)); SN.U.NoticeWithAttachment($('#'+notice.id));
SN.U.NoticeReplyTo($('#'+notice.id)); SN.U.NoticeReplyTo($('#'+notice.id));
} }
} } else {
else {
// Not on a timeline that this belongs on? // Not on a timeline that this belongs on?
// Just show a success message. // Just show a success message.
// @fixme inline
showFeedback('success', $('title', data).text()); showFeedback('success', $('title', data).text());
} }
} }
@ -559,105 +568,55 @@ var SN = { // StatusNet
// See if the form's already open... // See if the form's already open...
var replyForm = $('.notice-reply-form', list); var replyForm = $('.notice-reply-form', list);
if (replyForm.length == 0) {
var nextStep = function() {
// Override...?
replyForm.find('input[name=inreplyto]').val(id);
// Set focus...
var text = replyForm.find('textarea');
if (text.length == 0) {
throw "No textarea";
}
var replyto = '';
if (initialText) {
replyto = initialText + ' ';
}
text.val(replyto + text.val().replace(RegExp(replyto, 'i'), ''));
text.data('initialText', $.trim(initialText + ''));
text.focus();
if (text[0].setSelectionRange) {
var len = text.val().length;
text[0].setSelectionRange(len,len);
}
};
if (replyForm.length > 0) {
// Update the existing form...
nextStep();
} else {
// Remove placeholder if any // Remove placeholder if any
$('li.notice-reply-placeholder').remove(); $('li.notice-reply-placeholder').remove();
// Create the reply form entry at the end // Create the reply form entry at the end
var replyItem = $('li.notice-reply', list); var replyItem = $('li.notice-reply', list);
if (replyItem.length == 0) { if (replyItem.length == 0) {
replyItem = $('<li class="notice-reply">' + var url = $('#form_notice').attr('action');
'<form class="notice-reply-form" method="post">' + replyItem = $('<li class="notice-reply"></li>');
'<textarea name="status_textarea"></textarea>' + $.get(url, {ajax: 1}, function(data, textStatus, xhr) {
'<div class="controls">' + var formEl = document._importNode($('form', data)[0], true);
'<input type="hidden" name="token">' + replyItem.append(formEl);
'<input type="hidden" name="inreplyto">' + list.append(replyItem);
'<input type="submit" class="submit">' +
'</div>' +
'</form>' +
'</li>');
var baseForm = $('#form_notice'); var form = replyForm = $(formEl);
replyForm = replyItem.find('form'); SN.U.NoticeLocationAttach(form);
replyForm.attr('action', baseForm.attr('action')); SN.U.FormNoticeXHR(form);
replyForm.find('input[name="token"]').val(baseForm.find('input[name=token]').val()); SN.U.FormNoticeEnhancements(form);
replyForm.find('input[type="submit"]').val(SN.msg('reply_submit')); SN.U.NoticeDataAttach(form);
list.append(replyItem);
replyForm.find('textarea').blur(function() { nextStep();
var textarea = $(this);
var txt = $.trim(textarea.val());
if (txt == '' || txt == textarea.data('initialText')) {
// Nothing to say? Begone!
replyItem.remove();
if (list.find('li').length > 0) {
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
} else {
list.remove();
}
}
});
replyForm.submit(function(event) {
var form = replyForm;
$.ajax({
type: 'POST',
dataType: 'xml',
url: SN.U.RewriteAjaxAction(form.attr('action')),
data: form.serialize() + '&ajax=1',
beforeSend: function(xhr) {
form
.addClass(SN.C.S.Processing)
.find('.submit')
.addClass(SN.C.S.Disabled)
.attr(SN.C.S.Disabled, SN.C.S.Disabled)
.end()
.find('textarea')
.addClass(SN.C.S.Disabled)
.attr(SN.C.S.Disabled, SN.C.S.Disabled);
},
error: function (xhr, textStatus, errorThrown) {
alert(errorThrown || textStatus);
},
success: function(data, textStatus) {
var orig_li = $('li', data)[0];
if (orig_li) {
var li = document._importNode(orig_li, true);
var id = $(li).attr('id');
if ($("#"+id).length == 0) {
replyItem.replaceWith(li);
SN.U.NoticeInlineReplyPlaceholder(parentNotice);
} else {
// Realtime came through before us...
replyItem.remove();
}
}
}
});
event.preventDefault();
return false;
}); });
} }
} }
// Override...?
replyForm.find('input[name=inreplyto]').val(id);
// Set focus...
var text = replyForm.find('textarea');
if (text.length == 0) {
throw "No textarea";
}
var replyto = '';
if (initialText) {
replyto = initialText + ' ';
}
text.val(replyto + text.val().replace(RegExp(replyto, 'i'), ''));
text.data('initialText', $.trim(initialText + ''));
text.focus();
if (text[0].setSelectionRange) {
var len = text.val().length;
text[0].setSelectionRange(len,len);
}
}, },
/** /**
@ -972,12 +931,14 @@ var SN = { // StatusNet
var NLon = form.find('[name=lon]') var NLon = form.find('[name=lon]')
var NLNS = form.find('[name=location_ns]').val(); var NLNS = form.find('[name=location_ns]').val();
var NLID = form.find('[name=location_id]').val(); var NLID = form.find('[name=location_id]').val();
var NLN = $('#'+SN.C.S.NoticeGeoName).text(); // @fixme does this exist? var NLN = ''; // @fixme
var NDGe = form.find('[name=notice_data-geo]'); var NDGe = form.find('[name=notice_data-geo]');
var check = form.find('[name=notice_data-geo]');
var label = form.find('label.notice_data-geo');
function removeNoticeDataGeo(error) { function removeNoticeDataGeo(error) {
$('label[for='+SN.C.S.NoticeDataGeo+']') label
.attr('title', jQuery.trim($('label[for='+SN.C.S.NoticeDataGeo+']').text())) .attr('title', jQuery.trim(label.text()))
.removeClass('checked'); .removeClass('checked');
form.find('[name=lat]').val(''); form.find('[name=lat]').val('');
@ -989,15 +950,15 @@ var SN = { // StatusNet
$.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/' }); $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/' });
if (error) { if (error) {
$('.geo_status_wrapper').removeClass('success').addClass('error'); form.find('.geo_status_wrapper').removeClass('success').addClass('error');
$('.geo_status_wrapper .geo_status').text(error); form.find('.geo_status_wrapper .geo_status').text(error);
} else { } else {
$('.geo_status_wrapper').remove(); form.find('.geo_status_wrapper').remove();
} }
} }
function getJSONgeocodeURL(geocodeURL, data) { function getJSONgeocodeURL(geocodeURL, data) {
SN.U.NoticeGeoStatus('Looking up place name...'); SN.U.NoticeGeoStatus(form, 'Looking up place name...');
$.getJSON(geocodeURL, data, function(location) { $.getJSON(geocodeURL, data, function(location) {
var lns, lid; var lns, lid;
@ -1018,8 +979,8 @@ var SN = { // StatusNet
NLN_text = location.name; NLN_text = location.name;
} }
SN.U.NoticeGeoStatus(NLN_text, data.lat, data.lon, location.url); SN.U.NoticeGeoStatus(form, NLN_text, data.lat, data.lon, location.url);
$('label[for='+SN.C.S.NoticeDataGeo+']') label
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + NLN_text + ')'); .attr('title', NoticeDataGeo_text.ShareDisable + ' (' + NLN_text + ')');
form.find('[name=lat]').val(data.lat); form.find('[name=lat]').val(data.lat);
@ -1042,30 +1003,30 @@ var SN = { // StatusNet
}); });
} }
if (NDGe.length > 0) { if (check.length > 0) {
if ($.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') { if ($.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') {
NDGe.attr('checked', false); check.attr('checked', false);
} }
else { else {
NDGe.attr('checked', true); check.attr('checked', true);
} }
var NGW = $('#notice_data-geo_wrap'); var NGW = form.find('.notice_data-geo_wrap');
var geocodeURL = NGW.attr('title'); var geocodeURL = NGW.attr('title');
NGW.removeAttr('title'); NGW.removeAttr('title');
$('label[for='+SN.C.S.NoticeDataGeo+']') label
.attr('title', jQuery.trim($('label[for='+SN.C.S.NoticeDataGeo+']').text())); .attr('title', label.text());
NDGe.change(function() { check.change(function() {
if ($('#'+SN.C.S.NoticeDataGeo).attr('checked') === true || $.cookie(SN.C.S.NoticeDataGeoCookie) === null) { if (check.attr('checked') === true || $.cookie(SN.C.S.NoticeDataGeoCookie) === null) {
$('label[for='+SN.C.S.NoticeDataGeo+']') label
.attr('title', NoticeDataGeo_text.ShareDisable) .attr('title', NoticeDataGeo_text.ShareDisable)
.addClass('checked'); .addClass('checked');
if ($.cookie(SN.C.S.NoticeDataGeoCookie) === null || $.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') { if ($.cookie(SN.C.S.NoticeDataGeoCookie) === null || $.cookie(SN.C.S.NoticeDataGeoCookie) == 'disabled') {
if (navigator.geolocation) { if (navigator.geolocation) {
SN.U.NoticeGeoStatus('Requesting location from browser...'); SN.U.NoticeGeoStatus(form, 'Requesting location from browser...');
navigator.geolocation.getCurrentPosition( navigator.geolocation.getCurrentPosition(
function(position) { function(position) {
form.find('[name=lat]').val(position.coords.latitude); form.find('[name=lat]').val(position.coords.latitude);
@ -1109,8 +1070,8 @@ var SN = { // StatusNet
} }
else { else {
removeNoticeDataGeo(); removeNoticeDataGeo();
$('#'+SN.C.S.NoticeDataGeo).remove(); check.remove();
$('label[for='+SN.C.S.NoticeDataGeo+']').remove(); label.remove();
} }
} }
} }
@ -1123,8 +1084,8 @@ var SN = { // StatusNet
form.find('[name=location_id]').val(cookieValue.NLID); form.find('[name=location_id]').val(cookieValue.NLID);
form.find('[name=notice_data-geo]').attr('checked', cookieValue.NDG); form.find('[name=notice_data-geo]').attr('checked', cookieValue.NDG);
SN.U.NoticeGeoStatus(cookieValue.NLN, cookieValue.NLat, cookieValue.NLon, cookieValue.NLNU); SN.U.NoticeGeoStatus(form, cookieValue.NLN, cookieValue.NLat, cookieValue.NLon, cookieValue.NLNU);
$('label[for='+SN.C.S.NoticeDataGeo+']') label
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')') .attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
.addClass('checked'); .addClass('checked');
} }
@ -1139,19 +1100,19 @@ var SN = { // StatusNet
/** /**
* Create or update a geolocation status widget in this notice posting form. * Create or update a geolocation status widget in this notice posting form.
* *
* @param {jQuery} form
* @param {String} status * @param {String} status
* @param {String} lat (optional) * @param {String} lat (optional)
* @param {String} lon (optional) * @param {String} lon (optional)
* @param {String} url (optional) * @param {String} url (optional)
*/ */
NoticeGeoStatus: function(status, lat, lon, url) NoticeGeoStatus: function(form, status, lat, lon, url)
{ {
var form = $('#form_notice');
var wrapper = form.find('.geo_status_wrapper'); var wrapper = form.find('.geo_status_wrapper');
if (wrapper.length == 0) { if (wrapper.length == 0) {
wrapper = $('<div class="'+SN.C.S.Success+' geo_status_wrapper"><button class="close" style="float:right">&#215;</button><div class="geo_status"></div></div>'); wrapper = $('<div class="'+SN.C.S.Success+' geo_status_wrapper"><button class="close" style="float:right">&#215;</button><div class="geo_status"></div></div>');
wrapper.find('button.close').click(function() { wrapper.find('button.close').click(function() {
$('#'+SN.C.S.NoticeDataGeo).removeAttr('checked').change(); form.find('[name=notice_data-geo]').removeAttr('checked').change();
}); });
form.append(wrapper); form.append(wrapper);
} }

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -127,7 +127,7 @@ class ActivityStreamJSONDocument
function addLink($url = null, $rel = null, $mediaType = null) function addLink($url = null, $rel = null, $mediaType = null)
{ {
$link = new ActivityStreamsLink($url, $rel, $mediaType); $link = new ActivityStreamsLink($url, $rel, $mediaType);
$this->doc['link'][] = $link->asArray(); $this->doc['links'][] = $link->asArray();
} }
/* /*

View File

@ -48,31 +48,26 @@ require_once INSTALLDIR.'/lib/form.php';
* *
* @see HTMLOutputter * @see HTMLOutputter
*/ */
class NoticeForm extends Form class NoticeForm extends Form
{ {
/** /**
* Current action, used for returning to this page. * Current action, used for returning to this page.
*/ */
var $action = null; var $action = null;
/** /**
* Pre-filled content of the form * Pre-filled content of the form
*/ */
var $content = null; var $content = null;
/** /**
* The current user * The current user
*/ */
var $user = null; var $user = null;
/** /**
* The notice being replied to * The notice being replied to
*/ */
var $inreplyto = null; var $inreplyto = null;
/** /**
@ -91,9 +86,10 @@ class NoticeForm extends Form
* @param string $action action to return to, if any * @param string $action action to return to, if any
* @param string $content content to pre-fill * @param string $content content to pre-fill
*/ */
function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null, $lat=null, $lon=null, $location_id=null, $location_ns=null) function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null, $lat=null, $lon=null, $location_id=null, $location_ns=null)
{ {
$this->id_suffix = time();
parent::__construct($out); parent::__construct($out);
$this->action = $action; $this->action = $action;
@ -125,7 +121,7 @@ class NoticeForm extends Form
function id() function id()
{ {
return 'form_notice'; return 'form_notice_' . $this->id_suffix;
} }
/** /**
@ -157,6 +153,7 @@ class NoticeForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form legend for notice form.
$this->out->element('legend', null, _('Send a notice')); $this->out->element('legend', null, _('Send a notice'));
} }
@ -165,12 +162,12 @@ class NoticeForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
if (Event::handle('StartShowNoticeFormData', array($this))) { if (Event::handle('StartShowNoticeFormData', array($this))) {
$this->out->element('label', array('for' => 'notice_data-text', $this->out->element('label', array('for' => 'notice_data-text',
'id' => 'notice_data-text-label'), 'id' => 'notice_data-text-label'),
// TRANS: Title for notice label. %s is the user's nickname.
sprintf(_('What\'s up, %s?'), $this->user->nickname)); sprintf(_('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size // XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text', $this->out->element('textarea', array('id' => 'notice_data-text',
@ -182,18 +179,20 @@ class NoticeForm extends Form
$contentLimit = Notice::maxContent(); $contentLimit = Notice::maxContent();
if ($contentLimit > 0) { if ($contentLimit > 0) {
$this->out->element('span', $this->out->element('span',
array('class' => 'count'), array('class' => 'count'),
$contentLimit); $contentLimit);
} }
if (common_config('attachments', 'uploads')) { if (common_config('attachments', 'uploads')) {
$this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
// TRANS: Input label in notice form for adding an attachment.
$this->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); $this->out->element('label', array('for' => 'notice_data-attach'),_('Attach'));
$this->out->element('input', array('id' => 'notice_data-attach', $this->out->element('input', array('id' => 'notice_data-attach',
'type' => 'file', 'type' => 'file',
'name' => 'attach', 'name' => 'attach',
'title' => _('Attach a file'))); // TRANS: Title for input field to attach a file to a notice.
'title' => _('Attach a file.')));
} }
if ($this->action) { if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto'); $this->out->hidden('notice_return-to', $this->action, 'returnto');
@ -206,13 +205,32 @@ class NoticeForm extends Form
$this->out->hidden('notice_data-location_id', empty($this->location_id) ? (empty($this->profile->location_id) ? null : $this->profile->location_id) : $this->location_id, 'location_id'); $this->out->hidden('notice_data-location_id', empty($this->location_id) ? (empty($this->profile->location_id) ? null : $this->profile->location_id) : $this->location_id, 'location_id');
$this->out->hidden('notice_data-location_ns', empty($this->location_ns) ? (empty($this->profile->location_ns) ? null : $this->profile->location_ns) : $this->location_ns, 'location_ns'); $this->out->hidden('notice_data-location_ns', empty($this->location_ns) ? (empty($this->profile->location_ns) ? null : $this->profile->location_ns) : $this->location_ns, 'location_ns');
$this->out->elementStart('div', array('id' => 'notice_data-geo_wrap', $this->out->elementStart('div', array('class' => 'notice_data-geo_wrap',
'title' => common_local_url('geocode'))); 'title' => common_local_url('geocode')));
$this->out->checkbox('notice_data-geo', _('Share my location'), true);
// @fixme checkbox method allows no way to change the id without changing the name
//$this->out->checkbox('notice_data-geo', _('Share my location'), true);
$this->out->element('input', array(
'name' => 'notice_data-geo',
'type' => 'checkbox',
'class' => 'checkbox',
'id' => $this->id() . '-notice_data-geo',
'checked' => true, // ?
));
$this->out->text(' ');
$this->out->element('label', array('class' => 'notice_data-geo',
'for' => $this->id() . '-notice_data-geo'),
// TRANS: Field label to add location to a notice.
_('Share my location'));
$this->out->elementEnd('div'); $this->out->elementEnd('div');
// TRANS: Text to not share location for a notice in notice form.
$share_disable_text = _('Do not share my location');
// TRANS: Timeout error text for location retrieval in notice form.
$error_timeout_text = _('Sorry, retrieving your geo location is taking longer than expected, please try again later');
$this->out->inlineScript(' var NoticeDataGeo_text = {'. $this->out->inlineScript(' var NoticeDataGeo_text = {'.
'ShareDisable: ' .json_encode(_('Do not share my location')).','. 'ShareDisable: ' .json_encode($share_disable_text).','.
'ErrorTimeout: ' .json_encode(_('Sorry, retrieving your geo location is taking longer than expected, please try again later')). 'ErrorTimeout: ' .json_encode($error_timeout_text).
'}'); '}');
} }
@ -232,6 +250,7 @@ class NoticeForm extends Form
'class' => 'submit', 'class' => 'submit',
'name' => 'status_submit', 'name' => 'status_submit',
'type' => 'submit', 'type' => 'submit',
'value' => _m('Send button for sending notice', 'Send'))); // TRANS: Button text for sending notice.
'value' => _m('BUTTON', 'Send')));
} }
} }

View File

@ -19,7 +19,7 @@ display:none;
.realtime-popup #form_notice label[for=notice_data-attach], .realtime-popup #form_notice label[for=notice_data-attach],
.realtime-popup #form_notice #notice_data-attach, .realtime-popup #form_notice #notice_data-attach,
.realtime-popup #form_notice label[for=notice_data-geo] { .realtime-popup #form_notice label.notice_data-geo {
top:0; top:0;
} }

View File

@ -563,8 +563,10 @@ border-width:1px;
border-style:solid; border-style:solid;
} }
.form_notice { #header .form_notice {
width:45%; width:45%;
}
.form_notice {
float:left; float:left;
position:relative; position:relative;
line-height:1; line-height:1;
@ -664,8 +666,8 @@ float:right;
font-size:0.8em; font-size:0.8em;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
position:absolute; position:absolute;
top:25px; top:25px;
right:4px; right:4px;
@ -675,10 +677,10 @@ width:16px;
height:16px; height:16px;
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
visibility:hidden; visibility:hidden;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;
@ -1120,7 +1122,6 @@ border-top-style:solid;
.threaded-replies .notice-reply { .threaded-replies .notice-reply {
margin: 8px; margin: 8px;
} }
.threaded-replies .notice-reply textarea,
.threaded-replies .notice-reply-placeholder input.placeholder { .threaded-replies .notice-reply-placeholder input.placeholder {
margin-left: 0; margin-left: 0;
width: 95%; width: 95%;

View File

@ -524,8 +524,8 @@ float:right;
font-size:0.8em; font-size:0.8em;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
position:absolute; position:absolute;
top:25px; top:25px;
right:4px; right:4px;
@ -535,10 +535,10 @@ width:16px;
height:16px; height:16px;
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
visibility:hidden; visibility:hidden;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;

View File

@ -118,10 +118,10 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
text-shadow:none; text-shadow:none;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
@ -216,7 +216,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,

View File

@ -119,8 +119,8 @@ address {
top: 27px; top: 27px;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
top: 52px; top: 52px;
} }

View File

@ -69,9 +69,9 @@ line-height:auto;
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px;
} }
.form_notice #notice_data-geo_wrap label.checked { .form_notice .notice_data-geo_wrap label.checked {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px;
} }

View File

@ -167,8 +167,8 @@ address {
right: 86px; right: 86px;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
top: 52px; top: 52px;
right: 86px; right: 86px;
} }
@ -599,7 +599,7 @@ padding-right:0;
top: 3px !important; top: 3px !important;
} }
.realtime-popup .form_notice #notice_data-geo_wrap label, .realtime-popup .form_notice #notice_data-geo_wrap input { .realtime-popup .form_notice .notice_data-geo_wrap label, .realtime-popup .form_notice .notice_data-geo_wrap input {
right: 8px; right: 8px;
top: 3px !important; top: 3px !important;
} }

View File

@ -73,9 +73,9 @@ line-height:auto;
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px;
} }
.form_notice #notice_data-geo_wrap label.checked { .form_notice .notice_data-geo_wrap label.checked {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px;
} }

View File

@ -570,7 +570,7 @@ font-size:0.8em;
float:left; float:left;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
position:absolute; position:absolute;
top:25px; top:25px;
right:4px; right:4px;
@ -580,10 +580,10 @@ width:16px;
height:16px; height:16px;
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
display:none; display:none;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;
@ -1636,7 +1636,7 @@ button.close,
.entity_silence input.submit, .entity_silence input.submit,
.entity_delete input.submit, .entity_delete input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,
@ -1746,10 +1746,10 @@ background-position:0 47%;
.form_notice a#notice_data-geo_name { .form_notice a#notice_data-geo_name {
background-position:0 -1711px; background-position:0 -1711px;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }

View File

@ -116,10 +116,10 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
text-shadow:none; text-shadow:none;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
@ -196,7 +196,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,

View File

@ -117,10 +117,10 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
text-shadow:none; text-shadow:none;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
@ -197,7 +197,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,

View File

@ -271,7 +271,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,
@ -286,10 +286,10 @@ button.minimize,
background-color:transparent; background-color:transparent;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
.form_notice label[for=notice_data-attach] { .form_notice label[for=notice_data-attach] {
@ -1005,8 +1005,8 @@ float:right;
font-size:0.8em; font-size:0.8em;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
position:absolute; position:absolute;
top:3.25em; top:3.25em;
right:0.4em; right:0.4em;
@ -1016,10 +1016,10 @@ width:1.6em;
height:1.6em; height:1.6em;
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
visibility:hidden; visibility:hidden;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;

View File

@ -48,11 +48,11 @@ padding:0 4px;
.form_notice #notice_data-attach { .form_notice #notice_data-attach {
filter: alpha(opacity=0); filter: alpha(opacity=0);
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
background:transparent url(../images/icons/icons-01.png) no-repeat background:transparent url(../images/icons/icons-01.png) no-repeat
0 -1780px; 0 -1780px;
} }
.form_notice #notice_data-geo_wrap label.checked { .form_notice .notice_data-geo_wrap label.checked {
background:transparent url(../images/icons/icons-01.png) no-repeat background:transparent url(../images/icons/icons-01.png) no-repeat
0 -1846px; 0 -1846px;
} }

View File

@ -519,8 +519,8 @@ float:right;
font-size:0.8em; font-size:0.8em;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
position:absolute; position:absolute;
top:25px; top:25px;
right:4px; right:4px;
@ -530,10 +530,10 @@ width:16px;
height:16px; height:16px;
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
visibility:hidden; visibility:hidden;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;

View File

@ -84,10 +84,10 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
text-shadow:none; text-shadow:none;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
@ -233,7 +233,7 @@ button.close,
.entity_silence input.submit, .entity_silence input.submit,
.entity_delete input.submit, .entity_delete input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,

View File

@ -317,8 +317,8 @@ address .poweredby {
font-size:0.8em; font-size:0.8em;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
position:absolute; position:absolute;
top: 55px; top: 55px;
right: 88px; right: 88px;
@ -329,11 +329,11 @@ address .poweredby {
display:block; display:block;
} }
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
visibility:hidden; visibility:hidden;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
font-weight:normal; font-weight:normal;
font-size:1em; font-size:1em;
margin-bottom:0; margin-bottom:0;
@ -1728,7 +1728,7 @@ body.realtime-popup {
right: 70px; right: 70px;
} }
.realtime-popup .form_notice #notice_data-geo_wrap label, .form_notice #notice_data-geo_wrap input { .realtime-popup .form_notice .notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap input {
right: 2px; right: 2px;
} }
@ -1771,7 +1771,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,
@ -1924,10 +1924,10 @@ background-position:0 -1054px;
.form_notice label[for=notice_data-attach] { .form_notice label[for=notice_data-attach] {
background-position: 0 -328px; background-position: 0 -328px;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position: 0 -1780px; background-position: 0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position: 0 -1846px; background-position: 0 -1846px;
} }

View File

@ -69,11 +69,11 @@ line-height:auto;
background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -328px; background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -328px;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -1780px; background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -1780px;
} }
.form_notice #notice_data-geo_wrap label.checked { .form_notice .notice_data-geo_wrap label.checked {
background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -1846px; background:transparent url(../images/icons/icons-01.gif) no-repeat 0 -1846px;
} }

View File

@ -236,8 +236,8 @@ h6 {font-size: 1em;}
right: 86px; right: 86px;
} }
.form_notice #notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap label,
.form_notice #notice_data-geo_wrap input { .form_notice .notice_data-geo_wrap input {
top: 50px; top: 50px;
right: 86px; right: 86px;
} }

View File

@ -71,10 +71,10 @@ line-height:auto;
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -328px;
} }
.form_notice #notice_data-geo_wrap label { .form_notice .notice_data-geo_wrap label {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1780px;
} }
.form_notice #notice_data-geo_wrap label.checked { .form_notice .notice_data-geo_wrap label.checked {
background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px; background:transparent url(../../rebase/images/icons/icons-01.gif) no-repeat 0 -1846px;
} }

View File

@ -294,10 +294,10 @@ input.submit:focus {
text-shadow:none; text-shadow:none;
} }
.form_notice label[for=notice_data-geo] { .form_notice label.notice_data-geo {
background-position:0 -1780px; background-position:0 -1780px;
} }
.form_notice label[for=notice_data-geo].checked { .form_notice label.notice_data-geo.checked {
background-position:0 -1846px; background-position:0 -1846px;
} }
@ -373,7 +373,7 @@ button.close,
.entity_role_administrator input.submit, .entity_role_administrator input.submit,
.entity_role_moderator input.submit, .entity_role_moderator input.submit,
.notice-options .repeated, .notice-options .repeated,
.form_notice label[for=notice_data-geo], .form_notice label.notice_data-geo,
button.minimize, button.minimize,
.form_reset_key input.submit, .form_reset_key input.submit,
.entity_clear input.submit, .entity_clear input.submit,