Sha256: 3fe71c7207be440a82ab787548b5c012db607e1415578b97e4ecc19bd96f4226
Contents?: true
Size: 898 Bytes
Versions: 1
Compression:
Stored size: 898 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.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.attributes[attr]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyper_admin-0.3.0 | app/assets/javascripts/hyper_admin/angularjs/directives/form/resource_form.js.coffee |