PageSourceSearch

https://rekrutacja.pedagogium.pl/pdg-irk-app/content/script/irk/pages/rejestracja/rejestracjaController.js

js pedagogium.pl collected 2026-10-04 13:34:46 UTC 2,601 bytes, 65 lines download raw bytes

1angular.module('irk')
2    .controller('RejestracjaController', function ($scope, $rootScope, $compile, $document, AUTH_EVENTS, AuthService, $controller, $http, vcRecaptchaService, $location, toaster, i18n) {
3        angular.extend(this, $controller('IntakeControllerMixin', {$scope: $scope}));
4
5        $scope.fieldMap = undefined;
6        $scope.zgody = [];
7        $scope.brakujaceZgody = [];
8        
9        $scope.initZgody = function(liczbaZgod) {
10            for(let i = 0; i < liczbaZgod; ++i) {
11                $scope.zgody[i] = false;
12            }
13        }
14
15        $scope.zapisz = function() {
16            $scope.save($scope.gidGroupMap);
17        }
18
19        $scope.save = function(group) {
20            return $http.post('REST/rejestracja/wykonaj', {
21                gidGroupMap: group,
22                zgody: $scope.zgody
23              })
24              .then(function (wynikRejestracji) {
25                  var restIntakeGroupMap = wynikRejestracji.data.restIntakeGroupMap;
26                  var wynikWalidacjiDodatk
26owychDanych = wynikRejestracji.data.wynikWalidacjiDodatkowychDanych;
27                  $scope.updateGroup(restIntakeGroupMap);
28                  $scope.brakujaceZgody = wynikWalidacjiDodatkowychDanych.brakujaceZgody;
29                  if(!wynikWalidacjiDodatkowychDanych.sukces) {
30                      i18n.get('interfejs.irk.strona.Rejestracja.Zgoda.required').then(function(komunikat) {
31                          toaster.pop('error', komunikat);
32                      });
33                  }
34                  else if(restIntakeGroupMap.valid) {
35                      $location.path('/ZarejestrowanoPomyslnie');
36                  }
37              });
38        };
39
40        $scope.getGroup = function(group) {
41            return $http.post('REST/rejestracja', {gidGroupMap: group})
42              .then(function (groupDefinition) {
43                  $scope.updateGroup(groupDefinition.data);
44              });
45        };
46
47        var original = $scope.updateGroup;
48        $scope.updateGroup = function(gidGroupMap) {
49              original(gidGroupMap);
50              $scope.fieldMap = gidGroupMap.gidGroupMap.rejestracjaintake._0.fieldMap;
51              if(typeof $scope.recaptchaWidgetId !== 'undefined') {
52                  vcRecaptchaService.reload($scope.recaptchaWidgetId);
53              }
54        }
55
56        $scope.setCaptchaResponse = function(response) {
57            $scope.fieldMap.Captcha.value = response;
58        }
59
60        $scope.setWidgetId = function(widgetId) {
61            $scope.recaptchaWidgetId = widgetId;
62        }
63
64        $scope.getGroup();
65    });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.