Class FormThemeBean

    • Constructor Detail

      • FormThemeBean

        public FormThemeBean()
    • Method Detail

      • getEditMode

        public EFormThemeEditMode getEditMode()
        Gets the UI mode for editing client form themes. This is used to determine which parts of the UI are shown to the user. Simple mode only shows two simple CSS editors for the form and HTML template CSS, advanced mode shows a full-fledged file explorer.
        Returns:
        The UI mode for editing client form themes.
      • getEditModeAdvancedModel

        public FormThemeEditModeAdvancedModel getEditModeAdvancedModel()
        Gets the view model for advanced edit mode. Available only when the edit mode is set to ADVANCED.
        Returns:
        Additional data for the currently selected client form theme, null if no theme is selected.
      • getElFinderExtensions

        public String getElFinderExtensions()
        Gets a list of file extensions that are allowed for files in the elFinder file explorer. This is a comma separated list of file extensions, each file extensions without the leading dot. E.g. "jpg,png,gif".
        Returns:
        The allowed file extensions.
      • getElFinderMessages

        public String getElFinderMessages()
        Returns additional localized messages for the elFinder file explorer. This is a stringified JSON object with string keys and values. The keys are the messages keys, the values the localized messages.
        Returns:
        The additional messages.
      • getElfinderConnectorUrl

        public String getElfinderConnectorUrl()
        Gets the URL to the elFinder connector, i.e. the URL to the file manager can call to communicate with the backend.
        Returns:
        The URL to the elFinder connector.
      • isEditModeAdvanced

        public boolean isEditModeAdvanced()
        Checks whether the current edit mode is advanced.
        Returns:
        True if the edit mode is advanced, false otherwise.
      • isEditModeSimple

        public boolean isEditModeSimple()
        Checks whether the current edit mode is simple.
        Returns:
        True if the edit mode is simple, false otherwise.
      • isWasEditModeSet

        public boolean isWasEditModeSet()
        Gets whether the user already has a stored preference for the edit mode. When false, the user gets shown a help dialog the first time they switch to advanced edit mode.
        Returns:
        True if the user already set the edit mode, false otherwise.
      • onConfirmChangeToAdvancedEditMode

        public void onConfirmChangeToAdvancedEditMode()
        When there are unsaved changes and the user wishes to change to advanced edit mode, they are asked to confirm whether they want to discard their changes. This method is called when the user confirms that they want to discard their changes.
      • onCreateNewTheme

        public void onCreateNewTheme()
        Command button callback that is invoked when the user wishes to create a new theme, either when

        the edit mode is SIMPLE and the user clicks on the add new button in the toolbar of the client form theme list.

        the edit mode is ADVANCED and the user clicks on the new theme button in the file explorer.

      • onGetThemeDetails

        public void onGetThemeDetails()
        Remote command invoked when the edit mode is set to ADVANCED and the user clicks on the edit icon of a client form theme in the file explorer. Loads the additional details to show to the user, i.e. the name, description and parent theme of the selected client form theme; as well as the list of available options for the parent theme dropdown.
      • onToggleEditMode

        public void onToggleEditMode()
        When the user clicks on the button to toggle the edit mode, either from simple to advanced or vice versa. Checks whether there are unsaved changes and shows a confirmation dialog if necessary. Otherwise, switches directly to the requested mode.
      • onUpdateThemeDetail

        public void onUpdateThemeDetail()
        Remote command invoked when the edit mode is advanced and the user change a detail of a client form theme via the file explorer. Updates the client form theme with the provided data.