Hi Dan, another interesting bug.

For a long time, the preview button of action.edit didn't work for me:
it did the same than the save button. I keep a "clean" site, with no
config changes, as a reference: it had no problem. But the preview
button of all my own sites didn't work. So I thought the cause was
something wrong in my farm wide config.php.

Some days ago I explored carefully the action.edit's code and
discovered the problem has to do with translations: when the button is
translated, the condition to show the preview doesn't work. I forgot
the issue but today I had the same problem while editing the docs at
boltwire.com with the Spanish translation activated.

Here you are an action.edit I'm using in one site. It is all hardcode
translated into Spanish, what solved the problem, but I don't remember
if I changed something more. I think it will be easy for you to see
where the problem is in the original code, comparing it with mine
(title markups are Creole's; and "vista preliminar" means "preview").

-------------------------------------------------------------------------------------------------
[if exists {p} && auth write]== {action.edit:title}

[if* set {?boltkey} && ! equal {p} action.edit]
<div class="vistapreliminar">
<p class="vistapreliminar">Vista preliminar de los cambios</p>
[(preview boltcontent)]
</div>
[if*]

===Formulario de edición

Aquí puedes modificar la página **{p}** (cuyo título es **{title}**):

[form]
[box boltcontent cols={site.config::columnasDeContenido} rows=
{site.config::filasDeContenido} gui=true][(source {p}
replacetable=true post=boltcontent)][box]
[if* ! equal {p} action.edit][submit name=boltsubmit[] value="Vista
preliminar"][if*]
[submit name=boltsubmit[] value="Guardar los cambios"]
[if* ! equal {p} action.edit][session if "equal '{=boltsubmit}' 'Vista
preliminar' ? warn=Modo de vista preliminar."][if*]
[session warn]
[session boltstamp {p}]
[session author {member}]
[session changesummary "Página modificada por {=author}."]
[session boltsavedata author,changesummary]
[session boltedit '{=boltcontent}']
[form][if]
[if ! exists {p}]<(forward {p}&action=missing)>[if]
[if ! auth write][(include action.blocked)][if]
-------------------------------------------------------------------------------------------------

Buy the way, you see, I use some site.config variables to config the
size of all admin and action forms. It's a simple idea I find useful.
That helps usability a lot after changing the skin or the screen size.

Cheers,
Marcos

--
http://alinome.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to