khufu.modals.modalForm module

The modal form class

Author

David Young

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)

close()[source]
get()[source]

get the modalForm object

Return

  • modalForm

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?

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)

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

set_hidden_parameters()[source]

get hidden parameters