def extra_content(self, djp, c): page = djp.page request = djp.request page_url = self.page_url(djp.request) ed = { 'page_form': get_form(djp, ShortPageForm, instance = page, withinputs=True).render(djp,validate=True), 'new_child_form': get_form(djp, NewChildForm, instance = page, withinputs=True).render(djp,validate=True), 'page_url': self.page_url(djp.request)} bd = loader.render_to_string(self.edit_template,ed) c.update({'page_url':page_url, 'edit_page':box(hd = "Edit Page Layout", bd = bd, collapsed=True)})
def wrap(self, djp, cblock, html): if html: classes,deleteurl = self._wrap(djp, cblock, html) return box(id = self.id(cblock), hd = cblock.title, bd = html, ft = self.footer(djp,cblock,html), collapsable = self.collapsable, collapsed = self.collapsed, delurl = deleteurl, classes = classes) else: return ''
from djpcms.forms import ModelMultipleChoiceField from djpcms.views.apps.tagging import TagField from flowrepo.models import Report, Attachment, Image from flowrepo.forms import FlowItemForm, add_related_upload from flowrepo import markups from jflow.db.instdata.models import DataId, EconometricAnalysis, VendorId CRL_HELP = htmlwrap('div', htmlwrap('div',markups.help()).addClass('body').render() ).addClasses('flowitem report').render() collapse = lambda title, html, c, cl: box(hd = title, bd = html, collapsable = c, collapsed = cl) class ReportForm(FlowItemForm): authors = ModelMultipleChoiceField(User.objects, required = False) data_ids = ModelMultipleChoiceField(DataId.objects.all(), required = False, label = 'Related securities') attachments = ModelMultipleChoiceField(Attachment.objects, required = False, label = 'Available attachments', help_text = 'To select/deselect multiple files to attach press ctrl') images = ModelMultipleChoiceField(Image.objects, required = False, label = 'Available images', help_text = 'To select/deselect multiple files to attach press ctrl') tags = TagField() attachment_1 = forms.FileField(required = False) attachment_2 = forms.FileField(required = False) attachment_3 = forms.FileField(required = False)
from djpcms.utils.uniforms import FormLayout, Html, Fieldset, inlineLabels, ModelFormInlineHelper from djpcms.forms import ModelMultipleChoiceField from djpcms.views.apps.tagging import TagField from flowrepo.models import Report, Attachment, Image from flowrepo.forms import FlowItemForm, add_related_upload from flowrepo import markups from jflow.db.instdata.models import DataId, EconometricAnalysis, VendorId CRL_HELP = htmlwrap( 'div', htmlwrap('div', markups.help()).addClass('body').render()).addClasses( 'flowitem report').render() collapse = lambda title, html, c, cl: box( hd=title, bd=html, collapsable=c, collapsed=cl) class ReportForm(FlowItemForm): authors = ModelMultipleChoiceField(User.objects, required=False) data_ids = ModelMultipleChoiceField(DataId.objects.all(), required=False, label='Related securities') attachments = ModelMultipleChoiceField( Attachment.objects, required=False, label='Available attachments', help_text='To select/deselect multiple files to attach press ctrl') images = ModelMultipleChoiceField( Image.objects, required=False,