Work in progress on port to Bootstrap 4

This commit is contained in:
Tomas Bures 2018-12-28 05:33:07 +01:00
parent 3425e2c16a
commit 41d74e3cc7
40 changed files with 144 additions and 365 deletions

View file

@ -194,9 +194,9 @@ function wrapInput(id, htmlId, owner, format, rightContainerClass, label, help,
// wrapInput may be used also outside forms to make a kind of fake read-only forms
let className;
if (owner) {
className = 'form-group row';
className = 'form-group';
} else {
className = 'row ' + styles.staticFormGroup;
className = styles.staticFormGroup;
}
let colLeft = '';
@ -207,15 +207,17 @@ function wrapInput(id, htmlId, owner, format, rightContainerClass, label, help,
colLeft = '';
colRight = '';
break;
case 'inline':
colLeft = 'mr-3';
colRight = '';
break;
default:
className = className + ' row';
colLeft = 'col-sm-2 col-form-label';
colRight = 'col-sm-10';
break;
}
if (format === 'inline') {
}
let helpBlock = null;
if (help) {
helpBlock = <small className={`form-text text-muted`} id={htmlId + '_help'}>{help}</small>;
@ -239,7 +241,7 @@ function wrapInput(id, htmlId, owner, format, rightContainerClass, label, help,
if (format === 'inline') {
return (
<div className={className} >
{labelBlock} &nbsp; {input}
{labelBlock}{input}
{helpBlock}
{validationBlock}
</div>