Thanks for the clear explanation Paolo.  This makes the errors very obvious 
again -- something my user base urgently needs!

-- Joe B.

On Wednesday, December 12, 2012 1:34:39 PM UTC-8, Paolo Caruccio wrote:
>
> Yes, there are stylistic reasons. The style is inspired to bootstrap 
> "input with error" example (validation state paragraph in 
> http://twitter.github.com/bootstrap/base-css.html?#forms).
>
> You can revert the original error behaviour by adding a comment to the 
> lines from # 56 to # 73 in web2py_bootstrap.css:
>
> /* below rules are only for formstyle = bootstrap
> trying to make errors look like bootstrap ones */
> div.controls .error_wrapper{
>   display:inline-block;
>   margin-bottom:0;
>   vertical-align:middle;
> }
> div.controls .error{
>   min-width:5px;
>   background:inherit;
>   color:#B94A48;
>   border:none;
>   padding:0;
>   margin:0;
>   /*display:inline;*/ /* uncommenting this, the animation effect is lost 
> */
> }
> div.controls .inline-help{color:#3A87AD;}
> div.controls .error_wrapper+.inline-help{margin-left:-99999px;}
>
>
>
>
> Il giorno mercoledì 12 dicembre 2012 18:41:52 UTC+1, Joe Barnhart ha 
> scritto:
>>
>> Looks like its not a Javascript problem.  (whew, dodged that one!)
>>
>> Poking around, it seems the error classes have been overridden in 
>> web2py_bootstrap.css in a bunch of ways.  The "error_wrapper" class was 
>> made an "inline-block" instead of a "block", which is what caused the 
>> immediate problem.  But the "error" class was also changed into simple dark 
>> red text instead of the highly-visible red gradient block with white text.
>>
>> Are there stylistic reasons for the changes?  Is there a "look" to 
>> bootstrap-enabled applications?  The error text off to the side is clearly 
>> an error because it interferes with the "comment" span of the control.  But 
>> I also wish to understand the reasons for the other changes which make it 
>> harder for find the error text in a large form.
>>
>> -- Joe
>>
>> On Wednesday, December 12, 2012 9:03:59 AM UTC-8, Joe Barnhart wrote:
>>>
>>> I was trying the formstyle="bootstrap" option and starting to like the 
>>> results.  But I noticed that the normal error flash does not work properly 
>>> with this form style.  Instead of sliding down and showing the error 
>>> beneath the input field with the error, the error string appears to the 
>>> right of the field, with colored text but without the normal colored 
>>> background.
>>>
>>> I'm pretty sure the problem is with the jQuery code that accompanies 
>>> web2py.  It is likely trying to attach the "error" div to the wrong point 
>>> in the DOM when using the "bootstrap" option.  I'm just not clever enough 
>>> with jQuery yet to know where to bang on it with the hammer.  Highest 
>>> points awarded for a solution that works with all form styles!
>>>
>>> -- Joe
>>>
>>>

-- 



Reply via email to