Skip to content

Commit bc3eef9

Browse files
committed
Add 'field required asterisk'
1 parent 3f3e69b commit bc3eef9

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎ui/css/cloudstack3.css‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,13 @@ Dialogs*/
28272827
margin-top: 2px;
28282828
}
28292829

2830+
.field-required {
2831+
color: #EE7B7B;
2832+
font-size: 14px;
2833+
padding: 0 3px 0 0;
2834+
font-weight: bold;
2835+
}
2836+
28302837
.ui-dialog div.form-container div.value {
28312838
width: 61%;
28322839
float: left;

‎ui/scripts/ui/dialog.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
$('<label>').html(field.label + ':')
5959
);
6060

61+
// Add 'required asterisk' if field is required
62+
if (field.validation && field.validation.required) {
63+
$name.find('label').prepend($('<span>').addClass('field-required').html('*'));
64+
}
65+
6166
// Input area
6267
var $value = $('<div>').addClass('value')
6368
.appendTo($formItem);

0 commit comments

Comments
 (0)