How to use the enketo-core/src/js/print.openAllDetails function in enketo-core

To help you get started, we’ve selected a few enketo-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kobotoolbox / enketo-express / public / js / src / module / gui.js View on Github external
posButton: components.posButton,
        negButton: components.negButton,
    };
    const inputs = components.gridInputs + components.gridWarning;

    if ( formTheme === 'grid' || ( !formTheme && printHelper.isGrid() ) ) {
        printHelper.openAllDetails();
        return prompt( texts, options, inputs )
            .then( values => {
                if ( values ) {
                    printGrid( values );
                }
            } )
            .then( printHelper.closeAllDetails );
    } else {
        printHelper.openAllDetails();
        window.print();
        printHelper.closeAllDetails();
        return Promise.resolve();
    }
}