mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-13 23:48:55 +01:00
243 lines
13 KiB
Plaintext
243 lines
13 KiB
Plaintext
<div class="modal-header">
|
|
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
|
|
<h1 translate>{{ 'create_your_account' }}</h1>
|
|
</div>
|
|
<div class="">
|
|
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
|
|
|
|
<div class="well m-b-n">
|
|
<form role="form" name="signupForm" class="form-horizontal" novalidate autocomplete="off" ng-keydown="signupForm.$valid && $event.which == 13 && ok()">
|
|
<div class="form-group" ng-class="{'has-error': signupForm.gender.$dirty && signupForm.gender.$invalid}">
|
|
<div class="col-sm-12">
|
|
<label class="checkbox-inline">
|
|
<input type="radio"
|
|
name="gender"
|
|
ng-model="user.profile_attributes.gender"
|
|
value="true"
|
|
required/> {{ 'man' | translate }}
|
|
</label>
|
|
<label class="checkbox-inline">
|
|
<input type="radio"
|
|
name="gender"
|
|
ng-model="user.profile_attributes.gender"
|
|
value="false"/> {{ 'woman' | translate }}
|
|
</label>
|
|
<span class="help-block" ng-show="signupForm.gender.$dirty && signupForm.gender.$error.required" translate>{{ 'gender_is_required'}}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-6" ng-class="{'has-error': signupForm.first_name.$dirty && signupForm.first_name.$invalid}">
|
|
<input type="text"
|
|
name="first_name"
|
|
ng-model="user.profile_attributes.first_name"
|
|
class="form-control"
|
|
placeholder="{{ 'your_first_name' | translate }}"
|
|
required>
|
|
<span class="help-block" ng-show="signupForm.first_name.$dirty && signupForm.first_name.$error.required" translate>{{ 'first_name_is_required' }}</span>
|
|
</div>
|
|
<div class="m-b visible-xs"></div>
|
|
<div class="col-sm-6" ng-class="{'has-error': signupForm.last_name.$dirty && signupForm.last_name.$invalid}">
|
|
<input type="text"
|
|
name="last_name"
|
|
ng-model="user.profile_attributes.last_name"
|
|
class="form-control"
|
|
placeholder="{{ 'your_surname' | translate }}"
|
|
required>
|
|
<span class="help-block" ng-show="signupForm.last_name.$dirty && signupForm.last_name.$error.required" translate>{{ 'surname_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.username.$dirty && signupForm.username.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-user"></i></span>
|
|
<input type="text"
|
|
name="username"
|
|
ng-model="user.username"
|
|
class="form-control"
|
|
placeholder="{{ 'your_pseudonym' | translate }}"
|
|
required>
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.username.$dirty && signupForm.username.$error.required" translate>{{ 'pseudonym_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.email.$dirty && signupForm.email.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
|
<input type="email"
|
|
name="email"
|
|
ng-model="user.email"
|
|
class="form-control"
|
|
placeholder="{{ 'your_email_address' | translate }}"
|
|
required>
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.email.$dirty && signupForm.email.$error.required" translate>{{ 'email_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.password.$dirty && signupForm.password.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
|
<input type="password"
|
|
name="password"
|
|
ng-model="user.password"
|
|
class="form-control"
|
|
placeholder="{{ 'your_password' | translate }}"
|
|
required
|
|
ng-minlength="8">
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.password.$dirty && signupForm.password.$error.required" translate>{{ 'password_is_required' }}</span>
|
|
<span class="help-block" ng-show="signupForm.password.$dirty && signupForm.password.$error.minlength" translate>{{ 'password_is_too_short_(minimum_8_characters)' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.password_confirmation.$dirty && signupForm.password_confirmation.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
|
<input type="password"
|
|
name="password_confirmation"
|
|
ng-model="user.password_confirmation"
|
|
class="form-control"
|
|
placeholder="{{ 'type_your_password_again' | translate }}"
|
|
required ng-minlength="8"
|
|
match="user.password">
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.password_confirmation.$dirty && signupForm.password_confirmation.$error.required" translate>{{ 'password_confirmation_is_required' }}</span>
|
|
<span class="help-block" ng-show="signupForm.password_confirmation.$error.match" translate>{{ 'password_does_not_match_with_confirmation' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-12 checkbox-group">
|
|
<input type="checkbox"
|
|
name="organization"
|
|
id="organization"
|
|
ng-model="user.organization"
|
|
value="false"/>
|
|
<label for="organization" translate>{{ 'i_am_an_organization' }}</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="user.organization" ng-class="{'has-error': signupForm.organization_name.$dirty && signupForm.organization_name.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-building-o"></i></span>
|
|
<input type="text"
|
|
name="organization_name"
|
|
ng-model="user.profile_attributes.organization_attributes.name"
|
|
class="form-control"
|
|
placeholder="{{ 'name_of_your_organization' | translate }}"
|
|
ng-required="user.organization">
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.organization_name.$dirty && signupForm.organization_name.$error.required" translate>{{ 'organization_name_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-show="user.organization" ng-class="{'has-error': signupForm.organization_address.$dirty && signupForm.organization_address.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-map-marker"></i></span>
|
|
<input type="text"
|
|
name="organization_address"
|
|
ng-model="user.profile_attributes.organization_attributes.address_attributes.address"
|
|
class="form-control"
|
|
placeholder="{{ 'address_of_your_organization' | translate }}"
|
|
ng-required="user.organization">
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.organization_address.$dirty && signupForm.organization_address.$error.required" translate>{{ 'organization_address_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.group_id.$dirty && signupForm.group_id.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div>
|
|
<select ng-model="user.group_id" class="form-control" name="group_id" ng-options="g.id as g.name for g in groups" required>
|
|
<option value="" translate>{{ 'your_user_s_profile' }}</option>
|
|
</select>
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.group_id.$dirty && signupForm.group_id.$error.required" translate>{{ 'user_s_profile_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.birthday.$dirty && signupForm.birthday.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-calendar-o"></i> </span>
|
|
<input type="text"
|
|
class="form-control"
|
|
name="birthday"
|
|
ng-model="user.profile_attributes.birthday"
|
|
uib-datepicker-popup="{{datePicker.format}}"
|
|
datepicker-options="datePicker.options"
|
|
is-open="datePicker.opened"
|
|
placeholder="{{ 'birth_date' | translate }}"
|
|
ng-click="openDatePicker($event)"
|
|
required/>
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.birthday.$dirty && signupForm.birthday.$error.required" translate>{{ 'birth_date_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.phone.$dirty && signupForm.phone.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-phone"></i> </span>
|
|
<input ng-model="user.profile_attributes.phone"
|
|
type="text"
|
|
name="phone"
|
|
class="form-control"
|
|
placeholder="{{ 'phone_number' | translate }}"
|
|
required>
|
|
</div>
|
|
<span class="help-block" ng-show="signupForm.phone.$dirty && signupForm.phone.$error.required" translate>{{ 'phone_number_is_required' }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.is_allow_contact.$dirty && signupForm.is_allow_contact.$invalid}">
|
|
<div class="col-sm-12 checkbox-group">
|
|
<input type="checkbox"
|
|
name="is_allow_contact"
|
|
id="is_allow_contact"
|
|
ng-model="user.is_allow_contact"
|
|
value="true"/>
|
|
<label for="is_allow_contact" translate>{{ 'i_authorize_Fablab_users_registered_on_the_site_to_contact_me' }}</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.is_allow_newsletter.$dirty && signupForm.is_allow_newsletter.$invalid}">
|
|
<div class="col-sm-12 checkbox-group">
|
|
<input type="checkbox"
|
|
name="is_allow_newsletter"
|
|
id="is_allow_newsletter"
|
|
ng-model="user.is_allow_newsletter"
|
|
value="true"/>
|
|
<label for="is_allow_newsletter" translate>{{ 'i_accept_to_receive_information_from_the_fablab' }}</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': signupForm.cgu.$dirty && signupForm.cgu.$invalid}" ng-show="cgu">
|
|
<div class="col-sm-12 checkbox-group">
|
|
<input type="checkbox"
|
|
name="cgu"
|
|
id="cgu"
|
|
ng-model="user.cgu"
|
|
value="true"
|
|
ng-required="cgu != null"/>
|
|
<label for="cgu"><span translate>{{ 'i_ve_read_and_i_accept_' }}</span> <a href="{{cgu.custom_asset_file_attributes.attachment_url}}" target="_blank" translate>{{ '_the_fablab_policy' }}</a></label>
|
|
</div>
|
|
</div>
|
|
<div ng-if="!cgu">
|
|
<input type="hidden" name="cgu" ng-model="user.cgu" value="true">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer no-padder">
|
|
<button class="btn btn-valid btn-warning btn-block p-l btn-lg text-u-c r-b" ng-click="ok()" ng-disabled="signupForm.$invalid" translate>{{ 'confirm' }}</button>
|
|
</div> |