tweak forms + fix minor js bug if no multi sites

This commit is contained in:
did 2011-07-05 20:33:21 +02:00
parent 01b0cde69b
commit bf99a36b58
5 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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?

View File

@ -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) || ''

View File

@ -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);
})();

View File

@ -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;