CreativeParts / meteor-autoform-mdl

Material Design Lite template for Meteor Autoform
MIT License
7 stars 0 forks source link

Does this work? #2

Open nodeGarden opened 8 years ago

nodeGarden commented 8 years ago

Tried adding from Atmosphere, but didn't work. Cloned GIT repo then added. It says it was successful, but my form still doesn't get any MDL classes applied.

Installation:

Armandos-MacBook:packages mondo$ iron add creativeparts:meteor-autoform-mdl
> meteor add creativeparts:meteor-autoform-mdl
 => Errors while parsing arguments:

While adding package creativeparts:meteor-autoform-mdl:
error: no such package
Armandos-MacBook:packages mondo$ git clone https://github.com/CreativeParts/meteor-autoform-mdl
Cloning into 'meteor-autoform-mdl'...
remote: Counting objects: 1061, done.
remote: Total 1061 (delta 0), reused 0 (delta 0), pack-reused 1060
Receiving objects: 100% (1061/1061), 128.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (458/458), done.
Checking connectivity... done.
Armandos-MacBook:packages mondo$ iron add creativeparts:meteor-autoform-mdl
> meteor add creativeparts:meteor-autoform-mdl

Changes to your project's package version selections:

creativeparts:meteor-autoform-mdl  added, version 0.0.1

creativeparts:meteor-autoform-mdl: Google MDL Autoform Theme - CreativeParts

Code:

<template name="InsertList">
  <div class="insert-list">
    <h1>Create New List</h1>
    {{> quickForm collection="Lists" id="insertListForm" type="insert" omitFields="createdBy,active" buttonContent="Create" template="quickForm_mdl" mdltheme="default" }}
  </div>
</template>

Package List:

Armandos-MacBook:packages mondo$ iron list

> meteor list
accounts-facebook                  1.0.10  Login service for Facebook accounts
accounts-google                    1.0.10  Login service for Google accounts
accounts-password                  1.3.0  Password support for accounts
accounts-twitter                   1.1.11  Login service for Twitter accounts
accounts-ui                        1.1.9  Simple templates to add login widge...
aldeed:autoform                    5.8.1  Easily create forms with automatic ...
aldeed:collection2                 2.10.0  Automatic validation of insert and...
aldeed:delete-button               2.0.0  Provides a delete button UI component
aldeed:simple-schema               1.5.3  A simple schema validation object w...
blaze-html-templates               1.0.5  Compile HTML templates into reactiv...
creativeparts:meteor-autoform-mdl  0.0.1+ Google MDL Autoform Theme - Creativ...
ecmascript                         0.5.8  Compiler plugin that supports ES201...
es5-shim                           4.6.14  Shims and polyfills to improve ECM...
fourseven:scss                     3.10.0  Style with attitude. Sass and SCSS...
iron:router                        1.0.13  Routing specifically designed for ...
jquery                             1.11.9  Manipulate the DOM using CSS selec...
meteor-base                        1.0.4  Packages that every Meteor app needs
mobile-experience                  1.0.4  Packages for a great mobile user ex...
momentjs:moment                    2.15.0  Moment.js (official): parse, valid...
mongo                              1.1.12  Adaptor for using MongoDB and Mini...
natestrauser:font-awesome          4.6.3  Latest version Font-Awesome loaded ...
shell-server                       0.2.1  Server-side component of the `meteo...
standard-minifier-css              1.2.0  Standard css minifier used with Met...
standard-minifier-js               1.2.0  Standard javascript minifiers used ...
stylus                             2.513.5  Expressive, dynamic, robust CSS
tracker                            1.1.0  Dependency tracker to allow reactiv...
useraccounts:mdl                   1.14.2  Accounts Templates MDL.
zodiase:mdl                        1.2.1  Google Material Design Lite for Met...

Output HTML

image

Validated that my Collection schema is good. Renders fine in Boostrap using AutoForm Playground.

Also tried with {{#autoForm}}, but that fails to print any form at all:

<template name="InsertList">
  <div class="insert-list">
    <h1>Create New List</h1>
    {{#autoForm collection="Lists" id="insertListForm" type="insert" omitFields="createdBy,active" buttonContent="Create" mdltheme="default" }}{{/autoForm}}
  </div>
</template>

Besides styling, the form does actually work (when using {{> quickForm}}

RamEduard commented 7 years ago

Just add the following line into a client file such as client/autoform-mdl.js

AutoForm.setDefaultTemplate('mdl');