feha
Posts: 712
|
Posted: 07/10/2008, 3:12 AM |
|
Many times using Record forms have "Add/Edit" at the form "header" ...
This is not clear enough for non experienced users ...
It should be either ADD or EDIT not both, that can lead to confusion.
Here is my small solution:
Edit your record form TH (table header)
to:
<!-- BEGIN Panel PanelAddPage --><td class="th"><strong>{res:add_new_page}</strong></td><!-- END Panel PanelAddPage -->
<!-- BEGIN Panel PanelEditPage --><td class="th"><strong>{res:edit_current_page}</strong></td><!-- END Panel PanelEditPage -->
That means you need to add two panel controls ...
in BeforeShow Event (of Record Component) add this code:
if (! $Component->EditMode)
{
$Component->PanelAddPage->Visible = True;
$Component->PanelEditPage->Visible = False;
}
else
{
$Component->PanelEditPage->Visible = True;
$Component->PanelAddPage->Visible = False;
}
I have set both panels default visibility to No
For HTML semantic reasons the <strong> should/could be replaced with H1 tags ...
Hope this helps someone, and next CCS release implements this as standard
Enjoy
_________________
Regards
feha
www.vision.to
feedpixel.com |
|
|
wkempees
Posts: 1679
|
Posted: 07/10/2008, 5:44 AM |
|
Nice.
Third Panel needed to cater for Review mode, see authorization.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
|
|
|