app/views/commenteux/notes/new.html.erb in commenteux-1.1.2 vs app/views/commenteux/notes/new.html.erb in commenteux-1.1.3

- old
+ new

@@ -1,6 +1,6 @@ -<%= simple_form_for @comments, as: 'comments', url: "/commenteux/#{@resource.downcase}/#{@resource_id}?parent_div=#{@parent_div}", +<%= simple_form_for @comments, as: 'comments', url: "/commenteux/#{@resource.downcase}/#{@resource_id}?parent_div=#{@parent_div}&roles=#{@roles.blank? ? '' : @roles}", :remote => true, :data => {:parent => @parent_div}, wrapper: :bootstrap do |c| %> <div style="display:none"> <%= c.input :title %> </div> @@ -9,10 +9,18 @@ <div style="display:none"> <%= c.input :user_id, input_html: {value: current_user.id} %> </div> <% end %> + <% unless @list_roles.blank? %> + + <%= c.input :role, collection: @list_roles, as: :radio_buttons, :label_method => :last, :value_method => :first, + :input_html => {:data => {:required => true}}, label: 'RĂ´le', + :item_wrapper_class => 'inline' %> + + <% end %> + <div class="form-actions form-actions-padding-sm"> <div class="row"> <div class="col-md-10 col-md-offset-5"> <button class="btn btn-primary" type="submit" id='save'> @@ -20,10 +28,11 @@ </button> <%= link_to "Annuler", "#", :id => "new_notes_cancelled", :class => 'btn', :data => {:parent => @parent_div, :resource => @resource.downcase, - :id => @resource_id } %> + :id => @resource_id, + :roles => @roles} %> </div> </div> </div>