mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-17 11:54:22 +01:00
(feat) hide gender in member create/edit form if not required
This commit is contained in:
parent
6e5b0f70dc
commit
49d05b61fc
@ -2,6 +2,7 @@
|
||||
|
||||
## Next release
|
||||
|
||||
- improvement: hide gender in member create/edit form if not required
|
||||
- Fix a bug: unable to update member's profile
|
||||
|
||||
## v6.3.19 2024 Avril 9
|
||||
|
@ -189,7 +189,9 @@ export const UserProfileForm: React.FC<UserProfileFormProps> = ({ action, size,
|
||||
<div className="fields-group">
|
||||
<div className="personnal-data">
|
||||
<h4>{t('app.shared.user_profile_form.personal_data')}</h4>
|
||||
<GenderInput register={register} disabled={isDisabled} required={fieldsSettings.get('gender_required') === 'true'} tooltip={t('app.shared.user_profile_form.used_for_statistics')} />
|
||||
{fieldsSettings.get('gender_required') === 'true' &&
|
||||
<GenderInput register={register} disabled={isDisabled} required={fieldsSettings.get('gender_required') === 'true'} tooltip={t('app.shared.user_profile_form.used_for_statistics')} />
|
||||
}
|
||||
<div className="names">
|
||||
<FormInput id="profile_attributes.last_name"
|
||||
register={register}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="row m-t">
|
||||
<div class="col-sm-offset-3 col-sm-6">
|
||||
<div class="form-group" ng-class="{'has-error': adminForm['admin[statistic_profile_attributes][gender]'].$dirty && adminForm['admin[statistic_profile_attributes][gender]'].$invalid}">
|
||||
<div ng-if="genderRequired" class="form-group" ng-class="{'has-error': adminForm['admin[statistic_profile_attributes][gender]'].$dirty && adminForm['admin[statistic_profile_attributes][gender]'].$invalid}">
|
||||
<label class="checkbox-inline btn btn-default">
|
||||
<input type="radio"
|
||||
name="admin[statistic_profile_attributes][gender]"
|
||||
|
Loading…
x
Reference in New Issue
Block a user