mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
multiple name servers
This commit is contained in:
parent
20613e92a9
commit
86d7c7f655
1 changed files with 101 additions and 13 deletions
|
@ -138,7 +138,21 @@
|
|||
<?php print __('Default Name Servers');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns1" <?php if (!empty($v_ns1)) echo 'value="'.htmlentities($v_ns1).'"'; ?>>
|
||||
<span class="remove-ns additional-control delete"><?=__('delete')?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns2" <?php if (!empty($v_ns2)) echo 'value="'.htmlentities($v_ns2).'"'; ?>>
|
||||
<span class="remove-ns additional-control delete"><?=__('delete')?></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns1" <?php if (!empty($v_ns1)) echo "value=".htmlentities($v_ns1); ?>>
|
||||
</td>
|
||||
|
@ -147,17 +161,61 @@
|
|||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns2" <?php if (!empty($v_ns2)) echo "value=".htmlentities($v_ns2); ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns3" <?php if (!empty($v_ns3)) echo "value=".htmlentities($v_ns3); ?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns4" <?php if (!empty($v_ns4)) echo "value=".htmlentities($v_ns4); ?>>
|
||||
</td>
|
||||
</tr>
|
||||
</tr -->
|
||||
<? if($v_ns3)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities($v_ns3).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($v_ns4)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities($v_ns4).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($v_ns5)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities($v_ns5).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($v_ns6)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities($v_ns6).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($v_ns7)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities($v_ns7).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($v_ns8)
|
||||
echo '<tr>
|
||||
<td>
|
||||
<input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities($v_ns8).'">
|
||||
<span class="remove-ns additional-control delete">'.__('delete').'</span>
|
||||
</td>
|
||||
</tr>';
|
||||
?>
|
||||
<tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
|
||||
<td class="step-top-small">
|
||||
<span class="add-ns-button additional-control add"><?=__('Add one more Name Server')?></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<table class="data-col2">
|
||||
<tr>
|
||||
|
@ -173,4 +231,34 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.add-ns-button').click(function(){
|
||||
var n = $("input[name^=v_ns]").length;
|
||||
if(n < 8){
|
||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||
t.find('span').show();
|
||||
$('tr.add-ns').before(t);
|
||||
}
|
||||
if( n == 7 ) {
|
||||
$('.add-ns').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.remove-ns').click(function(){
|
||||
$(this).parents('tr')[0].remove();
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
$('.add-ns').show()
|
||||
})
|
||||
|
||||
$('input[name^=v_ns]').each(function(i, ns){
|
||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue