TEMPLATE_MAKEUP['language'] = '
\n'+
'\n'+
'\n'+
' | \n'+
'\n'+
'\n'+
'{{ language_form.empty_form.level|escapejs }}{{ language_form.empty_form.level.errors|escapejs }}'+
' \n'+
' | \n'+
'
\n';
TEMPLATE_MAKEUP['education'] = '\n'+
'  | \n'+
'
\n'+
'\n'+
'\n'+
'\n'+
' | \n'+
'
\n'+
'\n'+
' | \n'+
'\n'+
'{{ education_form.empty_form.institution|escapejs }}{{ education_form.empty_form.institution.errors|escapejs }}'+
' | \n'+
'
\n'+
'\n'+
' | \n'+
'\n'+
'{{ education_form.empty_form.faculty|escapejs }}{{ education_form.empty_form.faculty.errors|escapejs }}'+
' | \n'+
'
\n'+
'\n'+
' | \n'+
'\n'+
'{{ education_form.empty_form.specialty|escapejs }}{{ education_form.empty_form.specialty.errors|escapejs }}'+
' | \n'+
'
\n'+
'\n'+
' | \n'+
'\n'+
'{{ education_form.empty_form.qualification|escapejs }}{{ education_form.empty_form.qualification.errors|escapejs }}'+
' | \n'+
'
\n'+
'\n'+
' | \n'+
'\n'+
'{{ education_form.empty_form.graduation_year|escapejs }}{{ education_form.empty_form.graduation_year.errors|escapejs }}'+
' | \n'+
'
';
/* Without deletion.*/
function addForm(form_count, form_name, temp_form){
var button = $('#' + form_name + ' .add_form_button');
button.click(function() {
var form = temp_form.replace(/__prefix__/g, form_count);
form_count++;
button.closest('tr').before(form);
$('#id_form-TOTAL_FORMS').val(form_count);
$('#id_form-MAX_NUM_FORMS').val(form_count);
});
};
/* With deletion */
function addDelEducation(){
var checked = $('.education_number:checked');
var form = TEMPLATE_MAKEUP['education'].replace(/__prefix__/g, 1);
if(checked.val() == 2){
$('#education_form').append(form);
$('#id_education-TOTAL_FORMS').val(2);
}else if(checked.val() == 1){
$('#id_education-TOTAL_FORMS').val(1);
$('.removeble_label').remove();
var inputs = $('#education_form input:text');
for(var i=0; i