Showing
3 changed files
with
5 additions
and
3 deletions
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <div class="contentpanel"> | 3 | <div class="contentpanel"> |
4 | <div class="row"> | 4 | <div class="row"> |
5 | <div class="col-md-12"> | 5 | <div class="col-md-12"> |
6 | - <form id="basicForm" role="form" class="form-horizontal form-bordered" method="post" action="<%action%>"> | 6 | + <form id="basicForm" role="form" class="form-horizontal form-bordered" method="post" action="/promotionInfo/add"> |
7 | 7 | ||
8 | <div class="panel panel-default"> | 8 | <div class="panel panel-default"> |
9 | <div class="panel-heading"> | 9 | <div class="panel-heading"> |
@@ -5,7 +5,8 @@ var saveConfig={ | @@ -5,7 +5,8 @@ var saveConfig={ | ||
5 | formId:"basicForm", | 5 | formId:"basicForm", |
6 | _btnId:"save", | 6 | _btnId:"save", |
7 | reloadUrl:"/promotionInfo/index", | 7 | reloadUrl:"/promotionInfo/index", |
8 | - tempId:"template_save" | 8 | + tempId:"template_save", |
9 | + action:"/promotionInfo/add" | ||
9 | } | 10 | } |
10 | 11 | ||
11 | $(document).on('click', '#'+saveConfig._btnId, function () { | 12 | $(document).on('click', '#'+saveConfig._btnId, function () { |
@@ -42,7 +43,7 @@ $(document).on('click', '#'+saveConfig._btnId, function () { | @@ -42,7 +43,7 @@ $(document).on('click', '#'+saveConfig._btnId, function () { | ||
42 | , function () { | 43 | , function () { |
43 | if(check){ | 44 | if(check){ |
44 | common.util.__ajax({ | 45 | common.util.__ajax({ |
45 | - url: $("#"+saveConfig.formId).attr("action"), | 46 | + url: $("#"+saveConfig.formId).attr("action")||saveConfig.action, |
46 | data: _form_data | 47 | data: _form_data |
47 | }, function () { | 48 | }, function () { |
48 | location.href = saveConfig.reloadUrl | 49 | location.href = saveConfig.reloadUrl |
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | var $ = require('jquery'), | 5 | var $ = require('jquery'), |
6 | common = require('../../../common/common'); | 6 | common = require('../../../common/common'); |
7 | require('../../../common/util/datepicker'); | 7 | require('../../../common/util/datepicker'); |
8 | +var addEdit=require("./Add"); | ||
8 | 9 | ||
9 | var g = new common.grid({ | 10 | var g = new common.grid({ |
10 | el: '#basicTable', | 11 | el: '#basicTable', |
-
Please register or login to post a comment