--- /dev/null
+#\r
+# Confirm page\r
+#\r
+class Pettanr.Views.ResourcePicture.Form extends Backbone.View\r
+ \r
+ initialize: (options) ->\r
+ super(options)\r
+ @resource_picture = options.resource_picture\r
+ @credits = options.credits\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ this.$el.append(@credits)\r
+ submit = new Tag.Submit({value: I18n.t('resource_pictures.new.publish')})\r
+ @listenTo(submit, 'click', @submit)\r
+ this.$el.append(submit.render().el)\r
+ this\r
+ \r
+ submit: () ->\r
+ @listenTo(@resource_picture, 'save:success', @success)\r
+ @listenTo(@resource_picture, 'save:fail', @fail)\r
+ @resource_picture.save()\r
+ \r
+ success: (model, response) ->\r
+ @trigger('success', @resource_picture)\r
+ \r
+ fail: (model, response) ->\r
+ @trigger('fail', model, response)\r
+ \r