Skip to main content
Skip table of contents

Adding ressorts for multi-selection of entries

We use combo-boxes for editing the ressorts and subressorts.

States

By using stateChanged, the combo-box offers two states:

  1. The combo-box shows the ressort (resp. subressort) when all the entries in selection have same ressort (resp. subressort) value.
  2. If one or more entries have different ressort (resp. subressort) values then "<various values>" is displayed.


Note that if the ressorts of the selected entries are not equal, the subressorts are reset.

Example Configuration

CODE
{{#form-container legacyController=legacyController 
				  $changeRessort=false
				  $changeSubRessort=false as |form|}}

	{{#if editable}} 
		<table class="modern-table"> 
			<tbody>
                <tr><td>{{check-box checked=$changeRessort}}<label>Change Ressort:</label></td><td class="editable-field">
                    {{combo-box stateChanged=$changeRessort model=editModelArray field="Ressort"}}
                </td></tr>
                <tr><td>{{check-box checked=$changeSubRessort}}<label>Change Subressort:</label></td><td class="editable-field">
                    {{combo-box stateChanged=$changeSubRessort model=editModelArray field="SubRessort"}}
                </td></tr>
			</tbody>
		</table>
	{{else}}
		<table class="modern-table">
			<tbody>
				<tr><td>Ressort:</td><td>{{combo-box model=model field="Ressort" editable=false}}</td></tr>
				<tr><td>Subressort:</td><td>{{combo-box model=model field="SubRessort" editable=false}}</td></tr>
			</tbody>
		</table>
	{{/if}}
{{/form-container}}


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.