묻고답하기
(아시는분 없으신가요?) - 회원가입할때 이메일 적는란에 네이버 다음 구글을 선택할수있는 설렉트박스 만드는법
2014.02.15 15:06
회원가입할때 이메일 적는란에
네이버, 다음, 구글 등이 선택 가능하게
예를들어서
@naver.com
@daum.net
@gmail.com
이런식으로 select 할수있게 만들고 싶은데요.. 어떻게 해야할지 모르겠습니다.
(회원분들이 nave.r.com 이런식으로 이메일을 오타를 내면서 회원가입을 못하시는분들이 계시더라구요..
그것을 막아보자 이런 질문글 올리게 되었습니다..)
xe 1.7.3.7 버전이며, 스케치북 버전은 1.6.3.6 이며,
회원가입확장 모듈을 사용하고 있습니다.
어떻게 해야하는지 고수님의 도움이 필요합니다.
댓글 8
-
루팡쿠팡
2014.02.16 01:34
-
Summer
2014.02.20 15:57
member 모듈 default 스킨 기준, 아이디를 로그인으로 사용할때 기준으로
<li loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<label for="{$formTag->name}">{$formTag->title}</label>
<div>{$formTag->inputTag}</div>
</li>
이 부분을
<li loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<!--@if($formTag->name=='email_address')-->
<script type="text/javascript">
function putEmail() {
document.getElementById('email_address').value = document.getElementById('email_address_id').value + '@' + document.getElementById('email_address_host').options[document.getElementById('email_address_host').selectedIndex].value;
}
</script>
<input type="email" name="email_address" style="display:none" id="email_address" value="{$identifierForm->value}" />
<label for="email_address"><em style="color:red">*</em> {$lang->email_address}</label>
<div>
<input type="text" name="email_address_id" id="email_address_id" onChange="putEmail()" style="width:40%;display:inline-block;" /> @
<select name="email_address_host" id="email_address_host" onChange="putEmail()" style="width:40%;display:inline-block;">
<option value="">- 메일주소선택 -</option>
<option value="naver.com">naver.com</option>
<option value="daum.net">daum.net</option>
<option value="gmail.com">gmail.com</option>
</select>
</div>
<!--@else-->
<label for="{$formTag->name}">{$formTag->title}</label>
<div>{$formTag->inputTag}</div>
<!--@end-->
</li>
이렇게 바꿔보세요
-
루팡쿠팡
2014.02.20 19:51
제꺼는 아래 부분처럼 안되있고
<li loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<label for="{$formTag->name}">{$formTag->title}</label>
<div>{$formTag->inputTag}</div>
</li>
이렇게 되있습니다.
<div class="control-group" loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<label for="{$formTag->name}" class="control-label">{$formTag->title}</label>
<div class="controls">{$formTag->inputTag}</div>
-
Summer
2014.02.20 21:12
똑같이 div 엘리먼트(control-group 클래스) 바로 안에
<!--@if($formTag->name=='email_address')-->
부터
<!--@else--> 까지 넣으시고<label for="{$formTag->name}" class="control-label">{$formTag->title}</label><div class="controls">{$formTag->inputTag}</div>다음<!--@end-->그리고 </div> -
루팡쿠팡
2014.02.20 20:11
그리고.. signup_form.html 를 고쳐주는게 맞지요?
-
Summer
2014.02.20 21:12
맞습니다
-
루팡쿠팡
2014.02.21 00:20
되긴하는데.. 메일링 가입과 쪽지 허용이 레이아웃에서 빠져 나갑니다..ㅠㅠ
아래와 같이 햇습니다. signup_form.html 입니다.
<load target="../../tpl/js/signup_check.js" />
<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui")-->
<!--%load_js_plugin("ui.datepicker")-->
<include target="./common_header.html" />
<div id="border" style="width: 90%">
<h1 class="h1">{$lang->cmd_signup}</h1>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/sketchbook5_member/signup_form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
<input type="hidden" name="act" value="procMemberInsert" />
<input type="hidden" name="xe_validator_id" value="modules/member/skins/sketchbook5_member/signup_form/1" />
<div class="agreement" cond="$member_config->agreement">
<div class="text">
{$member_config->agreement}
</div>
<div class="confirm">
<label for="accept_agree">
<input type="checkbox" name="accept_agreement" value="Y" id="accept_agree" />
{$lang->about_accept_agreement}
</label>
</div>
</div>
<div class="control-group">
<label for="{$identifierForm->name}" class="control-label"><em style="color:red">*</em> {$identifierForm->title}</label>
<div class="controls">
<input type="text"|cond="$identifierForm->name!='email_address'" type="email"|cond="$identifierForm->name=='email_address'" name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" required />
</div>
</div>
<div class="control-group">
<label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label>
<div class="controls">
<input type="password" name="password" id="password" value="" required />
<p class="help-inline">{$lang->about_password}</p>
</div>
</div>
<div class="control-group">
<label for="password2" class="control-label"><em style="color:red">*</em> {$lang->password3}</label>
<div class="controls">
<input type="password" name="password2" id="password2" value="" required />
</div>
</div>
<div class="control-group" loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<!--@if($formTag->name=='email_address')-->
<script type="text/javascript">
function putEmail() {
document.getElementById('email_address').value = document.getElementById('email_address_id').value + '@' + document.getElementById('email_address_host').options[document.getElementById('email_address_host').selectedIndex].value;}
</script>
<input type="email" name="email_address" style="display:none" id="email_address" value="{$identifierForm->value}" />
<label for="email_address"><em style="color:red">*</em> {$lang->email_address}</label>
<div>
<input type="text" name="email_address_id" id="email_address_id" onChange="putEmail()" style="width:40%;display:inline-block;" /> @
<select name="email_address_host" id="email_address_host" onChange="putEmail()" style="width:40%;display:inline-block;">
<option value="">- 메일을 선택하세요 -</option>
<option value="naver.com">naver.com</option>
<option value="daum.net">daum.net</option>
<option value="gmail.com">gmail.com</option>
</select>
</div>
<!--@else-->
<label for="{$formTag->name}">{$formTag->title}</label>
<div>{$formTag->inputTag}</div>
<!--@end-->
</div>
</div>
<div class="control-group">
<div class="control-label">{$lang->allow_mailing}</div>
<div class="controls" style="padding-top:5px">
<label for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing == 'Y'||!$member_info->allow_mailing"></label>
<label for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing == 'N'" ></label>
</div>
</div>
<div class="control-group">
<div class="control-label">{$lang->allow_message}</div>
<div class="controls" style="padding-top:5px">
<label for="allow_{$key}" loop="$lang->allow_message_type=>$key,$val"><input type="radio" name="allow_message" value="{$key}" checked="checked"|cond="$member_info->allow_message == $key || (!$member_info && $key == 'Y')" id="allow_{$key}" /> {$val}</label>
</div>
</div>
<div class="btnArea" style="border-top:1px solid #ccc;padding-top:10px"><span class="btn-group pull-right">
<input type="submit" value="{$lang->cmd_registration}" class="btn modalAnchor btn-primary" />
<a href="{getUrl('act','','member_srl','')}" class="btn modalAnchor">{$lang->cmd_cancel}</a>
</span></div>
</form>
</div>
<script type="text/javascript">
jQuery(function($){
// label for setup
$('.control-label[for]').each(function(){
var $this = $(this);
if($this.attr('for') == ''){
$this.attr('for', $this.next().children(':visible:first').attr('id'));
}
});
});
(function($){
$(function(){
var option = { changeMonth: true, changeYear: true, gotoCurrent: false,yearRange:'-100:+10', dateFormat:'yy-mm-dd', onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
};
$.extend(option,$.datepicker.regional['{$lang_type}']);
$(".inputDate").datepicker(option);
$(".dateRemover").click(function() {
$(this).prevAll('input').val('');
return false;});
});
})(jQuery);
</script>
<include target="./common_footer.html" />
-
루팡쿠팡
2014.02.21 00:21
그리고 이건 수정하기 전의 signup_form.html 파일입니다.
<load target="../../tpl/js/signup_check.js" />
<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui")-->
<!--%load_js_plugin("ui.datepicker")-->
<include target="./common_header.html" />
<div id="border" style="width: 90%">
<h1 class="h1">{$lang->cmd_signup}</h1>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/sketchbook5_member/signup_form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
<input type="hidden" name="act" value="procMemberInsert" />
<input type="hidden" name="xe_validator_id" value="modules/member/skins/sketchbook5_member/signup_form/1" />
<div class="agreement" cond="$member_config->agreement">
<div class="text">
{$member_config->agreement}
</div>
<div class="confirm">
<label for="accept_agree">
<input type="checkbox" name="accept_agreement" value="Y" id="accept_agree" />
{$lang->about_accept_agreement}
</label>
</div>
</div>
<div class="control-group">
<label for="{$identifierForm->name}" class="control-label"><em style="color:red">*</em> {$identifierForm->title}</label>
<div class="controls">
<input type="text"|cond="$identifierForm->name!='email_address'" type="email"|cond="$identifierForm->name=='email_address'" name="{$identifierForm->name}" id="{$identifierForm->name}" value="{$identifierForm->value}" required />
</div>
</div>
<div class="control-group">
<label for="password" class="control-label"><em style="color:red">*</em> {$lang->password}</label>
<div class="controls">
<input type="password" name="password" id="password" value="" required />
<p class="help-inline">{$lang->about_password}</p>
</div>
</div>
<div class="control-group">
<label for="password2" class="control-label"><em style="color:red">*</em> {$lang->password3}</label>
<div class="controls">
<input type="password" name="password2" id="password2" value="" required />
</div>
</div>
<div class="control-group" loop="$formTags=>$formTag" cond="$formTag->name != 'signature'">
<label for="{$formTag->name}" class="control-label">{$formTag->title}</label>
<div class="controls">{$formTag->inputTag}</div>
</div>
<div class="control-group">
<div class="control-label">{$lang->allow_mailing}</div>
<div class="controls" style="padding-top:5px">
<label for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing == 'Y'||!$member_info->allow_mailing"></label>
<label for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing == 'N'" ></label>
</div>
</div>
<div class="control-group">
<div class="control-label">{$lang->allow_message}</div>
<div class="controls" style="padding-top:5px">
<label for="allow_{$key}" loop="$lang->allow_message_type=>$key,$val"><input type="radio" name="allow_message" value="{$key}" checked="checked"|cond="$member_info->allow_message == $key || (!$member_info && $key == 'Y')" id="allow_{$key}" /> {$val}</label>
</div>
</div>
<div class="btnArea" style="border-top:1px solid #ccc;padding-top:10px"><span class="btn-group pull-right">
<input type="submit" value="{$lang->cmd_registration}" class="btn modalAnchor btn-primary" />
<a href="{getUrl('act','','member_srl','')}" class="btn modalAnchor">{$lang->cmd_cancel}</a>
</span></div>
</form>
</div>
<script type="text/javascript">
jQuery(function($){
// label for setup
$('.control-label[for]').each(function(){
var $this = $(this);
if($this.attr('for') == ''){
$this.attr('for', $this.next().children(':visible:first').attr('id'));
}
});
});
(function($){
$(function(){
var option = { changeMonth: true, changeYear: true, gotoCurrent: false,yearRange:'-100:+10', dateFormat:'yy-mm-dd', onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
};
$.extend(option,$.datepicker.regional['{$lang_type}']);
$(".inputDate").datepicker(option);
$(".dateRemover").click(function() {
$(this).prevAll('input').val('');
return false;});
});
})(jQuery);
</script>
<include target="./common_footer.html" />
제발 알려주세요 ㅠㅠ