-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: Allow user to accept to be contacted
- Loading branch information
1 parent
bbbc5cb
commit eabce91
Showing
15 changed files
with
238 additions
and
75 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/migrations/Migration202403100001AddAcceptContactToUsers.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace flusio\migrations; | ||
|
||
class Migration202403100001AddAcceptContactToUsers | ||
{ | ||
public function migrate(): bool | ||
{ | ||
$database = \Minz\Database::get(); | ||
|
||
$database->exec(<<<'SQL' | ||
ALTER TABLE users | ||
ADD COLUMN accept_contact BOOLEAN NOT NULL DEFAULT false; | ||
SQL); | ||
|
||
return true; | ||
} | ||
|
||
public function rollback(): bool | ||
{ | ||
$database = \Minz\Database::get(); | ||
|
||
$database->exec(<<<'SQL' | ||
ALTER TABLE users | ||
DROP COLUMN accept_contact; | ||
SQL); | ||
|
||
return true; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/migrations/Migration202403100002SetAutoloadModalToShowcaseContact.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace flusio\migrations; | ||
|
||
class Migration202403100002SetAutoloadModalToShowcaseContact | ||
{ | ||
public function migrate(): bool | ||
{ | ||
$database = \Minz\Database::get(); | ||
|
||
$database->exec(<<<'SQL' | ||
UPDATE users SET autoload_modal = 'showcase contact'; | ||
SQL); | ||
|
||
return true; | ||
} | ||
|
||
public function rollback(): bool | ||
{ | ||
$database = \Minz\Database::get(); | ||
|
||
$database->exec(<<<'SQL' | ||
UPDATE users SET autoload_modal = ''; | ||
SQL); | ||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
$this->layout('base.phtml', [ | ||
'title' => _('You can help to improve the service'), | ||
'canonical' => url_full('showcase', ['id' => 'contact']), | ||
'modal_enabled' => true, | ||
]); | ||
?> | ||
|
||
<div class="section section--small"> | ||
<div class="section__title"> | ||
<h1><?= _('You can help to improve the service') ?></h1> | ||
</div> | ||
|
||
<p> | ||
<?= _f('To help us improve %s, you can now accept to be contacted by email.', $brand) ?> | ||
</p> | ||
|
||
<p class="text--centered"> | ||
<a href="<?= url('preferences') ?>" class="anchor--action" data-turbo-frame="_top"> | ||
<?= _('Go to your preferences') ?> | ||
</a> | ||
</p> | ||
|
||
<form method="get" action="" data-turbo-frame="_top"> | ||
<div class="form__actions"> | ||
<button type="submit" class="button--ghost"> | ||
<?= _('No thanks!') ?> | ||
</button> | ||
</div> | ||
</form> | ||
</div> |