Skip to content

Commit 51ac181

Browse files
committed
rebranding
1 parent 4f6318f commit 51ac181

File tree

5 files changed

+37
-35
lines changed

5 files changed

+37
-35
lines changed

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

3-
Copyright (c) 2021-present sms77 e.K.
3+
Copyright (c) 2021-2022 sms77 e.K.
4+
Copyright (c) 2023-present seven communications GmbH & Co. KG
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
![sms77 Logo](https://www.sms77.io/wp-content/uploads/2019/07/sms77-Logo-400x79.png "sms77 Logo")
1+
![](https://www.seven.io/wp-content/uploads/Logo.svg "seven Logo")
2+
23
# Official module for [ProcessWire](https://processwire.com/)
34

45
## Installation
@@ -7,7 +8,7 @@
78
2. Add mobile phone field `Admin->Setup->Fields->Add New` - see [screenshot](_screenshots/add_new_field.png)
89
3. Go to `Admin->Setup->Templates`, press `Filters` and set `Show system templates?` to `yes`
910
4. Select `user` template, add `mobile_phone` field and press `Save` - see [screenshot](_screenshots/edit_user_template.png)
10-
5. Go to `Admin->Modules->Sms77`, enter your `API Key` and press `Submit`
11+
5. Go to `Admin->Modules->Seven`, enter your `API Key` and press `Submit`
1112

1213
### Features
1314

@@ -24,6 +25,6 @@ Usage: `{{email}}` resolves to the users email address
2425

2526
##### Support
2627

27-
Need help? Feel free to [contact us](https://www.sms77.io/en/company/contact/).
28+
Need help? Feel free to [contact us](https://www.seven.io/en/company/contact/).
2829

2930
[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)

Seven.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$(function () {
2+
$('#ProcessPageEdit').submit(function(e) {
3+
if ('seven_sms_user' !== this.elements.namedItem('_after_submit_action').value)
4+
return;
5+
6+
e.preventDefault();
7+
8+
var $text = this.elements.namedItem('seven_text');
9+
$text.value = prompt(ProcessWire.config.Seven.prompt_text);
10+
11+
if ($text.value) this.submit();
12+
else alert(ProcessWire.config.Seven.text_missing);
13+
});
14+
});

Sms77.module renamed to Seven.module

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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(

Sms77.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)