@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
@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
success: (model, response) ->\r
if !Pettanr.cache.restore(model.cache_key())\r
# item is new\r
+ model.url = model.default_url()\r
Pettanr.cache.store(model)\r
else\r
@item.fix()\r