%3 ::xowiki::PodcastForm ::xowiki::PodcastForm edit_data edit_request new_data new_request to_timeinfo to_timestamp ::xowiki::FileForm ::xowiki::FileForm edit_data get_uploaded_file new_data tidy ::xowiki::PodcastForm->::xowiki::FileForm ::xowiki::WikiForm ::xowiki::WikiForm after_submit data_from_form edit_data edit_request mkFields new_data new_request on_submit tidy update_references ::xowiki::FileForm->::xowiki::WikiForm ::Generic::Form ::Generic::Form ::xowiki::WikiForm->::Generic::Form

Class ::xowiki::PodcastForm

::xowiki::PodcastForm[i] create ... \
           [ -field_list (default "item_id name page_order text title subtitle creator pub_date duration keywords description") ] \
           [ -html (default " enctype multipart/form-data ") ] \
           [ -validate (default " {upload_file {\[::xowiki::validate_file\]} {For new entries, a upload file must be provided}} {name {\[::xowiki::validate_name\]} {Another item with this name exists already in this folder}} {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; might only contain upper and lowercase letters, underscore, digits and dots}} {duration {\[::xowiki::validate_duration\]} {Check duration and provide default}} ") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::FileForm[i]
::xotcl::Class create ::xowiki::PodcastForm \
     -superclass ::xowiki::FileForm

Methods (to be applied on instances)

  • edit_data (scripted)

    set pub_date [:var pub_date]
    ${:data} set pub_date [list [:to_timestamp $pub_date]]
    return [next]
  • edit_request (scripted)

    ${:data} set pub_date [:to_timeinfo [${:data} set pub_date]]
    next
  • field_list (setter)

  • html (setter)

  • new_data (scripted)

    set pub_date [:var pub_date]
    ${:data} set pub_date [list [:to_timestamp $pub_date]]
    return [next]
  • new_request (scripted)

    ${:data} set pub_date [:to_timeinfo [clock format [clock seconds]  -format "%y-%m-%d %T"]]
    next
  • to_timeinfo (scripted)

    set t [clock scan $timestamp]
    return "[clock format $t -format {%Y %m %d %H %M}] {} {YY MM DD HH24 MI}"
  • to_timestamp (scripted)

    if {$widgetinfo ne ""} {
      lassign $widgetinfo y m day hour min
      set t [clock scan "${hour}:$min $m/$day/$y"]
      #
      # be sure to avoid bad side effects from LANG environment variable
      #
      set ::env(LANG) en_US.UTF-8
      return [clock format $t]
      #return [clock format $t -format "%y-%m-%d %T"]
    }
    return ""
  • validate (setter)