Modals Interface

class epyk.interfaces.components.CompModals.Modals(ui)
acknowledge(components: Optional[List[Html]] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display a popup with a ok button to validate the message has been displayed.

Usage:

popup = page.popup(page.ui.title('Test'), color="red")
popup + page.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

dialog(text, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (20, 'px'), html_code: Optional[str] = None, helper: Optional[Union[HtmlModel, str]] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Simple Jquery UI modal with a text.

Underlying HTML Objects:

Related Pages:

Usage:

:param text: Optional. The value to be displayed to the component.
:param width: Optional. A tuple with the integer for the component width and its unit.
:param height: Optional. A tuple with the integer for the component height and its unit.
:param html_code: Optional. An identifier for this component (on both Python and Javascript side).
:param helper: Optional. A tooltip helper.
:param options: Optional. Specific Python options available for this component.
:param profile: Optional. A flag to set the component performance storage.
disclaimer(disc_list, header=None, footer=None, submit: bool = True, validation_text: str = 'AGREE', action: Optional[str] = None, add_buttons=None, helper: Optional[Union[HtmlModel, str]] = None)

Disclaimer that will appear as a modal.

Usage:

privacy_title = page.ui.texts.title('A privacy reminder', 2)
p1 = page.ui.texts.paragraph('''
  Scroll down and click “%s” when you’re ready to continue, or explore other options on this page.
  ''' % page.ui.tags.strong('''I agree''', options={'managed': False}))
disc = page.ui.modals.disclaimer([privacy_title, p1])

Underlying HTML Objects:

Parameters:
  • disc_list

  • header

  • footer

  • submit

  • validation_text

  • action

  • add_buttons

  • helper

error(components: Optional[List[Html]] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display an error popup.

Usage:

popup = page.ui.popup(page.ui.title('Test'), color="red")
popup + page.ui.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

forms(components: Html, action: str, method: str, header=None, footer=None, helper: Optional[Union[HtmlModel, str]] = None)

Simple interface to create an html form within a modal

Usage:

d = page.ui.fields.today('test')
i = page.ui.fields.input(placeholder='test2', label='test1')
i2 = page.ui.fields.input('test3', label='test2')
form_modal = page.ui.modals.forms([d, i, i2], "http://127.0.0.1:5000", "POST")

Underlying HTML Objects:

Related Pages:

Parameters:
  • components

  • action

  • method

  • header

  • footer

  • helper

icon(components: Optional[List[Html]] = None, icon: Optional[str] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display a generic popup with an icon.

Usage:

popup = page.popup(page.ui.title('Test'), color="red")
popup + page.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • icon – Optional.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

info(components: Optional[List[Html]] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display an info popup.

Usage:

popup = page.ui.popup(page.ui.title('Test'), color="red")
popup + page.ui.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

loading(text: str = '', width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display a success popup.

Usage:

popup = page.ui.popup(page.ui.title('Test'), color="red")
popup + page.ui.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • text – Optional. The loading text.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

popup(components: Optional[List[Html]] = None, title: Optional[str] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display a generic popup.

Usage:

popup = page.ui.modals.popup(page.ui.title('Test'), color="red")
popup.add(page.ui.texts.paragraph('Test'))

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • title

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

stepper(records=None, components: Optional[List[Html]] = None, shape: str = 'arrow', title: Optional[str] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)
Parameters:
  • records

  • components

  • shape

  • title

  • width

  • height

  • options

  • profile

success(components: Optional[List[Html]] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Display a success popup.

Usage:

popup = page.ui.popup(page.ui.title('Test'), color="red")
popup + page.ui.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.

validation(components: Optional[List[Html]] = None, width: Union[tuple, int, str] = (100, '%'), height: Union[tuple, int, str] = (None, 'px'), options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = None)

Usage:

popup = page.popup(page.ui.title('Test'), color="red")
popup + page.paragraph('Test')

Underlying HTML Objects:

Related Pages:

Templates:

Parameters:
  • components – The different HTML objects to be added to the component.

  • width – Optional. A tuple with the integer for the component width and its unit.

  • height – Optional. A tuple with the integer for the component height and its unit.

  • options – Optional. Specific Python options available for this component.

  • profile – Optional. A flag to set the component performance storage.