mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
issue 46 apply validator to page module.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8541 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9885e98591
commit
db14f45898
16 changed files with 130 additions and 23 deletions
|
|
@ -31,11 +31,11 @@
|
||||||
<action name="procModuleAdminInsertCategory" type="controller" standalone="true" ruleset="insertCategory" />
|
<action name="procModuleAdminInsertCategory" type="controller" standalone="true" ruleset="insertCategory" />
|
||||||
<action name="procModuleAdminUpdateCategory" type="controller" standalone="true" ruleset="updateCategory" />
|
<action name="procModuleAdminUpdateCategory" type="controller" standalone="true" ruleset="updateCategory" />
|
||||||
<action name="procModuleAdminDeleteCategory" type="controller" standalone="true" ruleset="deleteCategory" />
|
<action name="procModuleAdminDeleteCategory" type="controller" standalone="true" ruleset="deleteCategory" />
|
||||||
<action name="procModuleAdminCopyModule" type="controller" standalone="true" />
|
<action name="procModuleAdminCopyModule" type="controller" standalone="true" ruleset="copyModule" />
|
||||||
<action name="procModuleAdminInsertGrant" type="controller" standalone="true" />
|
<action name="procModuleAdminInsertGrant" type="controller" standalone="true" />
|
||||||
<action name="procModuleAdminUpdateSkinInfo" type="controller" standalone="true" />
|
<action name="procModuleAdminUpdateSkinInfo" type="controller" standalone="true" />
|
||||||
<action name="procModuleAdminModuleSetup" type="controller" standalone="true" />
|
<action name="procModuleAdminModuleSetup" type="controller" standalone="true" ruleset="insertModuleSetup" />
|
||||||
<action name="procModuleAdminModuleGrantSetup" type="controller" standalone="true" />
|
<action name="procModuleAdminModuleGrantSetup" type="controller" standalone="true" ruleset="insertModulesGrant" />
|
||||||
<action name="procModuleAdminInsertLang" type="controller" standalone="true" />
|
<action name="procModuleAdminInsertLang" type="controller" standalone="true" />
|
||||||
<action name="procModuleAdminDeleteLang" type="controller" standalone="true" />
|
<action name="procModuleAdminDeleteLang" type="controller" standalone="true" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,13 @@
|
||||||
|
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
$this->setMessage('success_registed');
|
$this->setMessage('success_registed');
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
global $lang;
|
||||||
|
alertScript($lang->success_registed);
|
||||||
|
reload(true);
|
||||||
|
closePopupScript();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -317,10 +324,16 @@
|
||||||
$module_info->description = $vars->description;
|
$module_info->description = $vars->description;
|
||||||
$module_info->header_text = $vars->header_text;
|
$module_info->header_text = $vars->header_text;
|
||||||
$module_info->footer_text = $vars->footer_text;
|
$module_info->footer_text = $vars->footer_text;
|
||||||
$oModuleController->updateModule($module_info);
|
$output = $oModuleController->updateModule($module_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setMessage('success_registed');
|
$this->setMessage('success_registed');
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
global $lang;
|
||||||
|
alertScript($lang->success_registed);
|
||||||
|
closePopupScript();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -385,6 +398,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->setMessage('success_registed');
|
$this->setMessage('success_registed');
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
global $lang;
|
||||||
|
alertScript($lang->success_registed);
|
||||||
|
closePopupScript();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
18
modules/module/ruleset/copyModule.xml
Normal file
18
modules/module/ruleset/copyModule.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="module_srl" required="true" />
|
||||||
|
<field name="mid_1" rule="alpha_number" />
|
||||||
|
<field name="mid_2" rule="alpha_number" />
|
||||||
|
<field name="mid_3" rule="alpha_number" />
|
||||||
|
<field name="mid_4" rule="alpha_number" />
|
||||||
|
<field name="mid_5" rule="alpha_number" />
|
||||||
|
<field name="mid_6" rule="alpha_number" />
|
||||||
|
<field name="mid_7" rule="alpha_number" />
|
||||||
|
<field name="mid_8" rule="alpha_number" />
|
||||||
|
<field name="mid_9" rule="alpha_number" />
|
||||||
|
<field name="mid_10" rule="alpha_number" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
11
modules/module/ruleset/insertModuleSetup.xml
Normal file
11
modules/module/ruleset/insertModuleSetup.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="module_srls" required="true" />
|
||||||
|
<field name="module_category_srl" rule="number" />
|
||||||
|
<field name="layout_srl" rule="number" />
|
||||||
|
<field name="skin" required="true" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
8
modules/module/ruleset/insertModulesGrant.xml
Normal file
8
modules/module/ruleset/insertModulesGrant.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="module_srls" required="true" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<!--%import("js/module_admin.js")-->
|
<!--%import("js/module_admin.js")-->
|
||||||
<!--%import("filter/copy_module.xml")-->
|
|
||||||
|
|
||||||
<div id="popHeader" class="wide">
|
<div id="popHeader" class="wide">
|
||||||
<h3 class="xeAdmin">{$lang->module_copy}</h3>
|
<h3 class="xeAdmin">{$lang->module_copy}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="./" method="post" onsubmit="return procFilter(this, copy_module)" >
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form rule="copyModule" action="./" method="post">
|
||||||
|
<input type="hidden" name="act" value="procModuleAdminCopyModule" />
|
||||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||||
|
|
||||||
<div id="popBody">
|
<div id="popBody">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<!--%import("js/module_admin.js")-->
|
<!--%import("js/module_admin.js")-->
|
||||||
<!--%import("filter/insert_modules_grant.xml")-->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery( function() { jQuery('.grant_default').change( function(event) { doShowGrantZone(); } ); doShowGrantZone() } );
|
jQuery( function() { jQuery('.grant_default').change( function(event) { doShowGrantZone(); } ); doShowGrantZone() } );
|
||||||
|
|
@ -10,7 +9,9 @@
|
||||||
<h3 class="xeAdmin">{$lang->bundle_grant_setup}</h3>
|
<h3 class="xeAdmin">{$lang->bundle_grant_setup}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_modules_grant)" id="fo_obj">
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form ruleset="insertModulesGrant" action="./" method="post" id="fo_obj">
|
||||||
|
<input type="hidden" name="act" value="procModuleAdminModuleGrantSetup" />
|
||||||
<input type="hidden" name="module_srls" value="{$module_srls}" />
|
<input type="hidden" name="module_srls" value="{$module_srls}" />
|
||||||
|
|
||||||
<div id="popBody">
|
<div id="popBody">
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
<!--%import("./filter/insert_module_setup.xml")-->
|
|
||||||
<!--%import("./js/module_admin.js")-->
|
<!--%import("./js/module_admin.js")-->
|
||||||
|
|
||||||
<div id="popHeader" class="wide">
|
<div id="popHeader" class="wide">
|
||||||
<h3 class="xeAdmin">{$lang->bundle_setup}</h3>
|
<h3 class="xeAdmin">{$lang->bundle_setup}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_module_setup)" enctype="multipart/form-data">
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form ruleset="insertModuleSetup" action="./" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="act" value="procModuleAdminModuleSetup" />
|
||||||
<input type="hidden" name="module_srls" value="{$module_srls}" />
|
<input type="hidden" name="module_srls" value="{$module_srls}" />
|
||||||
<div id="popBody">
|
<div id="popBody">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,10 @@
|
||||||
<action name="dispPageAdminMobileContent" type="view" standalone="true" />
|
<action name="dispPageAdminMobileContent" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="procPageAdminRemoveWidgetCache" type="controller" standalone="true" />
|
<action name="procPageAdminRemoveWidgetCache" type="controller" standalone="true" />
|
||||||
<action name="procPageAdminInsert" type="controller" standalone="true" />
|
<action name="procPageAdminInsert" type="controller" standalone="true" ruleset="insertPage" />
|
||||||
|
<action name="procPageAdminUpdate" type="controller" standalone="true" ruleset="updatePage" />
|
||||||
<action name="procPageAdminInsertContent" type="controller" standalone="true" />
|
<action name="procPageAdminInsertContent" type="controller" standalone="true" />
|
||||||
<action name="procPageAdminDelete" type="controller" standalone="true" />
|
<action name="procPageAdminDelete" type="controller" standalone="true" ruleset="deletePage" />
|
||||||
<action name="procPageAdminInsertConfig" type="controller" standalone="true" />
|
<action name="procPageAdminInsertConfig" type="controller" standalone="true" />
|
||||||
<action name="procPageAdminAddContent" type="controller" standalone="true" />
|
<action name="procPageAdminAddContent" type="controller" standalone="true" />
|
||||||
<action name="procPageAdminArticleDocumentInsert" type="controller" standalone="true" />
|
<action name="procPageAdminArticleDocumentInsert" type="controller" standalone="true" />
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
// Set board module
|
// Set board module
|
||||||
$args = Context::getRequestVars();
|
$args = Context::getRequestVars();
|
||||||
$args->module = 'page';
|
$args->module = 'page';
|
||||||
$args->mid = $args->page_name;
|
$args->mid = $args->page_name; //because if mid is empty in context, set start page mid
|
||||||
unset($args->page_name);
|
unset($args->page_name);
|
||||||
|
|
||||||
if($args->use_mobile != 'Y') $args->use_mobile = '';
|
if($args->use_mobile != 'Y') $args->use_mobile = '';
|
||||||
|
|
@ -78,8 +78,21 @@
|
||||||
$this->add("page", Context::get('page'));
|
$this->add("page", Context::get('page'));
|
||||||
$this->add('module_srl',$output->get('module_srl'));
|
$this->add('module_srl',$output->get('module_srl'));
|
||||||
$this->setMessage($msg_code);
|
$this->setMessage($msg_code);
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'module_srl', $output->get('module_srl'), 'act', 'dispPageAdminInfo');
|
||||||
|
header('location:'.$returnUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Page Modify
|
||||||
|
**/
|
||||||
|
function procPageAdminUpdate()
|
||||||
|
{
|
||||||
|
$this->procPageAdminInsert();
|
||||||
|
}
|
||||||
|
|
||||||
function putDocumentsInPageToArray($target, &$array)
|
function putDocumentsInPageToArray($target, &$array)
|
||||||
{
|
{
|
||||||
if(!$target) return;
|
if(!$target) return;
|
||||||
|
|
@ -163,6 +176,11 @@
|
||||||
$this->add('module','page');
|
$this->add('module','page');
|
||||||
$this->add('page',Context::get('page'));
|
$this->add('page',Context::get('page'));
|
||||||
$this->setMessage('success_deleted');
|
$this->setMessage('success_deleted');
|
||||||
|
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||||
|
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'module_srl', $output->get('module_srl'), 'act', 'dispPageAdminInfo');
|
||||||
|
header('location:'.$returnUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
8
modules/page/ruleset/deletePage.xml
Normal file
8
modules/page/ruleset/deletePage.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="module_srl" required="true" rule="number" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
10
modules/page/ruleset/insertPage.xml
Normal file
10
modules/page/ruleset/insertPage.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="page_type" required="true" rule="alpha" />
|
||||||
|
<field name="page_name" required="true" length=":40" rule="alpha_number" />
|
||||||
|
<field name="browser_title" required="true" length=":250" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
9
modules/page/ruleset/updatePage.xml
Normal file
9
modules/page/ruleset/updatePage.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ruleset version="1.5.0">
|
||||||
|
<customrules>
|
||||||
|
</customrules>
|
||||||
|
<fields>
|
||||||
|
<field name="page_name" required="true" length=":40" rule="alpha_number" />
|
||||||
|
<field name="browser_title" required="true" length=":250" />
|
||||||
|
</fields>
|
||||||
|
</ruleset>
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
<!--%import("filter/delete_page.xml")-->
|
|
||||||
<!--%import("js/page_admin.js")-->
|
<!--%import("js/page_admin.js")-->
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, delete_page)">
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form ruleset="deletePage" action="./" method="post">
|
||||||
|
<input type="hidden" name="act" value="procPageAdminDelete" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||||
<h4 class="xeAdmin">{$lang->confirm_delete}</h4>
|
<h4 class="xeAdmin">{$lang->confirm_delete}</h4>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<!--%import("filter/insert_page.xml")-->
|
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_page)" enctype="multipart/form-data">
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form ruleset="updatePage" action="./" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="act" value="procPageAdminUpdate" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||||
|
|
||||||
|
|
@ -15,7 +16,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><div>{$lang->mid}</div></th>
|
<th scope="row"><div>{$lang->mid}</div></th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="mid" value="{$module_info->mid}" class="inputTypeText w200" />
|
<input type="text" name="page_name" value="{$module_info->mid}" class="inputTypeText w200" />
|
||||||
<p>{$lang->about_mid}</p>
|
<p>{$lang->about_mid}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
<!--%import("filter/insert_page.xml")-->
|
|
||||||
<!--%import("filter/insert_outside.xml")-->
|
<!--%import("filter/insert_outside.xml")-->
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
<form id="fo_insert_page" action="./" method="post" onsubmit="return procFilter(this, insert_page)" enctype="multipart/form-data">
|
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||||
|
<form ruleset="insertPage" id="fo_insert_page" action="./" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="act" value="procPageAdminInsert" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||||
<table cellspacing="0" class="rowTable topGap">
|
<table cellspacing="0" class="rowTable topGap">
|
||||||
|
|
@ -26,12 +27,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<!--@if($logged_info->is_admin!='Y')-->
|
<!--@if($logged_info->is_admin!='Y')-->
|
||||||
<input type="hidden" name="mid" value="{$module_info->mid}" />
|
<input type="hidden" name="page_name" value="{$module_info->mid}" />
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
<tr class="row2">
|
<tr class="row2">
|
||||||
<th scope="row"><div>{$lang->mid}</div></th>
|
<th scope="row"><div>{$lang->mid}</div></th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="text" name="mid" value="{$module_info->mid}" class="inputTypeText w200" />
|
<input type="text" name="page_name" value="{$module_info->mid}" class="inputTypeText w200" />
|
||||||
<p>{$lang->about_mid}</p>
|
<p>{$lang->about_mid}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue