This commit is contained in:
parent
05b408f4af
commit
a4a4586127
|
@ -80,15 +80,15 @@
|
||||||
<td class="col-9" ng-if="currentUser.organization">{{currentUser.organization}}</td>
|
<td class="col-9" ng-if="currentUser.organization">{{currentUser.organization}}</td>
|
||||||
<td class="col-9 text-muted" ng-if="!currentUser.organization"><i>not specified</i></td>
|
<td class="col-9 text-muted" ng-if="!currentUser.organization"><i>not specified</i></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="d-flex">
|
||||||
|
<th class="col-3">Reference person</th>
|
||||||
|
<td class="col-9" ng-if="currentUser.referencePerson">>{{currentUser.referencePerson}}</td>
|
||||||
|
<td class="col-9 text-muted" ng-if="!currentUser.referencePerson"><i>not specified</i></td>
|
||||||
|
</tr>
|
||||||
<tr class="d-flex">
|
<tr class="d-flex">
|
||||||
<th class="col-3">Registration Request</th>
|
<th class="col-3">Registration Request</th>
|
||||||
<td class="col-9" ng-if="currentUser.referencePerson || currentUser.requestMessage">
|
<td class="col-9" ng-if="currentUser.requestMessage"><pre>{{currentUser.requestMessage}}</pre></td>
|
||||||
<span ng-show="currentUser.referencePerson"><b>Reference person: </b>{{currentUser.referencePerson}}<br /></span>
|
<td class="col-9 text-muted" ng-if="!currentUser.requestMessage"><i>not specified</i></td>
|
||||||
<pre ng-show="currentUser.requestMessage">{{currentUser.requestMessage}}</pre>
|
|
||||||
</td>
|
|
||||||
<td class="col-9 text-muted" ng-if="!currentUser.referencePerson && !currentUser.requestMessage">
|
|
||||||
<i>not specified</i>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="d-flex">
|
<tr class="d-flex">
|
||||||
<th class="col-3">Enabled</th>
|
<th class="col-3">Enabled</th>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
Hello '<span th:text="${email}" id="current_user"></span>', you don't have a role yet <br />
|
Hello '<span th:text="${email}" id="current_user"></span>', you don't have a role yet <br />
|
||||||
To apply as data curator compile the form below, an administrator will authorize you as soon as possible.
|
To apply as data curator compile the form below, an administrator will authorize you as soon as possible.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form class="small">
|
<form class="small">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Fullname</label>
|
<label class="col-sm-2 col-form-label">Fullname</label>
|
||||||
|
@ -65,14 +65,14 @@
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Reference person</label>
|
<label class="col-sm-2 col-form-label">Reference person</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" ng-model="referencePerson">
|
<input type="text" class="form-control" ng-model="user.referencePerson" />
|
||||||
<small class="form-text text-muted">Please indicate your reference person (if available)</small>
|
<small class="form-text text-muted">Please indicate your reference person (if available)</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">Request message</label>
|
<label class="col-sm-2 col-form-label">Request message</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea class="form-control" ng-model="requestMessage" cols="4"></textarea>
|
<textarea class="form-control" ng-model="user.requestMessage" cols="4"></textarea>
|
||||||
<small class="form-text text-muted">Specify the reason of your request</small>
|
<small class="form-text text-muted">Specify the reason of your request</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-xs-12 col-md-6 col-lg-4" ng-repeat="c in vocCountries">
|
<div class="col-xs-12 col-md-6 col-lg-4" ng-repeat="c in vocCountries">
|
||||||
<div class="form-check form-check-inline">
|
<div class="form-check form-check-inline">
|
||||||
<input class="form-check-input" type="checkbox" checklist-model="countries" checklist-value="c.value"/>
|
<input class="form-check-input" type="checkbox" checklist-model="user.countries" checklist-value="c.value"/>
|
||||||
<label class="form-check-label">{{c.name}}</label>
|
<label class="form-check-label">{{c.name}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -111,9 +111,13 @@
|
||||||
<script>
|
<script>
|
||||||
angular.module('authReqApp', ['checklist-model']).controller('authReqCtrl', function($scope, $http) {
|
angular.module('authReqApp', ['checklist-model']).controller('authReqCtrl', function($scope, $http) {
|
||||||
$scope.vocCountries = [];
|
$scope.vocCountries = [];
|
||||||
$scope.referencePerson = '';
|
|
||||||
$scope.requestMessage = '';
|
$scope.user = {
|
||||||
$scope.countries = [];
|
'referencePerson' : '',
|
||||||
|
'requestMessage' : '',
|
||||||
|
'countries' : []
|
||||||
|
};
|
||||||
|
|
||||||
$scope.registrationStatus = 0;
|
$scope.registrationStatus = 0;
|
||||||
$scope.registrationMessage = '';
|
$scope.registrationMessage = '';
|
||||||
|
|
||||||
|
@ -126,11 +130,8 @@
|
||||||
$scope.register = function () {
|
$scope.register = function () {
|
||||||
$('#btnRegister').attr("disabled", "disabled");
|
$('#btnRegister').attr("disabled", "disabled");
|
||||||
$http.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
|
$http.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
|
||||||
$http.post('registration_api/newUser', {
|
|
||||||
'referencePerson' : $scope.referencePerson,
|
$http.post('registration_api/newUser', $scope.user).then(function successCallback(res) {
|
||||||
'requestMessage': $scope.requestMessage,
|
|
||||||
'countries': $scope.countries
|
|
||||||
}).then(function successCallback(res) {
|
|
||||||
$scope.registrationStatus = res.data.status;
|
$scope.registrationStatus = res.data.status;
|
||||||
if (res.data.status == 1) {
|
if (res.data.status == 1) {
|
||||||
$scope.registrationMessage = 'Registration saved !';
|
$scope.registrationMessage = 'Registration saved !';
|
||||||
|
|
Loading…
Reference in New Issue