rhymix/modules/member/tpl/insert_member.html
2018-08-22 19:35:42 +09:00

201 lines
9.3 KiB
HTML

<load target="js/member_admin.js" />
<!--%load_js_plugin("ui.datepicker")-->
<script>
xe.lang.deleteProfileImage = '{$lang->msg_delete_extend_form}';
xe.lang.deleteImageMark = '{$lang->msg_delete_extend_form}';
xe.lang.deleteImageName = '{$lang->msg_delete_extend_form}';
</script>
<div class="x_page-header">
<h1 cond="$member_srl">{$lang->msg_update_member}</h1>
<h1 cond="!$member_srl">{$lang->msg_new_member}</h1>
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/tpl/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" class="x_form-horizontal" ruleset="insertAdminMember" method="post" enctype="multipart/form-data">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberAdminInsert" />
<input type="hidden" name="member_srl" value="{$member_srl}" />
<input type="hidden" name="signature" value="{escape($member_info->signature)}" />
<input type="hidden" name="success_return_url" value="{getUrl('act', $act)}" cond="$member_srl" />
<input type="hidden" name="success_return_url" value="{getUrl('act', 'dispMemberAdminList')}" cond="!$member_srl" />
<input type="hidden" name="xe_validator_id" value="modules/member/tpl/1" />
<div cond="$member_srl" class="x_control-group">
<label class="x_control-label" for="identifierForm"><em style="color:red">*</em> {$identifierForm->title}</label>
<div class="x_controls">
<input type="hidden" name="{$identifierForm->name}" value="{$identifierForm->value}" />
<input id="identifierForm" type="email" name="{$identifierForm->name}" value="{$identifierForm->value}" disabled="disabled" />
</div>
</div>
<div cond="!$member_srl" class="x_control-group">
<label class="x_control-label" for="identifierForm"><em style="color:red">*</em> {$identifierForm->title}</label>
<div class="x_controls">
<input id="identifierForm" type="text" name="{$identifierForm->name}" value="" />
</div>
</div>
<div cond="$member_srl" class="x_control-group">
<label class="x_control-label" for="password"><em style="color:red">*</em> {$lang->password}</label>
<div class="x_controls">
<input id="password" type="password" name="reset_password" value="" autocomplete="off" />
</div>
</div>
<div cond="!$member_srl" class="x_control-group">
<label class="x_control-label" for="password"><em style="color:red">*</em> {$lang->password}</label>
<div class="x_controls">
<input id="password" type="text" name="password" value="" autocomplete="off" />
</div>
</div>
<div loop="$formTags=>$formTag" class="x_control-group">
<label class="x_control-label" for="{$formTag->name}">{$formTag->title}</label>
<div class="x_controls" cond="$formTag->name != 'signature'">{$formTag->inputTag}</div>
<div class="x_controls" cond="$formTag->name =='signature'">{$editor}</div>
</div>
<style scoped>
.xpress-editor>#smart_content,
.xpress-editor>#smart_content>.tool{clear:none}
</style>
<div class="x_control-group">
<label class="x_control-label">{$lang->allow_mailing}</label>
<div class="x_controls">
<label class="x_inline" for="mailingYes"><input type="radio" name="allow_mailing" id="mailingYes" value="Y" checked="checked"|cond="$member_info->allow_mailing == 'Y'"> {$lang->cmd_yes}</label>
<label class="x_inline" for="mailingNo"><input type="radio" name="allow_mailing" id="mailingNo" value="N" checked="checked"|cond="$member_info->allow_mailing != 'Y'" > {$lang->cmd_no}</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->allow_message}</label>
<div class="x_controls">
<block loop="$lang->allow_message_type=>$key,$val">
<label class="x_inline" for="allow_{$key}"><input type="radio" name="allow_message" value="{$key}" checked="checked"|cond="$member_info->allow_message == $key || (!$member_info->member_srl && $key == 'Y')" id="allow_{$key}" /> {$val}</label>
</block>
</div>
</div>
<div class="x_control-group" cond="$member_srl">
<label class="x_control-label">{$lang->status}</label>
<div class="x_controls">
<label class="x_inline" for="appoval"><input type="radio" name="denied" id="appoval" value="N" checked="checked"|cond="$member_info->denied != 'Y'" > {$lang->approval}</label>
<label class="x_inline" for="deny"><input type="radio" name="denied" id="deny" value="Y" checked="checked"|cond="$member_info->denied == 'Y'" > {$lang->denied}</label>
</div>
</div>
<div class="x_control-group div_refused_reason">
<label class="x_control-label">{$lang->refused_reason}</label>
<div class="x_controls">
<textarea name="refused_reason" id="refused_reason" rows="2" cols="42" style="vertical-align:top">{$member_info->refused_reason}</textarea>
<span class="x_help-inline">{$lang->about_refused_reason}</span>
</div>
</div>
<div class="x_control-group" cond="$member_srl">
<label class="x_control-label">{$lang->signup_date}</label>
<div class="x_controls">
<input type="text" readonly value="{zdate($member_info->regdate, 'Y-m-d H:i:s')}" />
</div>
</div>
<div class="x_control-group" cond="$member_srl">
<label class="x_control-label">{$lang->last_login}</label>
<div class="x_controls">
<input type="text" readonly value="{zdate($member_info->last_login, 'Y-m-d H:i:s')}" />
</div>
</div>
<div class="x_control-group" cond="$member_srl">
<label class="x_control-label" for="until">{$lang->limit_date}</label>
<div class="x_controls">
<input type="hidden" name="limit_date" id="date_limit_date" value="{$member_info->limit_date}" />
<input type="date" readonly placeholder="YYYY-MM-DD" class="inputDate" id="until" min="{date('Y-m-d',strtotime('-10 years'))}" max="{date('Y-m-d',strtotime('+100 years'))}" onchange="jQuery('#date_limit_date').val(this.value.replace(/-/g,''));" value="{zdate($member_info->limit_date,'Y-m-d',false)}" />
<input type="button" value="{$lang->cmd_delete}" class="x_btn dateRemover" />
<span class="x_help-inline">{$lang->about_limit_date}</span>
</div>
</div>
<div class="x_control-group div_limited_reason">
<label class="x_control-label">{$lang->refused_reason}</label>
<div class="x_controls">
<textarea name="limited_reason" id="limited_reason" rows="2" cols="42" style="vertical-align:top">{$member_info->limited_reason}</textarea>
<span class="x_help-inline">{$lang->about_refused_reason}</span>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->is_admin}</label>
<div class="x_controls">
<label class="x_inline" for="is_admin"><input type="radio" name="is_admin" id="is_admin" value="Y" checked="checked"|cond="$member_info->is_admin == 'Y'" > {$lang->cmd_yes}</label>
<label class="x_inline" for="not_admin"><input type="radio" name="is_admin" id="not_admin" value="N" checked="checked"|cond="$member_info->is_admin != 'Y'" > {$lang->cmd_no}</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="description">{$lang->description}</label>
<div class="x_controls">
<textarea name="description" id="description" rows="2" cols="42" style="vertical-align:top">{$member_info->description}</textarea>
<span class="x_help-inline">{$lang->about_member_description}</span>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->member_group}</label>
<div class="x_controls">
<label for="group_{$key}" class="x_inline" loop="$group_list => $key,$val">
<input type="checkbox" name="group_srl_list[]" value="{$key}" id="group_{$key}" checked="checked"|cond="$member_info->group_list[$key]" />
{$val->title}
</label>
</div>
</div>
<div class="x_clearfix btnArea">
<span class="x_pull-left" cond="$member_srl"><button class="x_btn" type="button" onclick="history.go(-1)">{$lang->cmd_cancel}</button></span>
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>
<script>
(function($){
$(function(){
// check if the browser support type date.
if ( $(".inputDate").prop('type') != 'date' ) {
var option = {
changeMonth: true,
changeYear: true,
gotoCurrent: false,
yearRange:'-200:+10',
dateFormat:'yy-mm-dd',
defaultDate: new Date("{date('Y-m-d',time())}"),
minDate: new Date("{date('Y-m-d',strtotime('-200 years'))}"),
onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))
if($('#until').val()){
limited_reason_division.slideDown(200);
} else {
limited_reason_division.slideUp(200);
}
}
};
$.extend($.datepicker.regional['{$lang_type}'],option);
//if the browser does not support type date input, start datepicker. If it does, brower's UI will show their datepicker.
$(".inputDate").datepicker(option);
} else {
$(".inputDate").prop('readonly', false);
}
$(".dateRemover").click(function() {
$(this).prevAll('input').val('');
limited_reason_division.slideUp(200);
return false;
});
});
var refused_reason_division = $('.div_refused_reason');
if(!$('#deny').is(':checked'))
{
refused_reason_division.hide();
}
$('#deny').change(function(){
if($(this).is(':checked')){
refused_reason_division.slideDown(200);
}
});
$('#appoval').change(function(){
if($(this).is(':checked')){
refused_reason_division.slideUp(200);
}
});
var limited_reason_division = $('.div_limited_reason');
if(!$('#until').val())
{
limited_reason_division.hide();
}
})(jQuery);
</script>