diff --git a/app/views/cms/edit.html.erb b/app/views/cms/edit.html.erb index 9da4fb0..e2ddf2f 100644 --- a/app/views/cms/edit.html.erb +++ b/app/views/cms/edit.html.erb @@ -4,7 +4,7 @@ <%= render :partial => 'archived_warning', :locals => {:article => @article} %> <% end %>
'> -<%= labelled_form_for 'article', :html => { :multipart => true, :class => @type } do |f| %> +<%= labelled_form_for 'article', :html => { :multipart => true, :class => "#{@type} #{@type.to_css_class}" } do |f| %> <%= hidden_field_tag("type", @type) if @type %> diff --git a/plugins/video/db/migrate/20160115185550_rename_video_block.rb b/plugins/video/db/migrate/20160115185550_rename_video_block.rb new file mode 100644 index 0000000..cced0fc --- /dev/null +++ b/plugins/video/db/migrate/20160115185550_rename_video_block.rb @@ -0,0 +1,10 @@ +class RenameVideoBlock < ActiveRecord::Migration + def up + execute("UPDATE blocks SET type = 'VideoPlugin::VideoBlock' WHERE type = 'VideoBlock'") + end + + def down + say "this migration can't be reverted" + end +end + diff --git a/plugins/video/public/style.css b/plugins/video/public/style.css index bb7361b..9056b11 100644 --- a/plugins/video/public/style.css +++ b/plugins/video/public/style.css @@ -63,4 +63,9 @@ width: 100%; margin-left: auto; margin-right: auto; -} \ No newline at end of file +} + +form.video-plugin_video .type-text input, +form.video-plugin_video .type-textarea textarea { + width: 100%; +} diff --git a/plugins/video/views/cms/video_plugin/_video.html.erb b/plugins/video/views/cms/video_plugin/_video.html.erb index 0453da2..6554d83 100644 --- a/plugins/video/views/cms/video_plugin/_video.html.erb +++ b/plugins/video/views/cms/video_plugin/_video.html.erb @@ -1,8 +1,8 @@ <%= required_fields_message %>
-<%= required f.text_field('name', :size => '64', :maxlength => 150) %> -<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 80) %> +<%= required f.text_field('name') %> +<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url) %> <%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> <%= render :partial => 'general_fields' %> <%= render :partial => 'translatable' %> diff --git a/plugins/video/views/cms/video_plugin/_video_gallery.html.erb b/plugins/video/views/cms/video_plugin/_video_gallery.html.erb index ce95bd1..d0e186a 100644 --- a/plugins/video/views/cms/video_plugin/_video_gallery.html.erb +++ b/plugins/video/views/cms/video_plugin/_video_gallery.html.erb @@ -1,6 +1,6 @@ <%= required_fields_message %> -<%= required f.text_field('name', :size => '64', :maxlength => 150) %> +<%= required f.text_field('name', :maxlength => 150) %> <%= render :partial => 'general_fields' %> <%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 5851d54..8529408 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -1738,7 +1738,7 @@ class CmsControllerTest < ActionController::TestCase [Blog, TinyMceArticle, Forum].each do |klass| a = fast_create(klass, :profile_id => profile.id) get :edit, :profile => profile.identifier, :id => a.id - assert_tag :tag => 'form', :attributes => {:class => klass.to_s} + assert_tag :tag => 'form', :attributes => {:class => "#{a.type} #{a.type.to_css_class}"} end end -- libgit2 0.21.2