diff --git a/app/views/admin/snippets/_form.html.haml b/app/views/admin/snippets/_form.html.haml index 7a159573..abffcbf3 100644 --- a/app/views/admin/snippets/_form.html.haml +++ b/app/views/admin/snippets/_form.html.haml @@ -3,7 +3,7 @@ = include_stylesheets :fancybox = f.inputs :name => :information do - = f.input :name + = f.input :name, :wrapper_html => { :class => 'highlighted' } = f.input :slug, :required => false = f.inputs :name => :code do diff --git a/doc/TODO b/doc/TODO index 5043677e..f46befff 100644 --- a/doc/TODO +++ b/doc/TODO @@ -66,7 +66,7 @@ x rake task to import a remote template x MERGE x remove withelist for assets since we've got now roles x admin role is not correctly set when creating a new website -- the required star for file field is not shown +x the required star for file field is not shown - test and/or convert existing templates (the 2 of the themes section) - tooltip to explain the difference between 1.) Admin 2.) Author 3.) Designer? diff --git a/lib/locomotive/misc_form_builder.rb b/lib/locomotive/misc_form_builder.rb index 812e7ec4..1d653a4f 100644 --- a/lib/locomotive/misc_form_builder.rb +++ b/lib/locomotive/misc_form_builder.rb @@ -17,7 +17,7 @@ module Locomotive default_options = { :css => '', :with_label => true, :label => nil } options = default_options.merge(options) - html = options[:with_label] ? self.label(options[:label] || name) : '' + html = options[:with_label] ? self.label(options[:label] || name, { :required => options[:required] }) : '' html += template.capture(&block) || '' html += inline_hints_for(name, options) || '' html += self.errors_on(name) || '' diff --git a/public/javascripts/admin/application.js b/public/javascripts/admin/application.js index e4d17ba3..7137c620 100644 --- a/public/javascripts/admin/application.js +++ b/public/javascripts/admin/application.js @@ -126,6 +126,9 @@ $(document).ready(function() { (function() { var link = $('#sites-picker-link'); var picker = $('#sites-picker'); + + if (picker.empty()) return; + var left = link.position().left + link.parent().position().left - (picker.width() - link.width()); picker.css('left', left); })(); diff --git a/public/stylesheets/admin/formtastic_changes.css b/public/stylesheets/admin/formtastic_changes.css index fa0db65c..8bd3d7b6 100644 --- a/public/stylesheets/admin/formtastic_changes.css +++ b/public/stylesheets/admin/formtastic_changes.css @@ -502,8 +502,6 @@ form.formtastic fieldset ol li.has-many ul li.template span.actions button span font-size: 0.8em; } - - /* ___ my account ___ */ form.formtastic fieldset.language li.full span { @@ -527,6 +525,10 @@ form.formtastic fieldset.email li.full input { margin-left: 20px; } +form.formtastic fieldset.email li.full .inline-errors { + margin-left: 20px; +} + form.formtastic fieldset.memberships ol li .role { position: absolute; top: 2px;