mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
issue 46 Validator apply communication module.
standalone method apply validator. Auto Form generation error in Template engine is fixed git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8482 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
11815412dc
commit
8f7335c776
24 changed files with 141 additions and 41 deletions
|
|
@ -27,7 +27,12 @@
|
|||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('communication',$args);
|
||||
|
||||
return $output;
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
else return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
$output = executeQuery('communication.updateAllowMessage', $args);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -76,6 +81,12 @@
|
|||
$oMail->send();
|
||||
}
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
alertScript($lang->success_sended);
|
||||
closePopupScript();
|
||||
exit;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -195,10 +206,10 @@
|
|||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl;
|
||||
// check variables
|
||||
$message_srl_list = trim(Context::get('message_srl_list'));
|
||||
if(!$message_srl_list) return new Object(-1, 'msg_cart_is_null');
|
||||
if(!Context::get('message_srl_list')) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$message_srl_list = explode('|@|', $message_srl_list);
|
||||
$message_srl_list = Context::get('message_srl_list');
|
||||
if(!is_array($message_srl_list)) $message_srl_list = explode('|@|', trim($message_srl_list));
|
||||
if(!count($message_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$message_type = Context::get('message_type');
|
||||
|
|
@ -223,6 +234,12 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -246,6 +263,13 @@
|
|||
|
||||
$this->add('member_srl', $target_srl);
|
||||
$this->setMessage('success_registed');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
alertScript($lang->success_registed);
|
||||
closePopupScript();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -279,6 +303,11 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_moved');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -311,6 +340,11 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -336,9 +370,27 @@
|
|||
$msg_code = 'success_registed';
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
alertScript($lang->fail_to_registed);
|
||||
closePopupScript();
|
||||
exit;
|
||||
}
|
||||
else return $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
global $lang;
|
||||
alertScript($lang->success_registed);
|
||||
reload(true);
|
||||
closePopupScript();
|
||||
exit;
|
||||
}
|
||||
else $this->setMessage($msg_code);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,21 +12,21 @@
|
|||
<action name="dispCommunicationAddFriendGroup" type="view" standalone="true" />
|
||||
|
||||
<action name="procCommunicationUpdateAllowMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationSendMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationSendMessage" type="controller" standalone="true" ruleset="sendMessage" />
|
||||
<action name="procCommunicationStoreMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessage" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteMessages" type="controller" standalone="true" />
|
||||
|
||||
<action name="procCommunicationAddFriend" type="controller" standalone="true" />
|
||||
<action name="procCommunicationMoveFriend" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteFriend" type="controller" standalone="true" />
|
||||
<action name="procCommunicationAddFriend" type="controller" standalone="true" ruleset="addFriend" />
|
||||
<action name="procCommunicationMoveFriend" type="controller" standalone="true" ruleset="deleteCheckedFriend" />
|
||||
<action name="procCommunicationDeleteFriend" type="controller" standalone="true" ruleset="deleteCheckedFriend" />
|
||||
|
||||
<action name="procCommunicationAddFriendGroup" type="controller" standalone="true" />
|
||||
<action name="procCommunicationAddFriendGroup" type="controller" standalone="true" ruleset="addFriendGroup" />
|
||||
<action name="procCommunicationRenameFriendGroup" type="controller" standalone="true" />
|
||||
<action name="procCommunicationDeleteFriendGroup" type="controller" standalone="true" />
|
||||
|
||||
<action name="getCommunicationAdminColorset" type="model" standalone="true" />
|
||||
<action name="procCommunicationAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procCommunicationAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="dispCommunicationAdminConfig" type="view" standalone="true" admin_index="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
<h3 class="xeAdmin">{$lang->cmd_add_friend}</h3>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, add_friend)">
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="addFriend" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommunicationAddFriend" />
|
||||
<input type="hidden" name="target_srl" value="{$target_info->member_srl}" />
|
||||
|
||||
<div id="popBody">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<!--%import("filter/add_friend_group.xml")-->
|
||||
<!--%import("js/communication.js")-->
|
||||
|
||||
<div id="popHeader">
|
||||
|
|
@ -10,7 +9,9 @@
|
|||
<!--@end-->
|
||||
</h3>
|
||||
</div>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, add_friend_group)">
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="addFriendGroup" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommunicationAddFriendGroup" />
|
||||
<input type="hidden" name="friend_group_srl" value="{$friend_group->friend_group_srl}" />
|
||||
|
||||
<div id="popBody">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<!--#include("./common_header.html")-->
|
||||
|
||||
<!--%import("filter/delete_checked_friend.xml")-->
|
||||
<!--%import("filter/delete_friend_group.xml")-->
|
||||
<!--%import("filter/move_friend.xml")-->
|
||||
|
||||
|
|
@ -8,7 +7,10 @@
|
|||
|
||||
<h3>{$member_title = $lang->cmd_view_friend } ({$total_count})</h3>
|
||||
|
||||
<form id="fo_friend_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked_friend)">
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<!--form id="fo_friend_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked_friend)"-->
|
||||
<form ruleset="deleteCheckedFriend" id="fo_friend_list" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommunicationDeleteFriend" />
|
||||
|
||||
<div class="setupGroup">
|
||||
<select name="friend_group_list" id="friend_group_list">
|
||||
|
|
@ -51,8 +53,8 @@
|
|||
<option value="{$val->friend_group_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<a href="#" onclick="doMoveFriend();return false;" class="small button blue"><span>{$lang->cmd_move}</span></a>
|
||||
<span class="small button red"><input type="submit" value="{$lang->cmd_delete}" /></span>
|
||||
<button type="submit" name="act" value="procCommunicationMoveFriend">{$lang->cmd_move}</button>
|
||||
<button type="submit" name="act" value="procCommunicationDeleteFriend">{$lang->cmd_delete}</button>
|
||||
<a href="{getUrl('act','','message_type','','friend_gruop_srl','')}" class="small button"><span>{$lang->cmd_back}</span></a>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
<!--%import("filter/update_allow_message.xml")-->
|
||||
|
||||
<div class="xeMessages">
|
||||
<form action="./" method="POST" onsubmit="return procFilter(this, update_allow_message)" class="setupMessage">
|
||||
<form action="./" method="POST" class="setupMessage">
|
||||
<input type="hidden" name="act" value="procCommunicationUpdateAllowMessage" />
|
||||
<input type="hidden" name="message_type" value="{$message_type}" />
|
||||
<select name="allow_message">
|
||||
<!--@foreach($lang->allow_message_type as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($logged_info->allow_message == $key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
|
|
@ -42,7 +44,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="button">
|
||||
<th class="button">this
|
||||
<!--@if($message->message_type != "S" && $message->member_srl != $logged_info->member_srl)-->
|
||||
<a href="#" onclick="doSendMessage('{$message->sender_srl}','{$message->message_srl}');return false;" class="button black strong"><span>{$lang->cmd_reply_message}</span></a>
|
||||
<!--@end-->
|
||||
|
|
@ -55,7 +57,9 @@
|
|||
</table>
|
||||
<!--@end-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked_message)" id="fo_message_list">
|
||||
|
||||
<form action="./" method="get" id="fo_message_list">
|
||||
<input type="hidden" name="act" value="procCommunicationDeleteMessages" />
|
||||
<input type="hidden" name="message_type" value="{$message_type}" />
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
|
|
@ -80,7 +84,7 @@
|
|||
<!--@foreach($message_list as $no => $val)-->
|
||||
<tr>
|
||||
<td class="wide">
|
||||
<input name="message_srl_list" type="checkbox" value="{$val->message_srl}" />
|
||||
<input name="message_srl_list[]" type="checkbox" value="{$val->message_srl}" />
|
||||
<!--@if($val->readed=='Y')-->
|
||||
<a href="{getUrl('message_srl',$val->message_srl)}">{$val->title}</a>
|
||||
<!--@else-->
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<!--%import("filter/send_message.xml")-->
|
||||
<!--%import("js/communication.js")-->
|
||||
|
||||
<div id="popHeader" class="wide">
|
||||
<h3 class="xeAdmin">{$lang->cmd_send_message}</h3>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, send_message)">
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="sendMessage" action="./" method="get">
|
||||
<input type="hidden" name="act" value="procCommunicationSendMessage" />
|
||||
<input type="hidden" name="content" value="{htmlspecialchars($source_message->content)}" />
|
||||
<input type="hidden" name="receiver_srl" value="{$receiver_info->member_srl}" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<!--%import("js/communication_admin.js")-->
|
||||
<!--%import("../../editor/tpl/js/editor_module_config.js",optimized=false)-->
|
||||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<h3 class="xeAdmin">{$lang->communication} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="infoText">{nl2br($lang->about_communication)}</div>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="insertConfig" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue