Refactor SCSS and Vue components to standardize "required" labels.

- Moved SCSS rules for `.required` labels to a shared scope in `forms.scss`.
- Updated labels in `PersonEdit.vue` to consistently use the `required` class.
This commit is contained in:
2025-11-19 16:45:15 +01:00
parent 6d3bcf48b5
commit 4ddbcf4037
2 changed files with 14 additions and 10 deletions

View File

@@ -29,10 +29,14 @@ form {
label { label {
display: inline; display: inline;
&.required:after { }
content: " *"; }
color: $red;
} label {
display: inline;
&.required:after {
content: " *";
color: $red;
} }
} }

View File

@@ -10,7 +10,7 @@
v-model="lastName" v-model="lastName"
:placeholder="trans(PERSON_MESSAGES_PERSON_LASTNAME)" :placeholder="trans(PERSON_MESSAGES_PERSON_LASTNAME)"
/> />
<label for="lastname">{{ <label for="lastname" class="required">{{
trans(PERSON_MESSAGES_PERSON_LASTNAME) trans(PERSON_MESSAGES_PERSON_LASTNAME)
}}</label> }}</label>
</div> </div>
@@ -45,7 +45,7 @@
v-model="firstName" v-model="firstName"
:placeholder="trans(PERSON_MESSAGES_PERSON_FIRSTNAME)" :placeholder="trans(PERSON_MESSAGES_PERSON_FIRSTNAME)"
/> />
<label for="firstname">{{ <label for="firstname" class="required">{{
trans(PERSON_MESSAGES_PERSON_FIRSTNAME) trans(PERSON_MESSAGES_PERSON_FIRSTNAME)
}}</label> }}</label>
</div> </div>
@@ -104,7 +104,7 @@
:placeholder="localizeString(worker.label)" :placeholder="localizeString(worker.label)"
@input="onIdentifierInput($event, worker.definition_id)" @input="onIdentifierInput($event, worker.definition_id)"
/> />
<label :for="'worker_' + worker.definition_id">{{ <label :for="'worker_' + worker.definition_id" :class="{required: worker.presence == 'REQUIRED'}">{{
localizeString(worker.label) localizeString(worker.label)
}}</label> }}</label>
</div> </div>
@@ -134,7 +134,7 @@
{{ g.label }} {{ g.label }}
</option> </option>
</select> </select>
<label for="gender" class="form-label">{{ <label for="gender" class="required">{{
trans(PERSON_MESSAGES_PERSON_GENDER_TITLE) trans(PERSON_MESSAGES_PERSON_GENDER_TITLE)
}}</label> }}</label>
</div> </div>
@@ -163,7 +163,7 @@
{{ c.name }} {{ c.name }}
</option> </option>
</select> </select>
<label for="center">{{ trans(PERSON_MESSAGES_PERSON_CENTER_TITLE) }}</label> <label for="center" class="required">{{ trans(PERSON_MESSAGES_PERSON_CENTER_TITLE) }}</label>
</div> </div>
<div <div
v-for="err in violations.violationTitles('center')" v-for="err in violations.violationTitles('center')"