test
This commit is contained in:
85
lib/system/templates/system_setting_telegram_bot.html
Normal file
85
lib/system/templates/system_setting_telegram_bot.html
Normal file
@@ -0,0 +1,85 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ macros.m_button_group([['globalSettingSaveBtn', '설정 저장']])}}
|
||||
{{ macros.m_row_start('5') }}
|
||||
{{ macros.m_row_end() }}
|
||||
<nav>
|
||||
{{ macros.m_tab_head_start() }}
|
||||
{{ macros.m_tab_head2('normal', '일반', true) }}
|
||||
{{ macros.m_tab_head_end() }}
|
||||
</nav>
|
||||
<form id='setting' name='setting'>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
{{ macros.m_tab_content_start('normal', true) }}
|
||||
{{ macros.setting_scheduler_button(arg['scheduler'], arg['is_running']) }}
|
||||
{{ macros.setting_checkbox('telegram_bot_auto_start', '시작시 자동실행', value=arg['telegram_bot_auto_start'], desc='On : 시작시 자동으로 스케쥴러에 등록됩니다.') }}
|
||||
{{ macros.setting_input_text('telegram_bot_token', 'Bot Token', value=arg['telegram_bot_token']) }}
|
||||
|
||||
{{ macros.setting_checkbox('telegram_resend', '전달 사용', value=arg['telegram_resend'], desc=['On : 수신 받은 데이터를 전달합니다.']) }}
|
||||
<div id="telegram_resend_div" class="collapse">
|
||||
{{ macros.setting_input_textarea('telegram_resend_chat_id', '수신 받을 Chat ID', value=arg['telegram_resend_chat_id'], row='3', desc=['받은 메시지를 보낼 Chat ID', 'Chat ID 별 구분자 | 또는 엔터']) }}
|
||||
</div>
|
||||
<!--
|
||||
{{ macros.m_hr() }}
|
||||
{{ macros.setting_button([['open_url1_btn', 'BotFather'], ['open_url2_btn', 'SJVA Bot Channel'], ['open_url3_btn', 'SJVA Bot Channel 관리 봇']]) }}
|
||||
-->
|
||||
{{ macros.m_tab_content_end() }}
|
||||
</div><!--tab-content-->
|
||||
</form>
|
||||
</div> <!--전체-->
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var package_name = "{{arg['package_name']}}";
|
||||
var sub = "{{arg['sub'] }}";
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
use_collapse("telegram_resend");
|
||||
});
|
||||
|
||||
$('#telegram_resend').change(function() {
|
||||
use_collapse('telegram_resend');
|
||||
});
|
||||
|
||||
$("body").on('change', '#scheduler', function(e){
|
||||
var ret = $(this).prop('checked');
|
||||
if (!ret) {
|
||||
$.notify('<strong>텔레그램 봇은 중단 할 수 없습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
$('#scheduler').bootstrapToggle('on')
|
||||
return
|
||||
}
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/'+sub+'/scheduler',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {scheduler : ret},
|
||||
dataType: "json",
|
||||
success: function (list) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#open_url1_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("https://t.me/BotFather", "_blank");
|
||||
});
|
||||
|
||||
$("body").on('click', '#open_url2_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("https://t.me/sjva_bot_channel", "_blank");
|
||||
});
|
||||
|
||||
$("body").on('click', '#open_url3_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("https://t.me/sjva_admin_bot", "_blank");
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user