renamed Request::csrfTokenName to csrfVar.

added version, csrfVar and csrfToken to yii js module.
This commit is contained in:
Qiang Xue
2013-09-15 18:54:26 -04:00
parent f5778b6bf0
commit 51c29e444d
4 changed files with 35 additions and 12 deletions

View File

@@ -43,7 +43,13 @@
*/
yii = (function ($) {
var pub = {
// version of Yii framework
version: '2.0',
// CSRF token name and value. If this is set and a form is created and submitted using JavaScript
// via POST, the CSRF token should be submitted too to pass CSRF validation.
csrfVar: undefined,
csrfToken: undefined,
initModule: function (module) {
if (module.isActive === undefined || module.isActive) {
if ($.isFunction(module.init)) {