66 * @property string mobilePhoneField
77 * @property string sms_from
88 */
9- class Sms77 extends Process implements ConfigurableModule {
9+ class Seven extends Process implements ConfigurableModule {
1010 static protected $defaults = array(
1111 'apiKey' => '',
1212 'debug' => 0,
@@ -50,7 +50,7 @@ class Sms77 extends Process implements ConfigurableModule {
5050 $field->attr('required', 'required');
5151 $field->attr('value', $cfg['apiKey']);
5252 $field->description =
53- $this->_('Required for sending - get yours @ https://www.sms77 .io');
53+ $this->_('Required for sending - get yours @ https://www.seven .io');
5454 $field->label = $this->_('API Key');
5555 $fieldset->append($field);
5656
@@ -113,13 +113,13 @@ class Sms77 extends Process implements ConfigurableModule {
113113
114114 $info = self::getModuleInfo();
115115
116- $this->config->js('Sms77 ', array(
116+ $this->config->js('Seven ', array(
117117 'prompt_text' => $this->_('Please enter the message content.'),
118118 'text_missing' => $this->_('Not sending SMS: Missing text!'),
119119 ));
120120
121121 $this->config->scripts->add(
122- $this->config->urls->Sms77 . 'Sms77 .js?v=' . $info['version']);
122+ $this->config->urls->Seven . 'Seven .js?v=' . $info['version']);
123123
124124 $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'buildForm');
125125
@@ -132,31 +132,31 @@ class Sms77 extends Process implements ConfigurableModule {
132132
133133 public static function getModuleInfo() {
134134 return array(
135- 'author' => 'sms77 e.K. , www.sms77 .io',
135+ 'author' => 'seven communications GmbH & Co. KG , www.seven .io',
136136 'autoload' => true,
137- 'href' => 'https://github.com/sms77io /ProcessWire',
137+ 'href' => 'https://github.com/seven-io /ProcessWire',
138138 'nav' => array(
139139 array(
140140 'label' => __('Bulk SMS'),
141141 'url' => 'bulk-sms',
142142 ),
143143 ),
144144 'page' => array(
145- 'name' => 'sms77 ',
146- 'title' => 'Sms77 ',
145+ 'name' => 'seven ',
146+ 'title' => 'Seven ',
147147 ),
148148 'singular' => true,
149- 'summary' => __('Send SMS via Sms77 .io.'),
150- 'title' => 'Sms77 ',
151- 'version' => 130 ,
149+ 'summary' => __('Send SMS via seven .io.'),
150+ 'title' => 'Seven ',
151+ 'version' => 200 ,
152152 );
153153 }
154154
155155 public function execute() {
156156 return '
157157 <dl class="uk-description-list uk-description-list-divider">
158158 <dt>
159- <a href="/processwire/sms77 /bulk-sms/">
159+ <a href="/processwire/seven /bulk-sms/">
160160 <i style="float: right;" class="fa fa-3x fa-fw fa-envelope ui-priority-secondary"></i>
161161 ' . $this->_('Bulk SMS') . '
162162 </a>
@@ -254,7 +254,7 @@ class Sms77 extends Process implements ConfigurableModule {
254254 $res = $http->setHeaders(array(
255255 'SentWith' => 'ProcessWire',
256256 'X-Api-Key' => $this->apiKey,
257- ))->post('https://gateway.sms77 .io/api/' . $endpoint, array_merge($payload, array(
257+ ))->post('https://gateway.seven .io/api/' . $endpoint, array_merge($payload, array(
258258 'debug' => $this->debug,
259259 'json' => 1,
260260 )));
@@ -272,7 +272,7 @@ class Sms77 extends Process implements ConfigurableModule {
272272
273273 public function buildForm(HookEvent $e) {
274274 $field = $this->modules->get('InputfieldHidden');
275- $field->attr('name', 'sms77_text ');
275+ $field->attr('name', 'seven_text ');
276276 $field->attr('value', '');
277277
278278 $e->return->add($field);
@@ -288,18 +288,18 @@ class Sms77 extends Process implements ConfigurableModule {
288288 $e->return = array_merge($actions, array('sms' => array(
289289 'icon' => 'envelope',
290290 'label' => $this->_('SMS'),
291- 'value' => 'sms77_sms_user ',
291+ 'value' => 'seven_sms_user ',
292292 )));
293293 }
294294
295295 public function processSubmitAction(HookEvent $e) {
296- if ('sms77_sms_user ' !== $e->arguments(0)) return;
296+ if ('seven_sms_user ' !== $e->arguments(0)) return;
297297
298298 $page = $e->process->getPage();
299299 if (!$page instanceof User) return;
300300
301301 $from = $this->sms_from;
302- $text = $e->process->input->post->get('sms77_text ');
302+ $text = $e->process->input->post->get('seven_text ');
303303 $to = $e->user->get($this->mobilePhoneField);
304304
305305 foreach (array('email') as $key) $text = str_replace(
0 commit comments