Set the background colour for backform notes, and add an icon. Fixes #3948

This commit is contained in:
Murtuza Zabuawala 2019-02-18 16:59:39 +00:00 committed by Dave Page
parent 554455fa75
commit e2482d2294
3 changed files with 22 additions and 18 deletions

View File

@ -2380,13 +2380,22 @@ define([
defaults: {
label: gettext('Note'),
text: '',
extraClasses: [],
noteClass: 'backform_control_notes',
extraClasses: ['pg-el-12', 'd-flex'],
noteClass: 'backform-note',
faIcon: 'fa-file-text-o',
faExtraClass: 'fa-rotate-180 fa-flip-vertical',
iconWidthClass: 'col-0 pr-2',
textWidthClass: 'col-sm',
},
template: _.template([
'<div class="<%=noteClass%> pg-el-12 <%=extraClasses.join(\' \')%>">',
'<label class="control-label"><%=label%>:</label>',
'<span><%=text%></span></div>',
'<div class="<%=noteClass%> <%=extraClasses.join(\' \')%>">',
' <div class="icon <%=iconWidthClass%>">',
' <i class="fa <%=faIcon%> <%=faExtraClass%>" aria-hidden="true"></i>',
' </div>',
' <div class="<%=textWidthClass%>">',
' <span><%=text%></span>',
' </div>',
'</div>',
].join('\n')),
});

View File

@ -47,17 +47,12 @@
}
}
.backform_control_notes {
border: $panel-border;
.backform-note {
border-radius: $border-radius;
font-family: $font-family-editor;
font-size: 0.8rem;
margin: 0 0 10px;
padding: 5px 10px;
padding: .25rem;
word-wrap: break-word;
}
div.backform_control_notes label.control-label {
min-width: 0px;
background: $border-color;
color: $color-fg;
}
.subnode-header label {

View File

@ -93,7 +93,7 @@ define([
}, {
id: 'globals_note',
label: gettext('Note'),
text: gettext('Only objects global to the entire database will be backed up in PLAIN format'),
text: gettext('Only objects global to the entire database will be backed up, in PLAIN format'),
type: 'note',
}, {}],
validate: function() {
@ -229,7 +229,7 @@ define([
type: 'note',
visible: function(m) {
return m.get('type') === 'server';
},
},Only objects global to the entire database will be backed up in PLAIN format
}, {
type: 'nested',
control: 'fieldset',