mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Merge #1344 이메일 호스트 제한/허용 기능에 대한 PR by misol
* pr/1344: fix for var $arg init. #1343 Email hosts of members can be allowed or not. Conflicts: modules/member/member.controller.php
This commit is contained in:
commit
ec11ccc4f5
12 changed files with 384 additions and 18 deletions
|
|
@ -17,7 +17,7 @@ function doUpdateDeniedID(user_id, mode, message) {
|
|||
}
|
||||
|
||||
/* prohibited nick name functions */
|
||||
function doUpdateDeniedNickName(nick_name, mode, message)
|
||||
function doUpdateDeniedNickName(nick_name, mode, message)
|
||||
{
|
||||
if(typeof(message)!='undefined' && !confirm(message)) return;
|
||||
|
||||
|
|
@ -35,8 +35,27 @@ function doUpdateDeniedNickName(nick_name, mode, message)
|
|||
);
|
||||
}
|
||||
|
||||
/* managed E-mail Address functions */
|
||||
function doUpdateManagedEmailHost(email_host, mode, message)
|
||||
{
|
||||
if(typeof(message)!='undefined' && !confirm(message)) return;
|
||||
|
||||
exec_xml(
|
||||
'member',
|
||||
'procMemberAdminUpdateManagedEmailHosts',
|
||||
{email_hosts:email_host, mode:mode, email_hosts_count:jQuery('#managedEmailHost li').length},
|
||||
function(){
|
||||
if (mode == 'delete'){
|
||||
jQuery('#managed_'+email_host.replace(/\./g,'\_\_')).remove();
|
||||
jQuery('._managededEmailHostCount').html(jQuery('#managedEmailHost li').length);
|
||||
}
|
||||
},
|
||||
['error','message','tpl']
|
||||
);
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
// hide form if enable_join is setted "No"
|
||||
// hide form if enable_join is setted "No"
|
||||
var suForm = $('table.__join_form'); // 회원가입 양식
|
||||
|
||||
function changeTable($i)
|
||||
|
|
@ -96,7 +115,7 @@ jQuery(function($){
|
|||
if (!confirm(xe.lang.msg_delete_extend_form)) return;
|
||||
|
||||
var memberFormSrl = $(event.target).parent().attr('id');
|
||||
var targetTR = $(event.target).closest('tr');
|
||||
var targetTR = $(event.target).closest('tr');
|
||||
|
||||
exec_xml(
|
||||
'member',
|
||||
|
|
@ -111,7 +130,7 @@ jQuery(function($){
|
|||
|
||||
$('button._addDeniedID').click(function(){
|
||||
var ids = $('#prohibited_id').val();
|
||||
if(ids == ''){
|
||||
if(ids == ''){
|
||||
alert(xe.lang.msg_null_prohibited_id);
|
||||
$('#prohibited_id').focus();
|
||||
return;
|
||||
|
|
@ -136,11 +155,40 @@ jQuery(function($){
|
|||
|
||||
jQuery.exec_json('member.procMemberAdminInsertDeniedID', {'user_id': ids}, on_complete);
|
||||
|
||||
});
|
||||
$('button._addManagedEmailHost').click(function(){
|
||||
var hosts = $('#manage_email_host').val();
|
||||
if(hosts == ''){
|
||||
alert(xe.lang.msg_null_managed_emailhost);
|
||||
$('#manage_email_host').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var tag;
|
||||
function on_complete(data)
|
||||
{
|
||||
$('#manage_email_host').val('');
|
||||
|
||||
var hosts = $.trim(data.email_hosts);
|
||||
if(hosts == '') return;
|
||||
var uids = hosts.split("\n");
|
||||
for (var i=0; i<uids.length; i++)
|
||||
{
|
||||
uids[i] = $.trim(uids[i]);
|
||||
tag = '<li id="managed_'+uids[i].replace(/\./g,'\_\_')+'">'+uids[i]+' <button type="button" class="x_icon-remove" onclick="doUpdateManagedEmailHost(\''+uids[i]+'\',\'delete\',\''+xe.lang.confirm_delete+'\');return false;">'+xe.lang.cmd_delete+'</button></li>';
|
||||
$('#managedEmailHost').append($(tag));
|
||||
}
|
||||
|
||||
$('._managededEmailHostCount').html($('#managedEmailHost li').length);
|
||||
}
|
||||
|
||||
$.exec_json('member.procMemberAdminUpdateManagedEmailHosts', {'email_hosts': hosts}, on_complete);
|
||||
|
||||
});
|
||||
|
||||
$('button._addDeniedNickName').click(function(){
|
||||
var ids = $('#prohibited_nick_name').val();
|
||||
if(ids == ''){
|
||||
if(ids == ''){
|
||||
alert(xe.lang.msg_null_prohibited_nick_name);
|
||||
$('#prohibited_nick_name').focus();
|
||||
return;
|
||||
|
|
@ -195,7 +243,7 @@ jQuery(function($){
|
|||
$notCheckedTR.find('th').html('<div class="wrap"><button type="button" class="dragBtn">Move to</button><span class="_title" >'+$notCheckedTR.find('th ._title').html()+'</span></div>');
|
||||
$notCheckedTR.removeClass('sticky');
|
||||
|
||||
// add sticky class
|
||||
// add sticky class
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
xe.lang.cmd_delete = '{$lang->cmd_delete}';
|
||||
xe.lang.msg_null_prohibited_id = '{$lang->msg_null_prohibited_id}';
|
||||
xe.lang.msg_null_prohibited_nick_name = '{$lang->msg_null_prohibited_nick_name}';
|
||||
xe.lang.msg_null_managed_emailhost = '{$lang->msg_null_managed_emailhost}';
|
||||
xe.lang.msg_exists_user_id= '{$lang->msg_exists_user_id}';
|
||||
</script>
|
||||
<form action="./" class="x_form-horizontal" method="post">
|
||||
|
|
@ -23,6 +24,24 @@
|
|||
<input type="text" name="limit_day_description" value="{$config->limit_day_description}" placeholder="{$lang->limit_day_description}" style="width:90%" class="lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<!--// Managed Email Host Control -->
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="manage_email_host">{$lang->cmd_manage_email_host}[<a href="#helpHost" data-toggle>?</a>]</label>
|
||||
<div class="x_controls">
|
||||
<div class="layer x_alert x_alert-info" id="helpHost">
|
||||
<p>{$lang->about_emailhost_check}</p>
|
||||
</div>
|
||||
<input type="radio" id="emailhost_check_allowed" name="emailhost_check" value="allowed" checked="checked"|cond="$config->emailhost_check =='allowed'" /><label for="emailhost_check_allowed" class="x_inline"> {$lang->cmd_allowed}</label>
|
||||
<input type="radio" id="emailhost_check_prohibited" name="emailhost_check" value="prohibited" checked="checked"|cond="$config->emailhost_check =='prohibited'" /><label for="emailhost_check_prohibited" class="x_inline"> {$lang->cmd_prohibited}</label>
|
||||
<p>{@ if($config->emailhost_check =='prohibited') $emailhost_check = $lang->cmd_prohibited; else $emailhost_check = $lang->cmd_allowed;}{sprintf($lang->count_manage_email_host, count($managedEmailHost), $emailhost_check)}</p>
|
||||
<ul class="textList" id="managedEmailHost" style="margin-left:0">
|
||||
<li loop="$managedEmailHost=>$emailInfo" id="managed_{str_replace('.','__',$emailInfo->email_host)}">{$emailInfo->email_host} <button type="button" class="x_icon-remove" onclick="doUpdateManagedEmailHost('{$emailInfo->email_host}','delete','{$lang->confirm_delete}');return false;">{$lang->delete}</button></li>
|
||||
</ul>
|
||||
<textarea rows="2" cols="42" id="manage_email_host" title="{$lang->add_managed_emailhost}" style="vertical-align:top"></textarea>
|
||||
<button type="button" class="_addManagedEmailHost x_btn">{$lang->add}</button>
|
||||
<p class="x_help-inline">{$lang->multi_line_input}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="prohibited_nick_name">{$lang->cmd_manage_nick_name}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -30,7 +49,7 @@
|
|||
<ul class="textList" id="deniedNickNameList" style="margin-left:0">
|
||||
<li loop="$deniedNickNames=>$nicknameInfo" id="denied_{$nicknameInfo->nick_name}">{$nicknameInfo->nick_name} <button type="button" class="x_icon-remove" onclick="doUpdateDeniedNickName('{$nicknameInfo->nick_name}','delete','{$lang->confirm_delete}');return false;">{$lang->delete}</button></li>
|
||||
</ul>
|
||||
<textarea rows="2" cols="42" id="prohibited_nick_name" title="{$lang->add_prohibited_id}" style="vertical-align:top"></textarea>
|
||||
<textarea rows="2" cols="42" id="prohibited_nick_name" title="{$lang->add_prohibited_nickname}" style="vertical-align:top"></textarea>
|
||||
<button type="button" class="_addDeniedNickName x_btn">{$lang->add}</button>
|
||||
<p class="x_help-inline">{$lang->multi_line_input}</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue