clean up stray hidden input tags by passing the data directly into the js where possible and placing them under an existing form tag elsewhere
This commit is contained in:
parent
699264e7a3
commit
53bdb2cade
5 changed files with 5 additions and 8 deletions
|
|
@ -2,8 +2,6 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= hidden_field_tag :contact_json, @selected_contacts.map{|contact| contact.person}.to_json
|
||||
|
||||
%h4
|
||||
.right
|
||||
= link_to t('contacts', :count => @contact_count), manage_aspects_path, :title => t('aspects.manage.manage_aspects')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( $('#contact_json').val() ),
|
||||
var data = $.parseJSON( '#{@all_contacts_and_ids.to_json}' ),
|
||||
autocompleteInput = $("#contact_autocomplete");
|
||||
|
||||
autocompleteInput.autoSuggest(data, {
|
||||
|
|
@ -23,7 +23,6 @@
|
|||
autocompleteInput.focus();
|
||||
});
|
||||
|
||||
= hidden_field_tag :contact_json, @all_contacts_and_ids.to_json
|
||||
|
||||
#new_message_pane
|
||||
.span-12.last
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( $('#tags_json').val() ),
|
||||
var data = $.parseJSON( '#{@tags_array.to_json}' ),
|
||||
autocompleteInput = $("#profile_tag_string");
|
||||
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
minChars: 2,
|
||||
keyDelay: 0,
|
||||
startText: "#{t('profiles.edit.your_tags_placeholder')}",
|
||||
emptyText: '#{t('no_results')}',
|
||||
emptyText: "#{t('no_results')}",
|
||||
preFill: data
|
||||
});
|
||||
|
||||
|
|
@ -36,7 +36,6 @@
|
|||
});
|
||||
|
||||
|
||||
= hidden_field_tag :tags_json, @tags_array.to_json
|
||||
%h3
|
||||
= t('profiles.edit.your_public_profile')
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
.content_creation
|
||||
= form_for(StatusMessage.new, :remote => true, :html => {"data-type" => "json"}) do |status|
|
||||
- if @selected_contacts
|
||||
= hidden_field_tag :contact_json, @selected_contacts.map{|contact| contact.person}.to_json
|
||||
= status.error_messages
|
||||
#file-upload
|
||||
= image_tag 'icons/photos.png'
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
});
|
||||
|
||||
#new_status_message_pane
|
||||
= hidden_field_tag :contact_json, @selected_contacts.map{|contact| contact.person}.to_json
|
||||
.span-15.last
|
||||
#facebox_header
|
||||
%h4
|
||||
|
|
|
|||
Loading…
Reference in a new issue