FormField: add convenience class "no-mandatory-indicator"

Change-Id: I99c85ae0db7b6826058b486668e5b7de00b70108
Reviewed-on: https://git.eclipse.org/r/141083
Tested-by: CI Bot
Reviewed-by: Beat Schwarzentrub <bsh@bsiag.com>
diff --git a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/CssClasses.java b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/CssClasses.java
index 7e25908..582b773 100644
--- a/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/CssClasses.java
+++ b/org.eclipse.scout.rt.client/src/main/java/org/eclipse/scout/rt/client/ui/CssClasses.java
@@ -10,6 +10,8 @@
  ******************************************************************************/
 package org.eclipse.scout.rt.client.ui;
 
+import org.eclipse.scout.rt.client.ui.action.menu.form.fields.AbstractFormFieldMenu;
+
 /**
  * CSS classes that can be used by the model to give the UI some hint about the rendering or behavior of a specific
  * component.
@@ -22,4 +24,9 @@
    * Class that applies the same vertical padding to the .field as to the label (useful e.g. for HTML fields)
    */
   String BORDERLESS_FIELD_PADDING_Y = "borderless-field-padding-y";
+
+  /**
+   * Class that hides the mandatory indicator (useful e.g. inside a {@link AbstractFormFieldMenu})
+   */
+  String NO_MANDATORY_INDICATOR = "no-mandatory-indicator";
 }
diff --git a/org.eclipse.scout.rt.ui.html/src/main/js/scout/form/fields/FormField.less b/org.eclipse.scout.rt.ui.html/src/main/js/scout/form/fields/FormField.less
index 9433445..057a212 100644
--- a/org.eclipse.scout.rt.ui.html/src/main/js/scout/form/fields/FormField.less
+++ b/org.eclipse.scout.rt.ui.html/src/main/js/scout/form/fields/FormField.less
@@ -89,6 +89,11 @@
     color: @disabled-color;
   }
 
+  /* Convenience class to add to a field when the mandatory indicator should not be displayed (e.g. inside a FormFieldMenu) */
+  &.no-mandatory-indicator > .mandatory-indicator {
+    display: none;
+  }
+
   & > .status {
     position: absolute;
     margin-left: @field-status-margin-left;