HughP / simal

Automatically exported from code.google.com/p/simal
0 stars 0 forks source link

Read-only input=text is hard to style #388

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The "shortdesc" project description is currently being presented as an <input 
type="text" readonly="readonly"/>

This is hard to style because the text doesn't wrap. Also, for reasons I don't 
really understand, settings like "width: 100%" don't seem to work.

So, if possible, something like <p> or possibly even <textarea> would be better.

Original issue reported on code.google.com by Stevage on 17 Feb 2011 at 4:15

GoogleCodeExporter commented 9 years ago
This is the kind of thing that will be fixed if a patch is provided. Current 
devs only use Simal for internal work and thus don't care much about styling 
(yet). However there is no reason why we wouldn't apply an appropriate patch. 

Original comment by ross.gardler on 17 Feb 2011 at 9:20

GoogleCodeExporter commented 9 years ago
Ok. It's a bit hard to actually submit a patch due to how different my 
EditProjectPanel.htm is atm. I hope this is acceptable:
----
In EditProjectPanel.htm, replace:

<input wicket:id="shortDesc"/>

with:

<textArea wicket:id="shortDesc"></textArea>

In EditProjectPanel.java, make this change:

TextField<String> shortDesc = new TextField<String>(
          "shortDesc", new PropertyModel<String>(project, "shortDesc"));

becomes

TextArea<String> shortDesc = new TextArea<String>(
          "shortDesc", new PropertyModel<String>(project, "shortDesc"));

I don't know enough yet to understand whether readonly data has to be presented 
as an input control, but at least a textarea wraps...

Original comment by Stevage on 1 Mar 2011 at 9:14