mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Implement test SMS sending
This commit is contained in:
parent
85c9b633ec
commit
b44175aba2
5 changed files with 104 additions and 13 deletions
|
|
@ -9,7 +9,7 @@
|
|||
$(this).attr("disabled", "disabled");
|
||||
var ajax_data = {
|
||||
recipient_name: $("#advanced_mailer_recipient_name").val(),
|
||||
recipient_email: $("#advanced_mailer_recipient_email").val(),
|
||||
recipient_email: $("#advanced_mailer_recipient_email").val()
|
||||
};
|
||||
$.exec_json(
|
||||
"advanced_mailer.procAdvanced_mailerAdminTestSendMail", ajax_data,
|
||||
|
|
@ -24,6 +24,28 @@
|
|||
);
|
||||
});
|
||||
|
||||
$("#advanced_mailer_test_send_sms").click(function(event) {
|
||||
event.preventDefault();
|
||||
$("#advanced_mailer_test_result").text("");
|
||||
$(this).attr("disabled", "disabled");
|
||||
var ajax_data = {
|
||||
recipient_number: $("#advanced_mailer_recipient_number").val(),
|
||||
country_code: $("#advanced_mailer_country_code").val(),
|
||||
content: $("#advanced_mailer_content").val()
|
||||
};
|
||||
$.exec_json(
|
||||
"advanced_mailer.procAdvanced_mailerAdminTestSendSMS", ajax_data,
|
||||
function(response) {
|
||||
$("#advanced_mailer_test_result").html(response.test_result);
|
||||
$("#advanced_mailer_test_send").removeAttr("disabled");
|
||||
},
|
||||
function(response) {
|
||||
$("#advanced_mailer_test_result").text("AJAX Error");
|
||||
$("#advanced_mailer_test_send").removeAttr("disabled");
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
} (jQuery));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<form class="x_form-horizontal" action="./" method="post" id="advanced_mailer">
|
||||
<input type="hidden" name="module" value="advanced_mailer" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminTestSendMail" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminTestSendSMS" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
|
|
@ -13,19 +13,22 @@
|
|||
|
||||
<section class="section">
|
||||
|
||||
<h2>{$lang->cmd_advanced_mailer_mail_test}</h2>
|
||||
<h2>{$lang->cmd_advanced_mailer_sms_test}</h2>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="advanced_mailer_recipient_name">{$lang->cmd_advanced_mailer_recipient_name}</label>
|
||||
<label class="x_control-label" for="advanced_mailer_recipient_number">{$lang->cmd_advanced_mailer_recipient_number}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="advanced_mailer_recipient_name" value="{Context::get('logged_info')->nick_name}" />
|
||||
<input type="text" id="advanced_mailer_recipient_number" value="{config('sms.default_from')}" />
|
||||
{$lang->cmd_advanced_mailer_country_code}
|
||||
<input type="number" id="advanced_mailer_country_code" value="" />
|
||||
<p class="x_help-block">{$lang->cmd_advanced_mailer_country_code_help}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="advanced_mailer_recipient_email">{$lang->cmd_advanced_mailer_recipient_email}</label>
|
||||
<label class="x_control-label" for="advanced_mailer_content">{$lang->cmd_advanced_mailer_status_content}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="advanced_mailer_recipient_email" value="{Context::get('logged_info')->email_address}" />
|
||||
<textarea id="advanced_mailer_content">{$lang->cmd_advanced_mailer_test_content}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -39,7 +42,7 @@
|
|||
</section>
|
||||
|
||||
<div class="btnArea x_clearfix">
|
||||
<button id="advanced_mailer_test_send_mail" type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_advanced_mailer_send}</button>
|
||||
<button id="advanced_mailer_test_send_sms" type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_advanced_mailer_send}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue