Beispiel #1
0
    def action_element_edit_form(self):
        _=self.datas._

        if not check_edit(self.datas,self.socket):
            self.socket.send_datas(_('connectez vous...'))
            return

        self.datas.old_textes={}
        for code in self.config.langues:
            txt=self.get_text_lang(code)
            if not txt:
                txt=''
            self.datas.old_textes[code]=txt


        f=add_Text_Form(self.datas,self.config) % tpl_placement(self.datas)

        j=get_js_prepare_submit()
        template="""
        <form action="%s/edit/ok" id="panneauform" method="POST">
        %s
        <div id="div_valid" class="invisible">
        <input type="button" value="%s" onClick="%s;document.forms.panneauform.submit();">
        
        </div>
        </form>
        """ % (self.path,f, _('Modifier ce texte'),j)
        self.socket.send_datas(template)
Beispiel #2
0
def ajoute_text_form(self):
    _=self.datas._
    if not check_edit(self.datas,self.socket):
        self.socket.send_datas(_('connectez vous...'))
        return
    baseurl=self.datas.url_base+self.path

    f=add_Text_Form(self.datas,self.config) % tpl_placement(self.datas)
    j=get_js_prepare_submit()
    template="""
<form action="%s/ajoute_text" id="panneauform" method="POST">
%s
<div id="div_valid" class="invisible">
<input type="button" value="%s" onClick="%s;document.forms.panneauform.submit();">

</div>
</form>
""" % (baseurl,f, _('Ajouter ce texte'),j)
    self.socket.send_datas(template)