Ajout activation/desactivation son sur reception message

This commit is contained in:
OsaAjani 2015-12-09 20:15:22 +01:00
parent b04d68d4ba
commit 0a5cae859c
3 changed files with 28 additions and 6 deletions

View File

@ -155,4 +155,5 @@ VALUES ('transfer', '1'),
('detect_url', '1'), ('detect_url', '1'),
('default_phone_country', 'fr'), ('default_phone_country', 'fr'),
('preferred_phone_country', 'fr,be,ca'), ('preferred_phone_country', 'fr,be,ca'),
('sms_flash', '0'); ('sms_flash', '0'),
('sms_reception_sound', '1');

View File

@ -2,10 +2,12 @@
RaspiSMS a été créé pour vous par le site <a href="http://raspbian-france.fr">Raspbian-France</a>, site dédié à la Raspberry Pi<br/> RaspiSMS a été créé pour vous par le site <a href="http://raspbian-france.fr">Raspbian-France</a>, site dédié à la Raspberry Pi<br/>
Copyright 2014. RaspiSMS est un programme sous <a href="https://www.gnu.org/licenses/gpl.txt" rel="nofollow">licence GNU GPL</a>.<br/> Copyright 2014. RaspiSMS est un programme sous <a href="https://www.gnu.org/licenses/gpl.txt" rel="nofollow">licence GNU GPL</a>.<br/>
</footer> </footer>
<?php if (RASPISMS_SETTINGS_SMS_RECEPTION_SOUND) { ?>
<audio id="reception-sound"> <audio id="reception-sound">
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.ogg" type="audio/ogg"> <source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.ogg" type="audio/ogg">
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.mp3" type="audio/mpeg"> <source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.mp3" type="audio/mpeg">
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.wav" type="audio/wav"> <source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.wav" type="audio/wav">
</audio> </audio>
<?php } ?>
</body> </body>
</html> </html>

View File

@ -89,6 +89,25 @@
</form> </form>
</div> </div>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title"><i class="fa fa-music fa-fw"></i> Son sur reception d'un SMS</h4>
</div>
<div class="panel-body">
<form action="<?php echo $this->generateUrl('settings', 'change', ['sms_reception_sound', $_SESSION['csrf']]); ?>" method="POST">
<div class="form-group">
<label>Jouer un son quand vous recevez un SMS : </label>
<select name="settingValue" class="form-control">
<option value="0">Non</option>
<option value="1" <?php echo RASPISMS_SETTINGS_SMS_RECEPTION_SOUND ? 'selected' : ''; ?>>Oui</option>
</select>
</div>
<div class="text-center">
<button class="btn btn-success">Mettre à jour les données</button>
</div>
</form>
</div>
</div>
</div> </div>
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">