X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsmssettings.php;h=751495d57aad809a548ad990a9a63bc251073ddc;hb=5fdcd88176010a72b6a157170784a8aad7bf4131;hp=922bab9a4e3bc2ccec5bd15ad9df102d19e376ff;hpb=590cc0c9a41206ba58c9333b4e9ef8931285f7e4;p=quix0rs-gnu-social.git diff --git a/actions/smssettings.php b/actions/smssettings.php index 922bab9a4e..751495d57a 100644 --- a/actions/smssettings.php +++ b/actions/smssettings.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -37,10 +37,10 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php'; * Settings for SMS * * @category Settings - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see SettingsAction */ @@ -55,7 +55,7 @@ class SmssettingsAction extends ConnectSettingsAction function title() { - return _('SMS Settings'); + return _('SMS settings'); } /** @@ -69,6 +69,12 @@ class SmssettingsAction extends ConnectSettingsAction return _('You can receive SMS messages through email from %%site.name%%.'); } + function showScripts() + { + parent::showScripts(); + $this->autofocus('sms'); + } + /** * Content area of the page * @@ -80,6 +86,12 @@ class SmssettingsAction extends ConnectSettingsAction function showContent() { + if (!common_config('sms', 'enabled')) { + $this->element('div', array('class' => 'error'), + _('SMS is not available.')); + return; + } + $user = common_current_user(); $this->elementStart('form', array('method' => 'post', @@ -123,7 +135,7 @@ class SmssettingsAction extends ConnectSettingsAction } else { $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('sms', _('SMS Phone number'), + $this->input('sms', _('SMS phone number'), ($this->arg('sms')) ? $this->arg('sms') : null, _('Phone number, no punctuation or spaces, '. 'with area code'));