Plato on Github
Report Home
ampersand/template/shared/client/pages/person-add.js
Maintainability
80.85
Lines of code
29
Difficulty
7.15
Estimated Errors
0.18
Function weight
By Complexity
By SLOC
var app = require('ampersand-app'); var PageView = require('./base'); var templates = require('../templates'); var PersonForm = require('../forms/person'); module.exports = PageView.extend({ pageTitle: 'add person', template: templates.pages.personAdd, subviews: { form: { container: 'form', prepareView: function (el) { return new PersonForm({ el: el, submitCallback: function (data) { app.people.create(data, { wait: true, success: function () { app.navigate('/collections'); app.people.fetch(); } }); } }); } } } });