mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 01:16:26 +02:00
fix a lot a errors probably due to migration
This commit is contained in:
parent
afb899c003
commit
ae42484a60
37 changed files with 561 additions and 581 deletions
|
@ -48,7 +48,7 @@
|
|||
<div class="form-group">
|
||||
<label>Numéro de téléphone du contact</label>
|
||||
<div class="form-group">
|
||||
<input name="" class="form-control" type="tel" id="phone-international-input">
|
||||
<input name="number" class="form-control" type="tel" id="phone-international-input">
|
||||
<input name="number" type="hidden" id="phone-hidden-input" required>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,18 +64,19 @@
|
|||
</div>
|
||||
<script>
|
||||
jQuery('document').ready(function($)
|
||||
{
|
||||
jQuery('#phone-international-input').intlTelInput({
|
||||
{
|
||||
var number_input = jQuery('#phone-international-input')[0];
|
||||
var iti_number_input = window.intlTelInput(number_input, {
|
||||
defaultCountry: '<?php $this->s(RASPISMS_SETTINGS_DEFAULT_PHONE_COUNTRY); ?>',
|
||||
preferredCountries: <?php $this->s(json_encode(explode(',', RASPISMS_SETTINGS_PREFERRED_PHONE_COUNTRY)), false, false); ?>,
|
||||
nationalMode: true,
|
||||
utilsScript: '<?php echo HTTP_PWD; ?>/js/intlTelInput/lib/libphonenumber/utils.js'
|
||||
});
|
||||
utilsScript: '<?php echo HTTP_PWD_JS; ?>/intlTelInput/utils.js'
|
||||
});
|
||||
|
||||
jQuery('form').on('submit', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
jQuery('#phone-hidden-input').val(jQuery('#phone-international-input').intlTelInput("getNumber"));
|
||||
e.preventDefault();
|
||||
jQuery('#phone-hidden-input').val(iti_number_input.getNumber())
|
||||
this.submit();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="<?php echo \descartes\Router::url('Contact', 'update', ['csrf' => $_SESSION['csrf']]);?>" method="POST">
|
||||
<?php foreach ($contacts as $contact) } ?>
|
||||
<?php foreach ($contacts as $contact) { ?>
|
||||
<div class="form-group">
|
||||
<input name="contacts[<?php $this->s($contact['id']); ?>][id]" type="hidden" value="<?php $this->s($contact['id']); ?>">
|
||||
<label>Nom contact</label>
|
||||
|
@ -68,24 +68,24 @@
|
|||
</div>
|
||||
<script>
|
||||
jQuery('document').ready(function($)
|
||||
{
|
||||
jQuery('.phone-international-input').intlTelInput({
|
||||
defaultCountry: '<?php $this->s(RASPISMS_SETTINGS_DEFAULT_PHONE_COUNTRY); ?>',
|
||||
preferredCountries: <?php $this->s(json_encode(explode(',', RASPISMS_SETTINGS_PREFERRED_PHONE_COUNTRY)), false, false); ?>,
|
||||
nationalMode: true,
|
||||
utilsScript: '<?php echo HTTP_PWD; ?>/js/intlTelInput/lib/libphonenumber/utils.js'
|
||||
});
|
||||
|
||||
jQuery('form').on('submit', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
jQuery('.phone-international-input').each(function(key, value)
|
||||
{
|
||||
jQuery('#phone-hidden-input-' + jQuery(this).attr('contact-id')).val(jQuery(this).intlTelInput("getNumber"));
|
||||
});
|
||||
|
||||
this.submit();
|
||||
});
|
||||
{
|
||||
jQuery('.phone-international-input').each(function()
|
||||
{
|
||||
var number_input = this;
|
||||
var iti_number_input = window.intlTelInput(number_input, {
|
||||
defaultCountry: '<?php $this->s(RASPISMS_SETTINGS_DEFAULT_PHONE_COUNTRY); ?>',
|
||||
preferredCountries: <?php $this->s(json_encode(explode(',', RASPISMS_SETTINGS_PREFERRED_PHONE_COUNTRY)), false, false); ?>,
|
||||
nationalMode: true,
|
||||
utilsScript: '<?php echo HTTP_PWD_JS; ?>/intlTelInput/utils.js'
|
||||
});
|
||||
|
||||
jQuery('form').on('submit', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
jQuery('#phone-hidden-input-' + jQuery(number_input).attr('contact-id')).val(iti_number_input.getNumber())
|
||||
this.submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($contacts as $contact) } ?>
|
||||
<?php foreach ($contacts as $contact) { ?>
|
||||
<tr>
|
||||
<td><?php $this->s($contact['id']); ?></td>
|
||||
<td><?php $this->s($contact['name']); ?></td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue