application is now in: FHC-AddOn-Bewerbung

This commit is contained in:
Robert Hofer
2015-02-24 17:24:46 +01:00
parent 8f069c435a
commit 557ce44d70
4 changed files with 0 additions and 2080 deletions
-30
View File
@@ -1,30 +0,0 @@
/*
Copyright (C) 2015 fhcomplete.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Authors: Robert Hofer <robert.hofer@technikum-wien.at>
*/
/*
Created on : Feb 11, 2015, 10:17:08 AM
Author : Robert Hofer <robert.hofer@technikum-wien.at>
*/
#lp h1, #lp img {
margin: 50px 0;
}
p.infotext {
margin: 40px 0;
}
-122
View File
@@ -1,122 +0,0 @@
function checkNotEmpty(ids)
{
var errors = [];
for(var i in ids) {
var input = $('#' + ids[i]);
if(!$.trim(input.val())) {
errors.push(ids[i]);
input.closest('div.form-group').removeClass('has-success').addClass('has-error');
} else {
input.closest('div.form-group').removeClass('has-error').addClass('has-success');
}
}
return errors;
}
function checkKontakt()
{
var errors;
errors = checkNotEmpty([
'telefonnummer',
'email',
'strasse',
'plz',
'ort'
]);
if(errors.length) {
return false;
}
return true;
}
function checkPerson()
{
var errors;
errors = checkNotEmpty([
'nachname',
'vorname',
'staatsbuergerschaft'
]);
if ($("#gebdatum").val() !== '')
{
var patt1 = new RegExp("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})");
if (!patt1.test($("#gebdatum").val()))
{
$('#gebdatum').closest('div.form-group').removeClass('has-success').addClass('has-error');
errors.push('gebdatum');
}
else
{
$('#gebdatum').closest('div.form-group').removeClass('has-error').addClass('has-success');
}
}
// Berechnung der Sozialversicherungsnummer wenn AT
if ($("#staatsbuergerschaft").val() === 'A')
{
var soz_nr = $.trim($("#svnr").val());
if (!/^\d{10}$/.test(soz_nr))
{
$('#svnr').closest('div.form-group').removeClass('has-success').addClass('has-error');
errors.push('svnr');
}
var checksum = 0;
checksum = (3 * soz_nr[0]) + (7 * soz_nr[1]) + (9 * soz_nr[2]) + (5 * soz_nr[4]) + (8 * soz_nr[5]) + (4 * soz_nr[6]) + (2 * soz_nr[7]) + (1 * soz_nr[8]) + (6 * soz_nr[9]);
checksum = checksum % 11;
if (checksum !== parseInt(soz_nr[3], 10))
{
$('#svnr').closest('div.form-group').removeClass('has-success').addClass('has-error');
errors.push('svnr');
}
else
{
$('#svnr').closest('div.form-group').removeClass('has-error').addClass('has-success');
}
}
if(errors.length) {
return false;
}
return true;
}
function FensterOeffnen(adresse)
{
MeinFenster = window.open(adresse, "Info", "width=700,height=200");
MeinFenster.focus();
}
function toggleDiv(div)
{
$('#'+div).toggle();
}
$(function() {
if(activeTab) {
$('#bewerber-navigation a[href="#' + activeTab + '"]').tab('show');
}
$('.btn-nav').on('click', function() {
var tabname = $(this).attr('data-jump-tab');
$('#bewerber-navigation a[href="#' + tabname + '"]').tab('show');
});
$('#bewerber-navigation a').on('click', function() {
$(this).closest('.collapse').collapse('hide');
});
});