Improve labels for MJML settings #47
This commit is contained in:
parent
94b746d91e
commit
39626eef9f
3 changed files with 33 additions and 9 deletions
|
@ -39,6 +39,13 @@ $page->navigation();
|
||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
<h3 class="ui header"><?= __('Improved') ?></h3>
|
<h3 class="ui header"><?= __('Improved') ?></h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<?php
|
||||||
|
/** TRANSLATORS: Changelog: Improved */
|
||||||
|
echo __('MJML settings page');
|
||||||
|
?>
|
||||||
|
<a href="https://github.com/grandeljay/wishthis/issues/47" target="_blank">#47</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<?php
|
<?php
|
||||||
/** TRANSLATORS: Changelog: Improved */
|
/** TRANSLATORS: Changelog: Improved */
|
||||||
|
|
|
@ -13,9 +13,9 @@ $page->header();
|
||||||
$page->bodyStart();
|
$page->bodyStart();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
|
|
||||||
if (isset($_POST['mjml_api'], $_POST['api_key'], $_POST['api_secret'])) {
|
if (isset($_POST['mjml_api'], $_POST['api_application_id'], $_POST['mjml_api_secret_key'])) {
|
||||||
$options->setOption('mjml_api_key', $_POST['api_key']);
|
$options->setOption('mjml_api_application_id', $_POST['api_application_id']);
|
||||||
$options->setOption('mjml_api_secret', $_POST['api_secret']);
|
$options->setOption('mjml_api_secret_key', $_POST['mjml_api_secret_key']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -30,20 +30,20 @@ if (isset($_POST['mjml_api'], $_POST['api_key'], $_POST['api_secret'])) {
|
||||||
<h3 class="ui header"><?= __('API') ?></h3>
|
<h3 class="ui header"><?= __('API') ?></h3>
|
||||||
<form class="ui form" method="POST">
|
<form class="ui form" method="POST">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label><?= __('Key') ?></label>
|
<label><?= __('Application ID') ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="api_key"
|
name="api_application_id"
|
||||||
placeholder="01234567-89ab-cdef-0123-456789abcdef"
|
placeholder="01234567-89ab-cdef-0123-456789abcdef"
|
||||||
value="<?= $options->getOption('mjml_api_key'); ?>"
|
value="<?= $options->getOption('mjml_api_application_id'); ?>"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label><?= __('Secret') ?></label>
|
<label><?= __('Secret Key') ?></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="api_secret"
|
name="mjml_api_secret_key"
|
||||||
placeholder="01234567-89ab-cdef-0123-456789abcdef"
|
placeholder="01234567-89ab-cdef-0123-456789abcdef"
|
||||||
value="<?= $options->getOption('mjml_api_secret'); ?>"
|
value="<?= $options->getOption('mjml_api_secret_key'); ?>"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,20 @@
|
||||||
|
/**
|
||||||
|
* Options
|
||||||
|
*/
|
||||||
|
UPDATE
|
||||||
|
`options`
|
||||||
|
SET
|
||||||
|
`key` = 'mjml_api_application_id'
|
||||||
|
WHERE
|
||||||
|
`key` = 'mjml_api_key';
|
||||||
|
|
||||||
|
UPDATE
|
||||||
|
`options`
|
||||||
|
SET
|
||||||
|
`key` = 'mjml_api_secret_key'
|
||||||
|
WHERE
|
||||||
|
`key` = 'mjml_api_secret';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sessions
|
* Sessions
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue