modalForm (class)

class modalForm(log, title, postToScriptUrl, reloadToUrl, formClassName=False)[source]

Bases: object

The worker class for the modalForm module

Key Arguments

  • log – logger

  • title – title

  • postToScriptUrl – postToScriptUrl

  • reloadToUrl – reloadToUrl

  • formClassName – give a class name to form (if required by CSS or JS)

Methods

add_form_object(formObject[, label, hidden])

add a form objec to the modal form

add_hidden_parameter_value(key, value)

add hidden parameter value to the form (to be submitted with the form but does not need user input)

close()

get()

get the modalForm object

get_form_action_buttons(formId)

get form action buttons

set_hidden_parameters()

get hidden parameters

add_form_object(formObject, label='', hidden=False)[source]

add a form objec to the modal form

Key Arguments

  • formObject – the object to add to the form

  • label – label to assign to the object

  • hidden – is the form object hidden initially?

add_hidden_parameter_value(key, value)[source]

add hidden parameter value to the form (to be submitted with the form but does not need user input)

Key Arguments

  • key – the key for the hidden value (will be appended to query string when form submitted)

  • value – the value of the hidden parameter

get()[source]

get the modalForm object

Return

  • modalForm

get_form_action_buttons(formId)[source]

get form action buttons

Key Arguments

  • formId – the HTML id of the form

Return

  • actionButtons – the action buttos for the form (cancel, submit)

set_hidden_parameters()[source]

get hidden parameters