OSDN Git Service

fix: local manifest/add helper
[pettanr/pettanr.git] / app / assets / javascripts / locmare / form.js.coffee
index c294c1f..462d071 100644 (file)
@@ -59,11 +59,7 @@ class Locmare.Form extends Locmare.FormBase
     @init_fields()\r
   \r
   render: () ->\r
-    @attr = {\r
-      method: @method_type(),\r
-      action: @action_url()\r
-    }\r
-    this.$el.attr(@attr)\r
+    this.$el.attr(@form_attr())\r
     this.$el.html('')\r
     @error_explanation = null\r
     @div_fields = new Locmare.FormModule.Fields({\r
@@ -79,6 +75,12 @@ class Locmare.Form extends Locmare.FormBase
       @delegateEvents({'submit': @method_type()})\r
     this\r
   \r
+  form_attr: () ->\r
+    {\r
+      method: @method_type(),\r
+      action: @action_url()\r
+    }\r
+  \r
   refresh: () ->\r
     _.each @fields, (field) =>\r
       field.refresh()\r