formiojs
Version:
Common js library for client side interaction with <form.io>
8 lines (7 loc) • 2.18 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
form: "\n<label class=\"control-label\" style=\"\">{{t(component.label)}}</label>\n<table class=\"ui table datagrid-table \n {{ component.striped ? 'striped' : ''}}\n {{ component.bordered ? 'celled' : ''}}\n {{ component.hover ? 'selectable' : ''}}\n {{ component.condensed ? 'compact' : 'padded'}}\n \">\n {% if (hasHeader) { %}\n <thead>\n <tr>\n {% component.components.forEach(function(col) { %}\n {% if (visibleColumns[col.key]) { %}\n <th class=\"{{col.validate && col.validate.required ? 'field-required' : ''}}\">\n {{ col.hideLabel ? '' : t(col.label || col.title) }}\n {% if (col.tooltip) { %} <i ref=\"tooltip-{{col.key}}\" class=\"{{iconClass('question-sign')}} text-muted\"></i>{% } %}\n </th>\n {% } %}\n {% }) %}\n {% if (hasExtraColumn) { %}\n <th>\n {% if (hasAddButton && hasTopSubmit) { %}\n <button class=\"ui button primary\" ref=\"{{datagridKey}}-addRow\">\n <i class=\"{{iconClass('plus')}}\"></i> Add Another\n </button>\n {% } %}\n </th>\n {% } %}\n </tr>\n </thead>\n {% } %}\n <tbody>\n {% rows.forEach(function(row) { %}\n <tr>\n {% component.components.forEach(function(col) { %}\n {% if (visibleColumns[col.key]) { %}\n <td ref=\"{{datagridKey}}\">\n {{row[col.key]}}\n </td>\n {% } %}\n {% }) %}\n {% if (hasExtraColumn && hasRemoveButtons) { %}\n <td>\n <button type=\"button\" class=\"ui icon button secondary\" ref=\"{{datagridKey}}-removeRow\">\n <i class=\"{{iconClass('remove-circle')}}\"></i>\n </button>\n </td>\n {% } %}\n </tr>\n {% }) %}\n </tbody>\n {% if (hasAddButton && hasBottomSubmit) { %}\n <tfoot>\n <tr>\n <td colspan=\"{{numColumns}}\">\n <button class=\"ui button primary\" ref=\"{{datagridKey}}-addRow\">\n <i class=\"{{iconClass('plus')}}\"></i> {{t(component.addAnother || 'Add Another')}}\n </button>\n </td>\n </tr>\n </tfoot>\n {% } %}\n</table>\n"
};