mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
회원 전화번호 필드 인식 추가.
This commit is contained in:
parent
c8dae083e6
commit
101356a50a
5 changed files with 74 additions and 0 deletions
|
|
@ -125,3 +125,5 @@ $lang->mention_limit = '멘션 갯수 제한';
|
|||
$lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해 한 글에서 지나치게 많은 회원들을 호출하지 못하도록 합니다.';
|
||||
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';
|
||||
$lang->ncenterlite_use_sms_help = '이 옵션을 사용하게 되면 회원들에게 문자메세지 서비스를 이용하여 알림을 보낼 수 있습니다.';
|
||||
$lang->member_phone_variable = '회원전화번호 변수';
|
||||
$lang->member_phone_variable_about = '회원전화번호 변수를 선택합니다. 회원전화번호 변수가 1개일 경우 설치시 자동으로 설정이 저장됩니다. 이 경우 설정을 할 필요가 없어서 설정을 선택할 수 없습니다.';
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class ncenterliteAdminController extends ncenterlite
|
|||
'layout_srl',
|
||||
'mlayout_srl',
|
||||
'use_sms',
|
||||
'variable_name',
|
||||
);
|
||||
|
||||
foreach($config_vars as $val)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class ncenterliteAdminView extends ncenterlite
|
|||
{
|
||||
$sms_available = true;
|
||||
}
|
||||
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
Context::set('config', $config);
|
||||
Context::set('sms_available', $sms_available);
|
||||
|
|
@ -75,8 +76,19 @@ class ncenterliteAdminView extends ncenterlite
|
|||
{
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
$variable_name = array();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type == 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
Context::set('config', $config);
|
||||
Context::set('variable_name', $variable_name);
|
||||
}
|
||||
|
||||
function dispNcenterliteAdminList()
|
||||
|
|
|
|||
|
|
@ -141,6 +141,23 @@ class ncenterlite extends ModuleObject
|
|||
return true;
|
||||
}
|
||||
|
||||
$config = getModel('ncenterlite')->getConfig();
|
||||
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
$variable_name = array();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type == 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$config->variable_name && count($variable_name) == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -226,6 +243,38 @@ class ncenterlite extends ModuleObject
|
|||
$oDB->dropIndex('ncenterlite_notify', 'idx_notify');
|
||||
}
|
||||
|
||||
|
||||
$config = getModel('ncenterlite')->getConfig();
|
||||
if(!$config)
|
||||
{
|
||||
$config = new stdClass();
|
||||
}
|
||||
|
||||
if(!$config->variable_name)
|
||||
{
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
$variable_name = array();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type === 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
if(count($variable_name) === 1)
|
||||
{
|
||||
foreach($variable_name as $item)
|
||||
{
|
||||
$config->variable_name = $item;
|
||||
}
|
||||
$output = $oModuleController->insertModuleConfig('ncenterlite', $config);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return new Object(-1, 'fail_module_install');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,16 @@
|
|||
<input type="hidden" name="act" value="procNcenterliteAdminInsertConfig" />
|
||||
|
||||
<section class="section">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="variable_name">{$lang->member_phone_variable}</label>
|
||||
<div class="x_controls">
|
||||
<select name="variable_name" id="variable_name" disabled="disabled"|cond="empty($variable_name)">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$variable_name => $val" value="{$val}" selected="selected"|cond="$config->variable_name == $val">{$val}</option>
|
||||
</select>
|
||||
<p class="x_help-block">{$lang->member_phone_variable_about}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->ncenterlite_mention_target}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue