runtime/WampClient.py
changeset 2260 74205edac761
parent 2248 d9353e440887
child 2262 4195545e2d17
child 2286 f0a49a662870
equal deleted inserted replaced
2259:53f3eb5c47f7 2260:74205edac761
   381         slot = webform.FileUploadRenderer.input(
   381         slot = webform.FileUploadRenderer.input(
   382             self, context, slot, data, name, value)
   382             self, context, slot, data, name, value)
   383         download_url = data.typedValue.getAttribute('download_url')
   383         download_url = data.typedValue.getAttribute('download_url')
   384         return slot[tags.a(href=download_url)[_("Download")]]
   384         return slot[tags.a(href=download_url)[_("Download")]]
   385 
   385 
       
   386 
   386 registerAdapter(FileUploadDownloadRenderer, FileUploadDownload,
   387 registerAdapter(FileUploadDownloadRenderer, FileUploadDownload,
   387                 formless.iformless.ITypedRenderer)
   388                 formless.iformless.ITypedRenderer)
   388 
   389 
   389 
   390 
   390 def getDownloadUrl(ctx, argument):
   391 def getDownloadUrl(ctx, argument):
   391     if lastKnownConfig is not None:
   392     if lastKnownConfig is not None:
   392         return url.URL.fromContext(ctx).\
   393         return url.URL.fromContext(ctx).\
   393             child(WAMP_SECRET_URL).\
   394             child(WAMP_SECRET_URL).\
   394             child(lastKnownConfig["ID"] + ".secret")
   395             child(lastKnownConfig["ID"] + ".secret")
       
   396 
   395 
   397 
   396 webFormInterface = [
   398 webFormInterface = [
   397     ("status",
   399     ("status",
   398      annotate.String(label=_("Current status"),
   400      annotate.String(label=_("Current status"),
   399                      immutable=True,
   401                      immutable=True,