|
|
|
|
@@ -664,31 +664,57 @@
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<!-- line to input voicenumber -->
|
|
|
|
|
<?php if(is_array($product->voicenumbers) && count($product->voicenumbers)): ?>
|
|
|
|
|
Rufnummer: <strong><?=implode("\n<br />", $product->voicenumbers)?></strong> <i class="fas fa-pencil pointer text-primary" onclick="toggleVoicenumberEdit(<?=$i?>)"></i>
|
|
|
|
|
Rufnummer: <i class="fas fa-pencil pointer text-primary" onclick="toggleVoicenumberEdit(<?=$i?>)"></i>
|
|
|
|
|
<?php $numbers = []; foreach($product->voicenumbers as $voicenumber) { $numbers[] = $voicenumber->getPrettyNumber(); } ?>
|
|
|
|
|
<?php if(count($numbers)): ?>
|
|
|
|
|
<strong><?=implode(", ", $numbers)?></strong>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<div class="row <?=is_array($product->voicenumbers) && count($product->voicenumbers) ? "hidden" : ""?>" id="voicenumber-edit-<?=$i?>">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>">Nummernblock *</label>
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-<?=$i?>" class="form-control select2" onchange="loadVoicenumbers(<?=$i?>)">
|
|
|
|
|
<option></option>
|
|
|
|
|
<option value="portin">Rufnummernportierung</option>
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
<option value="<?=$block->id?>">+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-select-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumber-<?=$i?>">Rufnummer wählen *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voicenumber]" id="voicenumber-<?=$i?>" class="form-control select2">
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-voiceplan-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>">Sprachtarif *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voiceplan_id]" id="voiceplan_id-<?=$i?>" class="form-control">
|
|
|
|
|
<option></option>
|
|
|
|
|
<?php foreach(VoiceplanModel::getAll() as $plan): ?>
|
|
|
|
|
<option value="<?=$plan->id?>" <?=($product->voiceplan_id == $plan->id) ? "selected='selected'" : ""?>><?=$plan->name?></option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="number-lines mt-2">
|
|
|
|
|
<?php $num = 0; ?>
|
|
|
|
|
<?php foreach($product->voicenumbers as $voicenumber): ?>
|
|
|
|
|
<div class="row" id="voicenumber-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>-<?=$num?>">Nummernblock *</label>
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-<?=$i?>-<?=$num?>" class="form-control select2" onchange="loadVoicenumbers(<?=$i?>, <?=$num?>)" data-i="<?=$i?>" data-num="<?=$num?>" data-number="<?=$voicenumber->getPrettyNumber()?>">
|
|
|
|
|
<option></option>
|
|
|
|
|
<option value="portin" <?=(!$voicenumber->voicenumberblock_id) ? "selected='selected'" : ""?>>Rufnummernportierung</option>
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
<option value="<?=$block->id?>" <?=($voicenumber->voicenumberblock_id == $block->id) ? "selected='selected'" : ""?>>+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-custom-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-<?=$i?>">Rufnummer eingeben *</label>
|
|
|
|
|
<input type="text" class="form-control" name="products[<?=$i?>][voicenumber_custom]" id="voicenumber_custom-<?=$i?>" value="" placeholder="Gesamte Rufnummer (+43 123 456 78 )" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-select-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumber-<?=$i?>-<?=$num?>">Rufnummer wählen *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voicenumber][<?=$num?>]" id="voicenumber-<?=$i?>-<?=$num?>" class="form-control select2" data-number="<?=$voicenumber->number?>" data-number_id="<?=$voicenumber->id?>">
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-custom-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-<?=$i?>-<?=$num?>">Rufnummer eingeben *</label>
|
|
|
|
|
<input type="text" class="form-control" name="products[<?=$i?>][voicenumber_custom][<?=$num?>]" id="voicenumber_custom-<?=$i?>-<?=$num?>" value="<?=$voicenumber->getPrettyNumber()?>" placeholder="Gesamte Rufnummer (+43 123 456 78 )" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php $num++; endforeach; ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@@ -808,30 +834,50 @@
|
|
|
|
|
|
|
|
|
|
<div class="row mt-1 mb-2 hidden" id="voicenumber-<?=$i?>-line">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<!-- line to input voicenumber -->
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>">Nummernblock *</label>
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-<?=$i?>" class="form-control select2" onchange="loadVoicenumbers(<?=$i?>)">
|
|
|
|
|
<option></option>
|
|
|
|
|
<option value="portin">Rufnummernportierung</option>
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
<option value="<?=$block->id?>">+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-select-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumber-<?=$i?>">Rufnummer wählen *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voicenumber]" id="voicenumber-<?=$i?>" class="form-control select2">
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row" id="voicenumber-edit-<?=$i?>">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-voiceplan-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>">Sprachtarif *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voiceplan_id]" id="voiceplan_id-<?=$i?>" class="form-control">
|
|
|
|
|
<option></option>
|
|
|
|
|
<?php foreach(VoiceplanModel::getAll() as $plan): ?>
|
|
|
|
|
<option value="<?=$plan->id?>"><?=$plan->name?></option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="number-lines mt-2">
|
|
|
|
|
<?php $num = 0; ?>
|
|
|
|
|
<div class="row" id="voicenumber-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<div class="col-4" id="voicenumberblock-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumberblock-<?=$i?>-<?=$num?>">Nummernblock *</label>
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-<?=$i?>-<?=$num?>" class="form-control select2" onchange="loadVoicenumbers(<?=$i?>, <?=$num?>)">
|
|
|
|
|
<option></option>
|
|
|
|
|
<option value="portin">Rufnummernportierung</option>
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
<option value="<?=$block->id?>">+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-custom-<?=$i?>-line">
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-<?=$i?>">Rufnummer eingeben *</label>
|
|
|
|
|
<input type="text" class="form-control" name="products[<?=$i?>][voicenumber_custom]" id="voicenumber_custom-<?=$i?>" value="" placeholder="Gesamte Rufnummer (+43 123 456 78 )" />
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-select-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumber-<?=$i?>-<?=$num?>">Rufnummer wählen *</label>
|
|
|
|
|
<select name="products[<?=$i?>][voicenumber][<?=$num?>]" id="voicenumber-<?=$i?>-<?=$num?>" class="form-control select2">
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-custom-<?=$i?>-line-<?=$num?>">
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-<?=$i?>-<?=$num?>">Rufnummer eingeben *</label>
|
|
|
|
|
<input type="text" class="form-control" name="products[<?=$i?>][voicenumber_custom][<?=$num?>]" id="voicenumber_custom-<?=$i?>-<?=$num?>" value="" placeholder="Gesamte Rufnummer (+43 123 456 78 )" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php $num++; ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@@ -1004,8 +1050,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(".select2").select2({
|
|
|
|
|
@@ -1286,7 +1330,19 @@
|
|
|
|
|
addNewProductLine(Number(id) + 1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("select[name=voicenumberblock_id]").each(function(i) {
|
|
|
|
|
var i = $(this).data("i");
|
|
|
|
|
var num = $(this).data("num");
|
|
|
|
|
var number = $(this).data("number");
|
|
|
|
|
|
|
|
|
|
console.log(i, num, number);
|
|
|
|
|
|
|
|
|
|
if($(this).val().length) {
|
|
|
|
|
loadVoicenumbers(i, num, number);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function toggleVoicenumberEdit(id) {
|
|
|
|
|
$('#voicenumber-edit-' + id).toggle();
|
|
|
|
|
|
|
|
|
|
@@ -1295,16 +1351,17 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadVoicenumbers(id) {
|
|
|
|
|
var block_id = $("#voicenumberblock_id-" + id).val();
|
|
|
|
|
function loadVoicenumbers(id, num, number = false) {
|
|
|
|
|
var block_id = $("#voicenumberblock_id-" + id + "-" + num).val();
|
|
|
|
|
|
|
|
|
|
if(block_id == "portin") {
|
|
|
|
|
$("#voicenumber-select-" + id + "-line").hide();
|
|
|
|
|
$("#voicenumber-select-" + id + "-line select").val("");
|
|
|
|
|
$("#voicenumber-" + id).empty();
|
|
|
|
|
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line").show();
|
|
|
|
|
//$("#voicenumberblock-" + id + "-line").hide();
|
|
|
|
|
$("#voicenumber-select-" + id + "-line-" + num).hide();
|
|
|
|
|
$("#voicenumber-select-" + id + "-line-" + num + " select").val("");
|
|
|
|
|
$("#voicenumber-" + id + "-" + num).empty();
|
|
|
|
|
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line-" + num).show();
|
|
|
|
|
addPhoneLine(id, num);
|
|
|
|
|
//$("#voicenumberblock-" + id + "-line-" + num).hide();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1313,25 +1370,39 @@
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "<?=self::getUrl("Voicenumberblock", "api")?>",
|
|
|
|
|
type: "POST",
|
|
|
|
|
context: id,
|
|
|
|
|
context: {
|
|
|
|
|
id: id,
|
|
|
|
|
num: num,
|
|
|
|
|
default_value: number
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
do: "getFreeNumbers",
|
|
|
|
|
id: block_id
|
|
|
|
|
},
|
|
|
|
|
success: function(success) {
|
|
|
|
|
id = this.id;
|
|
|
|
|
num = this.num;
|
|
|
|
|
default_value = this.default_value;
|
|
|
|
|
//console.log(success, id);
|
|
|
|
|
if(success.status != "OK") return;
|
|
|
|
|
|
|
|
|
|
if(("numbers" in success.result) && success.result.numbers.length) {
|
|
|
|
|
$("#voicenumber-" + id).empty();
|
|
|
|
|
success.result.numbers.forEach(function(num) {
|
|
|
|
|
$("#voicenumber-" + id).append("<option value='" + num + "'>+" + num + "</option>");
|
|
|
|
|
$("#voicenumber-" + id + "-" + num).empty();
|
|
|
|
|
success.result.numbers.forEach(function(number) {
|
|
|
|
|
if(number == default_value) {
|
|
|
|
|
$("#voicenumber-" + id + "-" + num).append("<option value='" + number + "' selected='selected'>+" + number + "</option>");
|
|
|
|
|
} else {
|
|
|
|
|
$("#voicenumber-" + id + "-" + num).append("<option value='" + number + "'>+" + number + "</option>");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
//$("#voicenumberblock-" + id + "-line").hide();
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line").hide();
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line input").val("");
|
|
|
|
|
//$("#voicenumberblock-" + id + "-line-" + num).hide();
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line-" + num).hide();
|
|
|
|
|
$("#voicenumber-custom-" + id + "-line-" + num + " input").val("");
|
|
|
|
|
|
|
|
|
|
$("#voicenumber-select-" + id + "-line").show();
|
|
|
|
|
$("#voicenumber-select-" + id + "-line-" + num).show();
|
|
|
|
|
|
|
|
|
|
addPhoneLine(id, num);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@@ -1339,6 +1410,51 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addPhoneLine(id, num) {
|
|
|
|
|
++num;
|
|
|
|
|
|
|
|
|
|
console.log(id, num);
|
|
|
|
|
|
|
|
|
|
if($('#voicenumber-' + id + '-line-' + num).length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("adding " + id + ", " + num);
|
|
|
|
|
|
|
|
|
|
new_line = '<div class="row" id="voicenumber-' + id + '-line-' + num + '"> \
|
|
|
|
|
<div class="col-4 mt-2" id="voicenumberblock-' + id + '-line-' + num + '"> \
|
|
|
|
|
<label class="form-label" for="voicenumberblock-' + id + '-' + num + '">Nummernblock</label> \
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-' + id + '-' + num + '" class="form-control select2" onchange="loadVoicenumbers(' + id + ', ' + num + ')"> \
|
|
|
|
|
<option></option> \
|
|
|
|
|
<option value="portin">Rufnummernportierung</option>';
|
|
|
|
|
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
new_line += '<option value="<?=$block->id?>">+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>';
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
new_line += '</select> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
<div class="col-4 hidden mt-2" id="voicenumber-select-' + id + '-line-' + num + '"> \
|
|
|
|
|
<label class="form-label" for="voicenumber-' + id + '-' + num + '">Rufnummer wählen *</label> \
|
|
|
|
|
<select name="products[' + id + '][voicenumber][' + num + ']" id="voicenumber-' + id + '-' + num + '" class="form-control select2"> \
|
|
|
|
|
</select> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
<div class="col-4 hidden mt-2" id="voicenumber-custom-' + id + '-line-' + num + '"> \
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-' + id + '-' + num + '">Rufnummer eingeben *</label> \
|
|
|
|
|
<input type="text" class="form-control" name="products[' + id + '][voicenumber_custom][' + num + ']" id="voicenumber_custom-' + id + '-' + num + '" value="" placeholder="Gesamte Rufnummer (+43 123 456 78 )" /> \
|
|
|
|
|
</div> \
|
|
|
|
|
</div>';
|
|
|
|
|
|
|
|
|
|
$("#voicenumber-edit-" + id + " .number-lines").append(new_line);
|
|
|
|
|
|
|
|
|
|
$("#voicenumber " + id + "-".select2").select2({
|
|
|
|
|
allowClear: true,
|
|
|
|
|
placeholder: ""
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
|
* Form validation
|
|
|
|
|
@@ -1564,7 +1680,7 @@
|
|
|
|
|
|
|
|
|
|
console.log("empty: " + checkEmpty);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1704,8 +1820,7 @@
|
|
|
|
|
<label class="form-label" for="termination_id-' + i +'">Anschluss</label> \
|
|
|
|
|
<select name="products[' + i +'][termination_id]" id="termination_id-' + i +'" class="form-control select2"> \
|
|
|
|
|
<option></option>';
|
|
|
|
|
|
|
|
|
|
<?php foreach($terminations as $t): ?>
|
|
|
|
|
<?php foreach($terminations as $t): ?>
|
|
|
|
|
new_line += '<option value="<?=$t->id?>"><?=$t->code?> - <?=$t->getAddress(true)?></option>';
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
new_line += '</select> \
|
|
|
|
|
@@ -1715,12 +1830,52 @@
|
|
|
|
|
<div class="row mt-1 mb-2 hidden" id="voicenumber-' + i + '-line"> \
|
|
|
|
|
<!-- line to input voicenumber --> \
|
|
|
|
|
<div class="col-6"> \
|
|
|
|
|
<label class="form-label" for="voicenumber-' + i + '">Rufnummer</label> \
|
|
|
|
|
<textarea class="form-control" name="products[' + i + '][voicenumber]" id="voicenumber-' + i + '" placeholder="Eine Rufnummer pro Zeile (+43 123 456 78)" /></textarea> \
|
|
|
|
|
<small>Wenn Rufnummern bekannt sind oder portiert werden (Eine Rufnummer pro Zeile (+43 123 456 78))</small> \
|
|
|
|
|
<div class="row"> \
|
|
|
|
|
<div class="col-4" id="voicenumberblock-voiceplan-' + i + '-line"> \
|
|
|
|
|
<label class="form-label" for="voicenumberblock-' + i + '">Sprachtarif *</label> \
|
|
|
|
|
<select name="products[' + i + '][voiceplan_id]" id="voiceplan_id-' + i + '" class="form-control"> \
|
|
|
|
|
<option></option>';
|
|
|
|
|
<?php foreach(VoiceplanModel::getAll() as $plan): ?>
|
|
|
|
|
new_line += '<option value="<?=$plan->id?>"><?=$plan->name?></option>';
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
new_line += '</select> \
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
<div class="row mt-2" id="voicenumber-edit-' + i + '"> \
|
|
|
|
|
<div class="col"> \
|
|
|
|
|
<!-- line to input voicenumber --> \
|
|
|
|
|
<div class="number-lines"> \
|
|
|
|
|
<div class="row" id="voicenumber-' + i + '-line-0"> \
|
|
|
|
|
<div class="col-4" id="voicenumberblock-' + i + '-line-0"> \
|
|
|
|
|
<label class="form-label" for="voicenumberblock-' + i + '-0">Nummernblock *</label> \
|
|
|
|
|
<select name="voicenumberblock_id" id="voicenumberblock_id-' + i + '-0" class="form-control select2" onchange="loadVoicenumbers(' + i + ', 0)"> \
|
|
|
|
|
<option></option> \
|
|
|
|
|
<option value="portin">Rufnummernportierung</option>';
|
|
|
|
|
<?php foreach(VoicenumberblockModel::getAll() as $block): ?>
|
|
|
|
|
new_line += '<option value="<?=$block->id?>">+<?=$block->countrycode?> <?=$block->areacode?> (<?=$block->name?>)</option>';
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
new_line += '</select> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-select-' + i + '-line-0"> \
|
|
|
|
|
<label class="form-label" for="voicenumber-' + i + '-0">Rufnummer wählen *</label> \
|
|
|
|
|
<select name="products[' + i + '][voicenumber][0]" id="voicenumber-' + i + '-0" class="form-control select2"> \
|
|
|
|
|
</select> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
<div class="col-4 hidden" id="voicenumber-custom-' + i + '-line-0"> \
|
|
|
|
|
<label class="form-label" for="voicenumber_custom-' + i + '-0">Rufnummer eingeben *</label> \
|
|
|
|
|
<input type="text" class="form-control" name="products[' + i + '][voicenumber_custom][0]" id="voicenumber_custom-' + i + '-0" value="" placeholder="Gesamte Rufnummer (+43 123 456 78 )" /> \
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
\
|
|
|
|
|
\
|
|
|
|
|
<div class="row mt-1 mb-2"> \
|
|
|
|
|
<!-- line 2 --> \
|
|
|
|
|
<div class="col-6"> \
|
|
|
|
|
@@ -1729,7 +1884,7 @@
|
|
|
|
|
</div> \
|
|
|
|
|
<div class="col-2"> \
|
|
|
|
|
<label class="form-label" for="contract_term-' + i + '">Mindestvertragslaufzeit</label> \
|
|
|
|
|
<select class="form-control" name="products[' + i + '][contract_term]" id="contract_term-<?=$i?>" placeholder="Mindestvertragslaufzeit"> \
|
|
|
|
|
<select class="form-control" name="products[' + i + '][contract_term]" id="contract_term-' + i +'" placeholder="Mindestvertragslaufzeit"> \
|
|
|
|
|
<option value="0">Keine</option> \
|
|
|
|
|
<option value="1">1 Monat</option> \
|
|
|
|
|
<option value="12">12 Monate</option> \
|
|
|
|
|
@@ -1759,9 +1914,9 @@
|
|
|
|
|
</div> \
|
|
|
|
|
</div> \
|
|
|
|
|
';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#products-form').append(new_line);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#product_id-" + i).select2({
|
|
|
|
|
allowClear: true,
|
|
|
|
|
placeholder: ""
|
|
|
|
|
|