Disable sending without number

This commit is contained in:
osaajani 2020-03-27 05:09:04 +01:00
parent 0124bc2627
commit 0a5fd04c31
1 changed files with 14 additions and 9 deletions

View File

@ -32,6 +32,9 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<?php if (!count($phones)) { ?>
<div class="alert alert-danger">Pour pouvoir envoyez un SMS vous devez d'abord <a href="<?= \descartes\Router::url('Phone', 'add'); ?>">créer au moins un téléphone.</a></div>
<?php } ?>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-send fa-fw"></i> Création d'un nouveau SMS</h3> <h3 class="panel-title"><i class="fa fa-send fa-fw"></i> Création d'un nouveau SMS</h3>
@ -106,15 +109,17 @@
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<div class="form-group"> <?php if (count($phones)) { ?>
<label>Numéro à employer : </label> <div class="form-group">
<select name="id_phone" class="form-control"> <label>Numéro à employer : </label>
<option value="">N'importe lequel</option> <select name="id_phone" class="form-control">
<?php foreach ($phones as $phone) { ?> <option value="">N'importe lequel</option>
<option value="<?php $this->s($phone['id']); ?>"><?php $this->s($phone['number']); ?></option> <?php foreach ($phones as $phone) { ?>
<?php } ?> <option value="<?php $this->s($phone['id']); ?>"><?php $this->s($phone['number']); ?></option>
</select> <?php } ?>
</div> </select>
</div>
<?php } ?>
<a class="btn btn-danger" href="<?php echo \descartes\Router::url('Scheduled', 'list'); ?>">Annuler</a> <a class="btn btn-danger" href="<?php echo \descartes\Router::url('Scheduled', 'list'); ?>">Annuler</a>
<input type="submit" class="btn btn-success" value="Enregistrer le SMS" /> <input type="submit" class="btn btn-success" value="Enregistrer le SMS" />
</form> </form>