def edit(self, *args, **kw):
     "Inline edit view"
     temp = []
     temp.append(self.editSingleConfig('renderer'))
     temp.append(NestedListURL.editRenderer(self.renderer, self))
     temp.append(self.editSingleConfig('baseURL'))
     temp.append(self.editSingleConfig('depth'))
     temp.append(self.editSingleConfig('sortOn'))
     temp.append(self.editSingleConfig('folderSortOn'))
     temp.append(self.editSingleConfig('showCompoundDocs'))
     temp.append(self.editSingleConfig('restrictedMode'))
     temp.append(self.editSingleConfig('renderScriptPath'))
     temp.append(self.editSingleConfig('mergeScriptName'))
     temp.append(self.editSingleConfig('docsAsNodes'))
     profiles = ['']
     profiles.extend(utility.getStoredProfileNames())
     selected = self.getSelected()
     temp.append('<p>%s</p>' % self.create_button('clear', 'Clear Selected Profile'))
     temp.append('<p>Profiles that are allowed:%s</p>' % self.multiselect('selected', profiles, selected, size=10))
     return ''.join(temp)
 def addRemoveDocument(self, folder, objects, profile=None):
     "draw the add remove document interface"
     temp = []
     profile = profile or self.editProfile
     objects = [''] + [name for name,i in objects]
     
     temp.append(self.create_button('add', 'Add Document'))
     if not self.getConfig('autoType'):
         temp.append(self.input_text('addName', ''))
     
     if not profile:
         temp.append(self.option_select(utility.getStoredProfileNames(), 'profile', ['Default']))
     else:
         temp.append(self.input_hidden('profile', profile))
     doc = self.getSelectedDocument(folder)
     selected = None
     if doc is not None:
         selected = [doc.getId()]
     temp.append(self.option_select(objects, 'delName', selected=selected))
     temp.append(self.create_button('del', 'Delete Document'))
     return temp
 def edit(self, *args, **kw):
     "Inline edit view"
     temp = []
     temp.append(self.editSingleConfig('renderer'))
     temp.append(NestedListURL.editRenderer(self.renderer, self))
     temp.append(self.editSingleConfig('baseURL'))
     temp.append(self.editSingleConfig('depth'))
     temp.append(self.editSingleConfig('sortOn'))
     temp.append(self.editSingleConfig('folderSortOn'))
     temp.append(self.editSingleConfig('showCompoundDocs'))
     temp.append(self.editSingleConfig('restrictedMode'))
     temp.append(self.editSingleConfig('renderScriptPath'))
     temp.append(self.editSingleConfig('mergeScriptName'))
     temp.append(self.editSingleConfig('docsAsNodes'))
     profiles = ['']
     profiles.extend(utility.getStoredProfileNames())
     selected = self.getSelected()
     temp.append('<p>%s</p>' %
                 self.create_button('clear', 'Clear Selected Profile'))
     temp.append('<p>Profiles that are allowed:%s</p>' %
                 self.multiselect('selected', profiles, selected, size=10))
     return ''.join(temp)
Example #4
0
    def edit(self, *args, **kw):
        "Inline edit view"
        profileNames = utility.getStoredProfileNames()
        temp = []
        temp.append('<p>Price location:%s</p>' %
                    self.input_text('priceLocation', self.priceLocation))
        temp.append(self.SessionManagerConfig.edit())
        temp.append(self.FreightOrderListing.edit())
        temp.append('<p>Order Location:%s</p>' %
                    self.input_text('orderLocation', self.orderLocation))
        temp.append('<p>Order Profile:%s</p>' % self.option_select(
            profileNames, 'orderProfile', [self.orderProfile]))
        temp.append('<p>Order Ownership:%s</p>' %
                    self.input_text('orderOwnership', self.orderOwnership))
        temp.append('<p>Path To User Folder:%s</p>' %
                    self.input_text('pathToUserFolder', self.pathToUserFolder))
        temp.append('<p>Preload Data from a Customers Previous order?:%s</p>' %
                    self.true_false('preloadData', self.preloadData, 0))
        temp.append('<p>Preload Vars:%s</p>' %
                    self.input_text('preload', ' '.join(self.getPreload())))
        temp.append('<p>Order Catalog Name:%s</p>' %
                    self.input_text('orderCatalog', self.orderCatalog))
        temp.append(
            '''<p>The Order Catalog will be auto created do not create anything else in the Order Location folder
          with the name you want this catalog to have.</p>''')
        temp.append(
            "<p>Total Price Calculation MUST be enabled if you want to use a CreditCardManager on the orders.</p>"
        )
        temp.append(
            '<p>Enable Total Price Calculation:%s</p>' %
            self.true_false('totalPriceEnabled', self.totalPriceEnabled, 0))
        temp.append('<p>Enable Freight:%s</p>' %
                    self.true_false('freightEnabled', self.freightEnabled, 0))
        temp.append(self.editSingleConfig('orderOkayAddScript'))
        temp.append(self.editSingleConfig('runInSecureMode'))
        temp.append(self.editSingleConfig('viewerRole'))

        return ''.join(temp)
    def addRemoveDocument(self, folder, objects, profile=None):
        "draw the add remove document interface"
        temp = []
        profile = profile or self.editProfile
        objects = [''] + [name for name, i in objects]

        temp.append(self.create_button('add', 'Add Document'))
        if not self.getConfig('autoType'):
            temp.append(self.input_text('addName', ''))

        if not profile:
            temp.append(
                self.option_select(utility.getStoredProfileNames(), 'profile',
                                   ['Default']))
        else:
            temp.append(self.input_hidden('profile', profile))
        doc = self.getSelectedDocument(folder)
        selected = None
        if doc is not None:
            selected = [doc.getId()]
        temp.append(self.option_select(objects, 'delName', selected=selected))
        temp.append(self.create_button('del', 'Delete Document'))
        return temp
Example #6
0
 def edit(self, *args, **kw):
     "Inline edit view"
     profileNames = utility.getStoredProfileNames()
     temp = []
     temp.append('<p>Price location:%s</p>' % self.input_text('priceLocation', self.priceLocation))
     temp.append(self.SessionManagerConfig.edit())
     temp.append(self.FreightOrderListing.edit())
     temp.append('<p>Order Location:%s</p>' % self.input_text('orderLocation', self.orderLocation))
     temp.append('<p>Order Profile:%s</p>' % self.option_select(profileNames, 'orderProfile', [self.orderProfile]))
     temp.append('<p>Order Ownership:%s</p>' % self.input_text('orderOwnership', self.orderOwnership))
     temp.append('<p>Path To User Folder:%s</p>' % self.input_text('pathToUserFolder', self.pathToUserFolder))
     temp.append('<p>Preload Data from a Customers Previous order?:%s</p>' % self.true_false('preloadData', self.preloadData,0))
     temp.append('<p>Preload Vars:%s</p>' % self.input_text('preload', ' '.join(self.getPreload())))
     temp.append('<p>Order Catalog Name:%s</p>' % self.input_text('orderCatalog', self.orderCatalog))
     temp.append('''<p>The Order Catalog will be auto created do not create anything else in the Order Location folder
       with the name you want this catalog to have.</p>''')
     temp.append("<p>Total Price Calculation MUST be enabled if you want to use a CreditCardManager on the orders.</p>")
     temp.append('<p>Enable Total Price Calculation:%s</p>' % self.true_false('totalPriceEnabled', self.totalPriceEnabled,0))
     temp.append('<p>Enable Freight:%s</p>' % self.true_false('freightEnabled', self.freightEnabled,0))
     temp.append(self.editSingleConfig('orderOkayAddScript'))
     temp.append(self.editSingleConfig('runInSecureMode'))
     temp.append(self.editSingleConfig('viewerRole'))
     
     return ''.join(temp)
Example #7
0
 def drawViewProfile(self):
     "draw the edit interface for viewProfile and append it to the list"
     temp = [''] + utility.getStoredProfileNames()
     return self.option_select(temp, 'viewProfile', [self.viewProfile])
 def draw_profiles(self, varname='profile'):
     "Draw the profiles"
     temp = [''] + utility.getStoredProfileNames()
     return self.option_select(temp, varname, [utility.renderNoneAsString(self.profile,'None')])
 def changeAllProfiles(self):
     "change to all profiles that this compounddoc has in sequence"
     for i in utility.getStoredProfileNames():
         self.changeProfile(i)
     return 'KAPLAA!'
Example #10
0
 def draw_profiles(self, varname='profile'):
     "Draw the profiles"
     temp = [''] + utility.getStoredProfileNames()
     return self.option_select(
         temp, varname, [utility.renderNoneAsString(self.profile, 'None')])
Example #11
0
 def changeAllProfiles(self):
     "change to all profiles that this compounddoc has in sequence"
     for i in utility.getStoredProfileNames():
         self.changeProfile(i)
     return 'KAPLAA!'
 def drawViewProfile(self):
     "draw the edit interface for viewProfile and append it to the list"
     temp = [''] + utility.getStoredProfileNames()
     return self.option_select(temp, 'viewProfile', [self.viewProfile])