Since the value of 'draft' and the visibility of 'visualizar_button' change
in the browser and not on the server, you should search on how to do this
with JavaScript.



On Thu, Sep 13, 2012 at 8:49 PM, ProfessionalIT <lsever...@gmail.com> wrote:

> Hi,
>
>    I have a form like this:
>
> _form = form.Form(
>             form.Hidden('id'),
>             form.Hidden('operation'),
>             form.Textbox('titulo', form.notnull, size="60",
> maxlength="250", title="Titulo/Nome da Página.", description='Titulo:',
> style="display: block;"),
>             form.Textbox('slug', size="60", maxlength="250", title="URL da
> Página.", readonly="readonly", class_="readonly", description='URL da
> Página:'),
>             form.Textbox('descricao_completa', form.notnull, size="60",
> maxlength="250", title="Descrição Completa da Página.",
> description='Descrição Completa:'),
>             form.Textbox('palavras_chaves', form.notnull, size="60",
> maxlength="250", title="Palavras Chaves da Página separadas por vírgula.",
> description='Palavras Chaves:'),
>             form.Dropdown('permite_comentario', [('S', 'Sim'), ('N',
> 'Não')], title="Permite Comentários na Página ?", description='Permite
> Comentário:'),
>             form.Dropdown('draft', [('S', 'Sim'), ('N', 'Não')],
> title="Rascunho ?", description='Rascunho:'),
>             form.Textarea('conteudo', form.notnull, cols="70", rows="25",
> title="Conteúdo da Página.", description='Conteúdo da Página:'),
>             form.Button('cancelar_button', html="Cancelar", type="submit",
> onclick="javascript:history.back();", style="display: table;"),
>             form.Button('salvar_button', html="Salvar", type="submit",
> onclick="return setMode('save');", style="display: table;"),
>             form.Button('salvar_sair_button', html="Salvar e Sair",
> type="submit", onclick="return setMode('save');", style="display: table;"),
>             form.Button('excluir_button', html="Excluir", type="submit",
> onclick="return setMode('delete');", style="display: table;"),
>             form.Button('visualizar_button', html="Visualizar",
> type="button", onclick="return preview('Pagina');", style="display:
> table;"),
>             form.Button('publicar_button', html="Publicar", type="submit",
> onclick="return setMode('publish');", style="display: table;")
>         )
>         return _form
>
> And  I want that de visualizar_button be rendered only if the draft field
> value is equals 'S'. How to implement this ?
>
> thank's
> Leandro.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/webpy/-/j85WnUDWTtIJ.
> To post to this group, send email to webpy@googlegroups.com.
> To unsubscribe from this group, send email to
> webpy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>



-- 
Marios Zindilis

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to