mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 01:03:28 +09:00
Merge branch 'develop' into pr/change-object
This commit is contained in:
commit
03d74a984f
19 changed files with 179 additions and 134 deletions
|
|
@ -492,7 +492,7 @@ class memberAdminController extends member
|
|||
$signupItem->required = in_array($key, $orgRequireds);
|
||||
$signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse);
|
||||
$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
|
||||
if($key == 'password')
|
||||
if(in_array($key, array('find_account_question', 'password', 'email_address')))
|
||||
{
|
||||
$signupItem->isPublic = 'N';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,24 +164,25 @@ class memberAdminView extends member
|
|||
*/
|
||||
public function dispMemberAdminAgreementsEdit()
|
||||
{
|
||||
$agreement_id = intval(Context::get('id'));
|
||||
Context::set('agreement_id', $agreement_id);
|
||||
Context::set('agreement_content', getModel('member')->getMemberConfig()->agreements[$agreement_id]->content);
|
||||
// Check parent input ID
|
||||
$parent_input_id = Context::get('parent_input_id');
|
||||
Context::addBodyClass('disable_debug_panel');
|
||||
|
||||
// Load editor
|
||||
$oEditorModel = getModel('editor');
|
||||
$option = $oEditorModel->getEditorConfig();
|
||||
$option->primary_key_name = 'agreement_id';
|
||||
$option->content_key_name = 'agreement_content';
|
||||
$option->primary_key_name = 'primary_key';
|
||||
$option->content_key_name = 'content';
|
||||
$option->allow_fileupload = FALSE;
|
||||
$option->enable_autosave = FALSE;
|
||||
$option->enable_default_component = TRUE;
|
||||
$option->enable_component = FALSE;
|
||||
$option->height = 300;
|
||||
$option->editor_focus = 'N';
|
||||
$editor = $oEditorModel->getEditor($logged_info->member_srl, $option);
|
||||
$option->editor_focus = 'Y';
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
// Set template
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("default_layout");
|
||||
$this->setTemplateFile('agreements_edit');
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ class member extends ModuleObject {
|
|||
{
|
||||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// check member directory (11/08/2007 added)
|
||||
if(!is_dir("./files/member_extra_info")) return true;
|
||||
// check member directory (22/10/2007 added)
|
||||
|
|
@ -216,7 +217,14 @@ class member extends ModuleObject {
|
|||
if(!$config->signupForm || !is_array($config->signupForm)) return true;
|
||||
foreach($config->signupForm as $signupItem)
|
||||
{
|
||||
if($signupItem->name === 'find_account_question') return true;
|
||||
if($signupItem->name === 'find_account_question')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if($signupItem->name === 'email_address' && $signupItem->isPublic !== 'N')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(!$config->agreements)
|
||||
{
|
||||
|
|
@ -357,7 +365,11 @@ class member extends ModuleObject {
|
|||
$config->identifier = $config->identifier ?: 'user_id';
|
||||
$config->signupForm = $oMemberAdminController->createSignupForm($config->identifier);
|
||||
$output = $oModuleController->updateModuleConfig('member', $config);
|
||||
break;
|
||||
}
|
||||
if($signupItem->name === 'email_address' && $signupItem->isPublic !== 'N')
|
||||
{
|
||||
$signupItem->isPublic = 'N';
|
||||
$output = $oModuleController->updateModuleConfig('member', $config);
|
||||
}
|
||||
}
|
||||
if(!$config->agreements)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_agreement_content}</div>
|
||||
<div class="x_controls">
|
||||
<input type="hidden" name="agreement_{$i}_content" id="agreement_{$i}_content" value="{escape($config->agreements[$i]->content)}" />
|
||||
<iframe id="agreement_{$i}_iframe" class="agreement_iframe" src="{getUrl('act', 'dispMemberAdminAgreementsEdit', 'id', $i)}"></iframe>
|
||||
<input type="hidden" class="editor_content" name="agreement_{$i}_content" id="agreement_{$i}_content" value="{escape($config->agreements[$i]->content)}" />
|
||||
<div class="editor_preview xe_content" tabindex="0">{$config->agreements[$i]->content}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -2,27 +2,31 @@
|
|||
$(function() {
|
||||
var editor;
|
||||
var parent = window.opener ? window.opener : window.parent;
|
||||
var parent_input = $("#{$parent_input_id}", parent.document);
|
||||
var parent_iframe = parent_input.siblings("iframe.editor_iframe");
|
||||
CKEDITOR.on('instanceReady', function(evt) {
|
||||
editor = evt.editor;
|
||||
editor.setData(parent_input.val());
|
||||
editor.on("resize", function(evt){
|
||||
var height = evt.data.outerHeight;
|
||||
$("#agreement_{$agreement_id}_iframe", parent.document).height(height);
|
||||
parent_iframe.height(height);
|
||||
});
|
||||
editor.on("change", function() {
|
||||
var content = editor.getData();
|
||||
$("#agreement_{$agreement_id}_content", parent.document).val(content);
|
||||
parent_input.val(content);
|
||||
});
|
||||
$("#agreement_{$agreement_id}_iframe", parent.document).height($(".cke_chrome").first().parent().height());
|
||||
parent_iframe.height($(".cke_chrome").parent().height());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
.wfsr { display: none; }
|
||||
</style>
|
||||
|
||||
<form>
|
||||
<input type="hidden" name="agreement_id" id="agreement_id" value="{$agreement_id}" />
|
||||
<input type="hidden" name="agreement_content" id="agreement_content" value="{escape($agreement_content)}" />
|
||||
<input type="hidden" name="primary_key" id="primary_key" value="" />
|
||||
<input type="hidden" name="content" id="content" value="" />
|
||||
{$editor}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
.agreement_iframe {
|
||||
display: inline-block;
|
||||
.editor_preview {
|
||||
width: 100%;
|
||||
min-height: 240px;
|
||||
max-height: 440px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: -4px;
|
||||
margin: 0;
|
||||
padding: 6px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
overflow-y: auto;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.editor_iframe {
|
||||
width: 100%;
|
||||
height: 440px;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0 -4px 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
height: 440px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
(function($) {
|
||||
|
||||
// Editor replacement callback function
|
||||
var editor_replace = function(input) {
|
||||
var iframe = $('<iframe class="editor_iframe"></iframe>');
|
||||
iframe.attr("src", current_url.setQuery("act", "dispMemberAdminAgreementsEdit").setQuery("parent_input_id", input.attr("id")));
|
||||
iframe.insertAfter(input);
|
||||
input.siblings(".editor_preview").hide();
|
||||
if (input.attr("type") !== "hidden") {
|
||||
input.hide();
|
||||
}
|
||||
};
|
||||
|
||||
// Editor replacement
|
||||
$(function() {
|
||||
$(".editor_preview").on("click", function() {
|
||||
var input = $(this).siblings(".editor_content");
|
||||
if (input.size()) {
|
||||
$(this).off("click").off("focus");
|
||||
editor_replace(input.first());
|
||||
}
|
||||
});
|
||||
$(".editor_preview").on("focus", function() {
|
||||
$(this).triggerHandler("click");
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -1,9 +1,4 @@
|
|||
jQuery(function($){
|
||||
$('input[name=enable_join]').click(function(){
|
||||
var checked = $('input[name=enable_join]:checked').val();
|
||||
enableSignUpTab(checked == 'Y');
|
||||
});
|
||||
|
||||
$('.__sync').click(function (){
|
||||
exec_xml(
|
||||
'importer', // module
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
</thead>
|
||||
<tbody class="uDrag">
|
||||
{@ $disabled_list = array('find_account_question')}
|
||||
{@ $fixed_public_list = array('nick_name', 'password')}
|
||||
{@ $fixed_public_list = array('nick_name', 'password', 'email_address')}
|
||||
<!--@foreach($config->signupForm as $item)-->
|
||||
<!--@if(in_array($item->name, $disabled_list))-->
|
||||
<!--@elseif($item->isIdentifier)-->
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
</th>
|
||||
<td style="text-align:center"><input type="radio" name="identifier" value="{$item->name}" checked="checked" /></td>
|
||||
<td style="text-align:center"><input type="checkbox" name="usable_list[]" value="{$item->name}" title="{$lang->use}" checked="checked" disabled="disabled" /></td>
|
||||
<td style="text-align:center"><input type="checkbox" name="is_{$item->name}_public" value="Y" checked="checked"|cond="$item->isPublic == 'Y'"/></td>
|
||||
<td style="text-align:center"><input type="checkbox" name="is_{$item->name}_public" value="Y" checked="checked"|cond="$item->isPublic == 'Y'" disabled="disabled"|cond="in_array($item->name, $fixed_public_list) || !$item->isUse" /></td>
|
||||
<td class="nowr">
|
||||
<label for="{$item->name}_re" class="x_inline"><input type="radio" id="{$item->name}_re" name="{$item->name}" value="requierd" checked="checked" disabled="disabled" /> {$lang->cmd_required}</label>
|
||||
<label for="{$item->name}_op" class="x_inline"><input type="radio" id="{$item->name}_op" name="{$item->name}" value="option" disabled="disabled" /> {$lang->cmd_optional}</label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue