issue 46 apply validator to syndication module

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8554 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-06-30 06:33:24 +00:00
parent 60d7f6fb84
commit 4d26d3b980
4 changed files with 17 additions and 3 deletions

View file

@ -5,7 +5,7 @@
<actions> <actions>
<action name="getSyndicationList" type="model" standalone="true" /> <action name="getSyndicationList" type="model" standalone="true" />
<action name="dispSyndicationAdminConfig" type="view" standalone="true" admin_index="true" /> <action name="dispSyndicationAdminConfig" type="view" standalone="true" admin_index="true" />
<action name="procSyndicationAdminInsertService" type="controller" standalone="true" /> <action name="procSyndicationAdminInsertService" type="controller" standalone="true" ruleset="insertService" />
<action name="procSyndicationAdminCheckSitePingResult" type="controller" standalone="true" /> <action name="procSyndicationAdminCheckSitePingResult" type="controller" standalone="true" />
<action name="procSyndicationAdminCheckApiStatus" type="controller" standalone="true" /> <action name="procSyndicationAdminCheckApiStatus" type="controller" standalone="true" />
</actions> </actions>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="site_url" required="true" />
</fields>
</ruleset>

View file

@ -37,6 +37,11 @@
} }
$this->setMessage('success_applied'); $this->setMessage('success_applied');
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSyndicationAdminConfig');
header('location:'.$returnUrl);
return;
}
} }
function procSyndicationAdminCheckSitePingResult(){ function procSyndicationAdminCheckSitePingResult(){

View file

@ -1,11 +1,12 @@
<!--%import("css/syndication.css")--> <!--%import("css/syndication.css")-->
<!--%import("js/syndication.js")--> <!--%import("js/syndication.js")-->
<!--%import("filter/insert_service.xml")-->
<h3 class="xeAdmin">{$lang->syndication} <span class="gray">{$lang->cmd_management}</span></h3> <h3 class="xeAdmin">{$lang->syndication} <span class="gray">{$lang->cmd_management}</span></h3>
<p class="summary">{$lang->about_syndication}</p> <p class="summary">{$lang->about_syndication}</p>
<form action="./" method="get" onsubmit="return procFilter(this, insert_service);"> <p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
<form ruleset="insertService" action="./" method="post">
<input type="hidden" name="act" value="procSyndicationAdminInsertService" />
<input type="hidden" name="year" value="{$year}" /> <input type="hidden" name="year" value="{$year}" />
<table cellspacing="0" class="rowTable"> <table cellspacing="0" class="rowTable">
<tr> <tr>