Sha256: 5234f43db264cf215b19c3c9cea8459fa4eb8609e88b9986d609cc6167e0d370
Contents?: true
Size: 1.99 KB
Versions: 24
Compression:
Stored size: 1.99 KB
Contents
- if @collective.nil? - resource = message.new_record? ? message_train.box_messages_path(@box) : message_train.box_message_path(@box, message) - else - resource = message.new_record? ? message_train.collective_box_messages_path(@collective.path_part, @box) : message_train.collective_box_message_path(@collective.path_part, @box, message) = bootstrap_form_for message, url: resource do |f| - if @collective.nil? = f.fields_for :recipients_to_save do |g| = g.text_field :users, label: :recipients.l, class: 'recipient-input' - add_footer_javascript do :javascript url = '/box/in/participants/users.json' var suggestions = new Bloodhound({ prefetch: url, remote: { wildcard: '%QUERY', url: url + '?query=%QUERY', transform: function(response) { return $.map(response.participants, function(val, i) { return val.slug }); } }, queryTokenizer: Bloodhound.tokenizers.whitespace, datumTokenizer: function(item) { return Bloodhound.tokenizers.whitespace(item.slug); } }); - else = render partial: 'message_train/participants/prefilled_field', locals: { message: message, recipient: @collective } = f.text_field :subject = f.form_group :body, label: { text: MessageTrain::Message.human_attribute_name(:body) } do = f.cktext_area :body .links %h3 = link_to_add_association(icon('plus'), f, :attachments, title: :add_attachment.l, class: 'btn btn-info', id: 'add-attachment', data: { association_insertion_method: 'append', association_insertion_node: '#attachments'}) = :attachments.l #attachments = f.fields_for :attachments do |attachment| = render 'attachment_fields', f: attachment = f.submit :save_as_draft.l, name: 'message[draft]', id: 'save-as-draft' = f.submit :send.l, class: 'btn btn-primary', name: 'message[draft]', id: 'send'
Version data entries
24 entries across 24 versions & 1 rubygems