add.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <style type="text/css">
  2. #schedulepicker {
  3. padding-top: 7px;
  4. }
  5. #schedulepicker h5 {
  6. line-height: 30px;
  7. }
  8. #schedulepicker .list-group {
  9. margin-bottom: 0;
  10. }
  11. </style>
  12. <style data-render="darktheme">
  13. body.darktheme #schedulepicker pre {
  14. background-color: #4c4c4c;
  15. border-color: #262626;
  16. color: #ccc;
  17. }
  18. </style>
  19. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  20. <div class="form-group">
  21. <label for="title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
  22. <div class="col-xs-12 col-sm-8">
  23. <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required"/>
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label for="type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
  28. <div class="col-xs-12 col-sm-8">
  29. {:build_select('row[type]', $typeList, null, ['class'=>'form-control', 'data-rule'=>'required'])}
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
  34. <div class="col-xs-12 col-sm-8">
  35. <textarea name="row[content]" id="c-content" cols="30" rows="5" class="form-control" data-rule="required"></textarea>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label for="schedule" class="control-label col-xs-12 col-sm-2">{:__('Schedule')}:</label>
  40. <div class="col-xs-12 col-sm-8">
  41. <div class="input-group margin-bottom-sm">
  42. <input type="text" class="form-control" id="schedule" style="font-size:12px;font-family: Verdana;word-spacing:23px;" name="row[schedule]" value="* * * * *" data-rule="required; remote(general/crontab/check_schedule)"/>
  43. <span class="input-group-btn">
  44. <a href="https://www.fastadmin.net/store/crontab.html" target="_blank" class="btn btn-default"><i class="fa fa-info-circle"></i> {:__('Crontab rules')}</a>
  45. </span>
  46. <span class="msg-box n-right"></span>
  47. </div>
  48. <div id="schedulepicker">
  49. <pre><code>* * * * *
  50. - - - - -
  51. | | | | +--- day of week (0 - 7) (Sunday=0 or 7)
  52. | | | +-------- month (1 - 12)
  53. | | +------------- day of month (1 - 31)
  54. | +------------------ hour (0 - 23)
  55. +----------------------- min (0 - 59)</code></pre>
  56. <h5>{:__('The next %s times the execution time', '<input type="number" id="pickdays" class="form-control text-center" value="7" style="display: inline-block;width:80px;">')}</h5>
  57. <ol id="scheduleresult" class="list-group">
  58. </ol>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label for="maximums" class="control-label col-xs-12 col-sm-2">{:__('Maximums')}:</label>
  64. <div class="col-xs-12 col-sm-4">
  65. <input type="number" class="form-control" id="maximums" name="row[maximums]" value="0" data-rule="required" size="6" data-tip="0表示无限制"/>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label for="begintime" class="control-label col-xs-12 col-sm-2">{:__('Begin time')}:</label>
  70. <div class="col-xs-12 col-sm-4">
  71. <input type="text" class="form-control datetimepicker" id="begintime" name="row[begintime]" value="" data-rule="{:__('Begin time')}:required" size="6"/>
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <label for="endtime" class="control-label col-xs-12 col-sm-2">{:__('End time')}:</label>
  76. <div class="col-xs-12 col-sm-4">
  77. <input type="text" class="form-control datetimepicker" id="endtime" name="row[endtime]" value="" data-rule="{:__('End time')}:required;match(gte, row[begintime], datetime)" size="6"/>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label for="weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
  82. <div class="col-xs-12 col-sm-4">
  83. <input type="text" class="form-control" id="weigh" name="row[weigh]" value="0" data-rule="required" size="6"/>
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
  88. <div class="col-xs-12 col-sm-8">
  89. {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
  90. </div>
  91. </div>
  92. <div class="form-group hide layer-footer">
  93. <label class="control-label col-xs-12 col-sm-2"></label>
  94. <div class="col-xs-12 col-sm-8">
  95. <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
  96. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  97. </div>
  98. </div>
  99. </form>