Sourcecode in Layout/actions.js:
1: function edit_action() {
2: if (req.data.cancel)
3: res.redirect(this.href());
4: else if (req.data.save) {
5: try {
6: res.message = this.evalLayout(req.data, session.user);
7: res.redirect(this._parent.href());
8: } catch (err) {
9: res.message = err.toString();
10: }
11: }
12:
13: res.data.action = this.href(req.action);
14: res.data.title = getMessage("Layout.editTitle", {layoutTitle: this.title});
15: res.data.body = this.renderSkinAsString("edit");
16: res.handlers.context.renderSkin("page");
17: return;
18: }
|