Sha256: a2830665cbb99959a2bf1859fc2321cf54454fd15ee26a6c560748136a37c174
Contents?: true
Size: 908 Bytes
Versions: 1
Compression:
Stored size: 908 Bytes
Contents
angular.module("hyperadmin") .directive "resourceForm", -> template: """ <div class="row"> <div class="col-xs-12" ng-controller="FormCtrl as formCtrl"> <form-errors errors="formCtrl.errors"></form-errors> <form class="form-horizontal" name="form" ng-submit="formCtrl.submit()" novalidate> <form-input-group ng-repeat="attribute in resourceClass.form_attributes" resource="formCtrl.resource" attr="attribute.key" errors="formCtrl.errors[attribute.key]" human="attribute.human" type="attribute.type"> </form-input-group> <form-actions form="form" cancel-state="resourceClass.plural" </form> </div> </div> """ restrict: "E" scope: resourceClass: "=resourceClass" controller: ($scope) -> [ "id", "created_at", "updated_at" ].forEach (attr) -> delete $scope.resourceClass.form_attributes[attr]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyper_admin-0.4.0 | app/assets/javascripts/hyper_admin/angularjs/directives/form/resource_form.js.coffee |