Sha256: f996ad359f9782aef1fd3c282d0547a42d66bbcd81f6af94a982f4b1eac69218
Contents?: true
Size: 503 Bytes
Versions: 2
Compression:
Stored size: 503 Bytes
Contents
import { Env, UI, Views } from "loco-js"; import CommentModel from "models/article/Comment"; class Form extends Views.Base { constructor(opts = {}) { super(opts); } render(opts = {}) { const form = new UI.Form({ for: new CommentModel({ id: opts.commentId, resource: "admin" }), id: `edit_comment_${opts.commentId}`, initObj: true }); form.render(); // only for testing purpose Env.test = { commentFormObj: form.getObj() }; } } export default Form;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.5 | test/dummy/frontend/js/views/admin/comments/Form.js |
loco-rails-3.0.4 | test/dummy/frontend/js/views/admin/comments/Form.js |