人人商城

manage-sms.tpl.php 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('account/account-header', TEMPLATE_INCLUDEPATH)) : (include template('account/account-header', TEMPLATE_INCLUDEPATH));?>
  3. <div id="js-account-manage-sms" ng-controller="AccountManageSms" ng-cloak>
  4. <table class="table we7-table table-hover">
  5. <col width="200px"/>
  6. <col width="230px"/>
  7. <tr>
  8. <th>剩余条数</th>
  9. <th class="text-right">操作</th>
  10. </tr>
  11. <tr>
  12. <td ng-if="notify.sms"><span ng-bind="notify.sms.balance"></span>条</td>
  13. <td ng-if="!notify.sms">0条</td>
  14. <td>
  15. <div class="link-group">
  16. <?php if(permission_check_account_user('see_account_manage_sms_blance')) { ?>
  17. <a href="javascript:;" data-toggle="modal" data-target="#balance" ng-click="editSms('balance', notify.sms.balance)">分配短信</a>
  18. <?php } ?>
  19. <a href="javascript:;" data-toggle="modal" data-target="#signature" ng-click="editSms('signature', notify.sms.signature)">设置短信签名</a>
  20. </div>
  21. </td>
  22. </tr>
  23. </table>
  24. <div class="modal fade" id="balance" tabindex="-1" role="dialog" aria-hidden="true">
  25. <div class="we7-modal-dialog modal-dialog">
  26. <div class="modal-content">
  27. <div class="modal-header">
  28. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  29. <div class="modal-title">分配短信</div>
  30. </div>
  31. <div class="modal-body we7-form">
  32. <div class="form-group">
  33. <input type="number" min="0" ng-model="middleSms.balance" class="form-control" placeholder="请填写短信剩余条数,必须为整数。" />
  34. </div>
  35. </div>
  36. <div class="modal-footer">
  37. <button type="button" class="btn btn-primary" ng-click="httpChange('balance')">确定</button>
  38. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="modal fade" id="signature" tabindex="-1" role="dialog" aria-hidden="true">
  44. <div class="we7-modal-dialog modal-dialog">
  45. <div class="modal-content">
  46. <div class="modal-header">
  47. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  48. <div class="modal-title">修改短信签名</div>
  49. </div>
  50. <div class="modal-body">
  51. <div class="form-group">
  52. <select name="signature" class="we7-select" ng-model="middleSms.signature">
  53. <?php if(!empty($notify['sms']['signature'])) { ?>
  54. <?php if(in_array($notify['sms']['signature'], $signatures)) { ?>
  55. <option selected value="<?php echo $notify['sms']['signature'];?>"><?php echo $notify['sms']['signature'];?></option>
  56. <?php } else if(!empty($notify['sms']['signature'])) { ?>
  57. <option value="<?php echo $notify['sms']['signature'];?>"><?php echo $notify['sms']['signature'];?>(未通过云服务审核)</option>
  58. <?php } ?>
  59. <?php } ?>
  60. <?php if(is_array($signatures)) { foreach($signatures as $signa) { ?>
  61. <?php if($signa != $notify['sms']['signature']) { ?>
  62. <option value="<?php echo $signa;?>"><?php echo $signa;?></option>
  63. <?php } ?>
  64. <?php } } ?>
  65. </select>
  66. <span class="help-block">请填写短信签名。未审核签名可以通过云短信审核签名</span>
  67. </div>
  68. </div>
  69. <div class="modal-footer">
  70. <button type="button" class="btn btn-primary" ng-click="httpChange('signature')">确定</button>
  71. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <script>
  78. angular.module('accountApp').value('config', {
  79. notify: <?php echo !empty($notify) ? json_encode($notify) : 'null'?>,
  80. signatures: <?php echo !empty($signatures) ? json_encode($signatures) : 'null'?>,
  81. links: {
  82. postSms: "<?php echo url('account/post/sms', array('acid' => $acid, 'uniacid' => $uniacid))?>",
  83. },
  84. });
  85. angular.bootstrap($('#js-account-manage-sms'), ['accountApp']);
  86. </script>
  87. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>