Created
April 10, 2015 12:08
-
-
Save nocubicles/3d1b3ae7bc530ee4c74e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template name="insertProduct"> | |
| {{#autoForm collection="Products" id="insertProduct" type="insert" }} | |
| <fieldset> | |
| <legend>Lisa midagi</legend> | |
| {{> afQuickField name="tooteNimetus"}} | |
| {{> afQuickField name="partii"}} | |
| {{> afQuickField name="trummel"}} | |
| {{> afQuickField name="tootmistellimus"}} | |
| </fieldset> | |
| <button type="submit" class="btn btn-primary">Insert</button> | |
| {{/autoForm}} | |
| </template> | |
| Template.insertProduct.events = { | |
| 'click submit': function(event) { | |
| Meteor.call('startCountDown') | |
| console.log("working?") | |
| } | |
| }; | |
| var startOfCountdown = new Date(); | |
| Meteor.methods({ | |
| startCountDown: function() { | |
| Products.insert({ | |
| startOfCountdown: startOfCountdown.setHours(startOfCountdown.getHours() + 48), | |
| }) | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment