Commit 316925aec8348f4c985e1ed3c1c350ecc581cee3
1 parent
d488fa59
Exists in
send_email_to_admins
and in
5 other branches
video plugin: rename block type on database
Also, small fixes on forms
Showing
6 changed files
with
21 additions
and
6 deletions
Show diff stats
app/views/cms/edit.html.erb
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <%= render :partial => 'archived_warning', :locals => {:article => @article} %> |
5 | 5 | <% end %> |
6 | 6 | <div class='<%= (@article.display_media_panel? ? 'with_media_panel' : 'no_media_panel') %>'> |
7 | -<%= labelled_form_for 'article', :html => { :multipart => true, :class => @type } do |f| %> | |
7 | +<%= labelled_form_for 'article', :html => { :multipart => true, :class => "#{@type} #{@type.to_css_class}" } do |f| %> | |
8 | 8 | |
9 | 9 | <%= hidden_field_tag("type", @type) if @type %> |
10 | 10 | ... | ... |
plugins/video/db/migrate/20160115185550_rename_video_block.rb
0 → 100644
plugins/video/public/style.css
plugins/video/views/cms/video_plugin/_video.html.erb
1 | 1 | <%= required_fields_message %> |
2 | 2 | |
3 | 3 | <div> |
4 | -<%= required f.text_field('name', :size => '64', :maxlength => 150) %> | |
5 | -<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 80) %> | |
4 | +<%= required f.text_field('name') %> | |
5 | +<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url) %> | |
6 | 6 | <%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> |
7 | 7 | <%= render :partial => 'general_fields' %> |
8 | 8 | <%= render :partial => 'translatable' %> | ... | ... |
plugins/video/views/cms/video_plugin/_video_gallery.html.erb
1 | 1 | <%= required_fields_message %> |
2 | 2 | |
3 | -<%= required f.text_field('name', :size => '64', :maxlength => 150) %> | |
3 | +<%= required f.text_field('name', :maxlength => 150) %> | |
4 | 4 | <%= render :partial => 'general_fields' %> |
5 | 5 | |
6 | 6 | <%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> | ... | ... |
test/functional/cms_controller_test.rb
... | ... | @@ -1738,7 +1738,7 @@ class CmsControllerTest < ActionController::TestCase |
1738 | 1738 | [Blog, TinyMceArticle, Forum].each do |klass| |
1739 | 1739 | a = fast_create(klass, :profile_id => profile.id) |
1740 | 1740 | get :edit, :profile => profile.identifier, :id => a.id |
1741 | - assert_tag :tag => 'form', :attributes => {:class => klass.to_s} | |
1741 | + assert_tag :tag => 'form', :attributes => {:class => "#{a.type} #{a.type.to_css_class}"} | |
1742 | 1742 | end |
1743 | 1743 | end |
1744 | 1744 | ... | ... |