1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

various bugfixes

- in profile_complete form, the user's group is not selected by default
- missing asterisks on some required fields in profile_complete form
- renamed default DatabaseProvider from Fablab to FabManager
This commit is contained in:
Sylvain 2019-10-09 14:41:32 +02:00
parent 812634a3fd
commit 2897eec723
7 changed files with 24 additions and 11 deletions

View File

@ -14,6 +14,8 @@
- Fix a bug: in case of unexpected server error during stripe payment process, the confirm button is not unlocked
- Fix a bug: create a plan does not set its name
- Fix a bug: unable to dissociate the last machine from a formation
- Fix a bug: in profile_complete form, the user's group is not selected by default
- Fix a bug: missing asterisks on some required fields in profile_complete form
- Fix a security issue: fixed [CVE-2015-9284](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-9284)
- [TODO DEPLOY] **IMPORTANT** Please read [postgres_upgrade.md](doc/postgres_upgrade.md) for instructions on upgrading PostgreSQL.
- [TODO DEPLOY] `rake db:migrate`

View File

@ -34,7 +34,7 @@
</section>
</div>
</div>
<div class="row col-md-2 col-md-offset-5 hidden-sm hidden-xs">
<div class="row col-md-2 col-md-offset-5 hidden-sm hidden-xs" ng-hide="user.merged_at">
<p class="font-felt fleche-left text-lg upper text-center">
<%= image_tag("fleche-left.png", class: 'fleche-left visible-lg visible-md fleche-left-from-top') %>
<span class="or" translate>{{ 'or' }}</span>
@ -71,10 +71,15 @@
<!-- group -->
<div class="form-group" ng-class="{'has-error': userForm['user[group_id]'].$dirty && userForm['user[group_id]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-users"></i></span>
<span class="input-group-addon">
<i class="fa fa-users"></i>
<span class="exponent m-l-xs help-cursor" title="{{ 'used_for_statistics' | translate }}">
<i class="fa fa-asterisk" aria-hidden="true"></i>
</span>
</span>
<select ng-model="user.group_id" class="form-control" name="user[group_id]" required>
<option value=null translate>{{ 'your_user_s_profile' }}</option>
<option ng-repeat="group in groups" value="{{group.id}}" ng-selected="group.id == user.group_id">{{group.name}}</option>
<option ng-repeat="group in groups" ng-value="group.id" ng-selected="group.id == user.group_id">{{group.name}}</option>
</select>
</div>
<span class="help-block" ng-show="userForm['user[group_id]'].$dirty && userForm['user[group_id]'].$error.required" translate>{{ 'user_s_profile_is_required' }}</span>
@ -86,7 +91,9 @@
name="cgu"
ng-model="user.cgu"
value="true"
ng-required="cgu != null"/> {{ 'i_ve_read_and_i_accept_' | translate }} <a href="{{cgu.custom_asset_file_attributes.attachment_url}}" target="_blank" translate>{{ '_the_fablab_policy' }}</a>
ng-required="cgu != null"/> {{ 'i_ve_read_and_i_accept_' | translate }}
<a href="{{cgu.custom_asset_file_attributes.attachment_url}}" target="_blank" translate>{{ '_the_fablab_policy' }}</a>
<span class="exponent m-l-xs"><i class="fa fa-asterisk" aria-hidden="true"></i></span>
</div>
</div>
</div>

View File

@ -65,6 +65,7 @@ en:
used_for_invoicing: "This data will be used for billing purposes"
used_for_reservation: "This data will be used in case of change on one of your bookings"
used_for_profile: "This data will only be displayed on your profile"
used_for_pricing_stats: "This data will be used to determine the prices to which you are entitled, and for statistical purposes"
public_profile: "You will have a public profile and other users will be able to associate you in their projects"
trainings: "Trainings"
no_trainings: "No trainings"

View File

@ -61,11 +61,12 @@ es:
no_further_access_to_projects: "Your published projects will be anonymized and you won't get any further ability to edit them." # missing translation
your_user_account_has_been_successfully_deleted_goodbye: "Su cuenta ha sido eliminada con éxito. Adiós"
an_error_occured_preventing_your_account_from_being_deleted: "Un error inesperado impidió que su cuenta fuese eliminada."
used_for_statistics: "This data will be used for statistical purposes" # translation missing
used_for_invoicing: "This data will be used for billing purposes" # translation missing
used_for_reservation: "This data will be used in case of change on one of your bookings" # translation missing
used_for_profile: "This data will only be displayed on your profile" # translation missing
public_profile: "You will have a public profile and other users will be able to associate you in their projects" # translation missing
used_for_statistics: "This data will be used for statistical purposes" # translation missing
used_for_invoicing: "This data will be used for billing purposes" # translation missing
used_for_reservation: "This data will be used in case of change on one of your bookings" # translation missing
used_for_profile: "This data will only be displayed on your profile" # translation missing
public_profile: "You will have a public profile and other users will be able to associate you in their projects" # translation missing
used_for_pricing_stats: "This data will be used to determine the prices to which you are entitled, and for statistical purposes" # translation missing
trainings: "Cursos"
no_trainings: "Sin cursos"
subscription: "Suscripción"

View File

@ -65,6 +65,7 @@ fr:
used_for_invoicing: "Cette donnée sera utilisée à des fins de facturation"
used_for_reservation: "Cette donnée sera utilisée en cas de changement sur une de vos réservations"
used_for_profile: "Cette donnée sera seulement affichée sur votre profil"
used_for_pricing_stats: "Cette donné sera utilisée pour déterminer les prix auxquels vous avez droit, ainsi qu'a des fins statistiques"
public_profile: "Vous aurez un profil public et les autres utilisateurs pourront vous associer à leurs projets"
trainings: "Formations"
no_trainings: "Aucune formation"

View File

@ -65,6 +65,7 @@ pt:
used_for_invoicing: "This data will be used for billing purposes" # translation missing
used_for_reservation: "This data will be used in case of change on one of your bookings" # translation missing
used_for_profile: "This data will only be displayed on your profile" # translation missing
used_for_pricing_stats: "This data will be used to determine the prices to which you are entitled, and for statistical purposes" # translation missing
public_profile: "You will have a public profile and other users will be able to associate you in their projects" # translation missing
trainings: "Treinamentos"
no_trainings: "Sem treinamentos"

View File

@ -444,13 +444,13 @@ unless Setting.find_by(name: 'name_genre').try(:value)
end
unless DatabaseProvider.count > 0
unless DatabaseProvider.count.positive?
db_provider = DatabaseProvider.new
db_provider.save
unless AuthProvider.find_by(providable_type: DatabaseProvider.name)
provider = AuthProvider.new
provider.name = 'Fablab'
provider.name = 'FabManager'
provider.providable = db_provider
provider.status = 'active'
provider.save