Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | {% extends 'edit.twig' %} |
| 2 | |
| 3 | {% block inner_content %} |
| 4 | {% if result %} |
| 5 | <h4>{{ lang.edit.syncjob }}</h4> |
| 6 | <form class="form-horizontal" data-id="editsyncjob" role="form" method="post"> |
| 7 | <input type="hidden" value="0" name="delete2duplicates"> |
| 8 | <input type="hidden" value="0" name="delete1"> |
| 9 | <input type="hidden" value="0" name="delete2"> |
| 10 | <input type="hidden" value="0" name="automap"> |
| 11 | <input type="hidden" value="0" name="skipcrossduplicates"> |
| 12 | <input type="hidden" value="0" name="active"> |
| 13 | <input type="hidden" value="0" name="subscribeall"> |
| 14 | <div class="form-group"> |
| 15 | <label class="control-label col-sm-2" for="host1">{{ lang.edit.hostname }}</label> |
| 16 | <div class="col-sm-10"> |
| 17 | <input type="text" class="form-control" name="host1" id="host1" value="{{ result.host1 }}"> |
| 18 | </div> |
| 19 | </div> |
| 20 | <div class="form-group"> |
| 21 | <label class="control-label col-sm-2" for="port1">Port</label> |
| 22 | <div class="col-sm-10"> |
| 23 | <input type="number" class="form-control" name="port1" id="port1" min="1" max="65535" value="{{ result.port1 }}"> |
| 24 | </div> |
| 25 | </div> |
| 26 | <div class="form-group"> |
| 27 | <label class="control-label col-sm-2" for="user1">{{ lang.edit.username }}</label> |
| 28 | <div class="col-sm-10"> |
| 29 | <input type="text" class="form-control" name="user1" id="user1" value="{{ result.user1 }}"> |
| 30 | </div> |
| 31 | </div> |
| 32 | <div class="form-group"> |
| 33 | <label class="control-label col-sm-2" for="password1">{{ lang.edit.password }}</label> |
| 34 | <div class="col-sm-10"> |
| 35 | <input type="password" class="form-control" name="password1" id="password1" value="{{ result.password1 }}"> |
| 36 | </div> |
| 37 | </div> |
| 38 | <div class="form-group"> |
| 39 | <label class="control-label col-sm-2" for="enc1">{{ lang.edit.encryption }}</label> |
| 40 | <div class="col-sm-10"> |
| 41 | <select id="enc1" name="enc1"> |
| 42 | <option value="SSL"{% if result.enc1 == 'SSL' %} selected{% endif %}>SSL</option> |
| 43 | <option value="TLS"{% if result.enc1 == 'TLS' %} selected{% endif %}>STARTTLS</option> |
| 44 | <option value="PLAIN"{% if result.enc1 == 'PLAIN' %} selected{% endif %}>PLAIN</option> |
| 45 | </select> |
| 46 | </div> |
| 47 | </div> |
| 48 | <div class="form-group"> |
| 49 | <label class="control-label col-sm-2" for="mins_interval">{{ lang.edit.mins_interval }}</label> |
| 50 | <div class="col-sm-10"> |
| 51 | <input type="number" class="form-control" name="mins_interval" min="1" max="43800" value="{{ result.mins_interval }}" required> |
| 52 | <small class="help-block">1-43800</small> |
| 53 | </div> |
| 54 | </div> |
| 55 | <div class="form-group"> |
| 56 | <label class="control-label col-sm-2" for="subfolder2">{{ lang.edit.subfolder2|raw }}</label> |
| 57 | <div class="col-sm-10"> |
| 58 | <input type="text" class="form-control" name="subfolder2" id="subfolder2" value="{{ result.subfolder2 }}"> |
| 59 | </div> |
| 60 | </div> |
| 61 | <div class="form-group"> |
| 62 | <label class="control-label col-sm-2" for="maxage">{{ lang.edit.maxage|raw }}</label> |
| 63 | <div class="col-sm-10"> |
| 64 | <input type="number" class="form-control" name="maxage" id="maxage" min="0" max="32000" value="{{ result.maxage }}"> |
| 65 | <small class="help-block">0-32000</small> |
| 66 | </div> |
| 67 | </div> |
| 68 | <div class="form-group"> |
| 69 | <label class="control-label col-sm-2" for="maxbytespersecond">{{ lang.edit.maxbytespersecond|raw }}</label> |
| 70 | <div class="col-sm-10"> |
| 71 | <input type="number" class="form-control" name="maxbytespersecond" id="maxbytespersecond" min="0" max="125000000" value="{{ result.maxbytespersecond }}"> |
| 72 | <small class="help-block">0-125000000</small> |
| 73 | </div> |
| 74 | </div> |
| 75 | <div class="form-group"> |
| 76 | <label class="control-label col-sm-2" for="timeout1">{{ lang.add.timeout1 }}</label> |
| 77 | <div class="col-sm-10"> |
| 78 | <input type="number" class="form-control" name="timeout1" id="timeout1" min="1" max="32000" value="{{ result.timeout1 }}"> |
| 79 | <small class="help-block">1-32000</small> |
| 80 | </div> |
| 81 | </div> |
| 82 | <div class="form-group"> |
| 83 | <label class="control-label col-sm-2" for="timeout2">{{ lang.add.timeout2 }}</label> |
| 84 | <div class="col-sm-10"> |
| 85 | <input type="number" class="form-control" name="timeout2" id="timeout2" min="1" max="32000" value="{{ result.timeout2 }}"> |
| 86 | <small class="help-block">1-32000</small> |
| 87 | </div> |
| 88 | </div> |
| 89 | <div class="form-group"> |
| 90 | <label class="control-label col-sm-2" for="exclude">{{ lang.edit.exclude }}</label> |
| 91 | <div class="col-sm-10"> |
| 92 | <input type="text" class="form-control" name="exclude" id="exclude" value="{{ result.exclude }}"> |
| 93 | </div> |
| 94 | </div> |
| 95 | <div class="form-group"> |
| 96 | <label class="control-label col-sm-2" for="custom_params">{{ lang.add.custom_params }}</label> |
| 97 | <div class="col-sm-10"> |
| 98 | <input type="text" class="form-control" name="custom_params" id="custom_params" value="{{ result.custom_params }}" placeholder="--dry --some-param=xy --other-param=yx"> |
| 99 | <small class="help-block">{{ lang.add.custom_params_hint }}</small> |
| 100 | </div> |
| 101 | </div> |
| 102 | <div class="form-group"> |
| 103 | <div class="col-sm-offset-2 col-sm-10"> |
| 104 | <div class="checkbox"> |
| 105 | <label><input type="checkbox" value="1" name="delete2duplicates"{% if result.delete2duplicates == '1' %} checked{% endif %}> {{ lang.edit.delete2duplicates }} (--delete2duplicates)</label> |
| 106 | </div> |
| 107 | </div> |
| 108 | </div> |
| 109 | <div class="form-group"> |
| 110 | <div class="col-sm-offset-2 col-sm-10"> |
| 111 | <div class="checkbox"> |
| 112 | <label><input type="checkbox" value="1" name="delete1"{% if result.delete1 == '1' %} checked{% endif %}> {{ lang.edit.delete1 }} (--delete1)</label> |
| 113 | </div> |
| 114 | </div> |
| 115 | </div> |
| 116 | <div class="form-group"> |
| 117 | <div class="col-sm-offset-2 col-sm-10"> |
| 118 | <div class="checkbox"> |
| 119 | <label><input type="checkbox" value="1" name="delete2"{% if result.delete2 == '1' %} checked{% endif %}> {{ lang.edit.delete2 }} (--delete2)</label> |
| 120 | </div> |
| 121 | </div> |
| 122 | </div> |
| 123 | <div class="form-group"> |
| 124 | <div class="col-sm-offset-2 col-sm-10"> |
| 125 | <div class="checkbox"> |
| 126 | <label><input type="checkbox" value="1" name="automap"{% if result.automap == '1' %} checked{% endif %}> {{ lang.edit.automap }} (--automap)</label> |
| 127 | </div> |
| 128 | </div> |
| 129 | </div> |
| 130 | <div class="form-group"> |
| 131 | <div class="col-sm-offset-2 col-sm-10"> |
| 132 | <div class="checkbox"> |
| 133 | <label><input type="checkbox" value="1" name="skipcrossduplicates"{% if result.skipcrossduplicates == '1' %} checked{% endif %}> {{ lang.edit.skipcrossduplicates }} (--skipcrossduplicates)</label> |
| 134 | </div> |
| 135 | </div> |
| 136 | </div> |
| 137 | <div class="form-group"> |
| 138 | <div class="col-sm-offset-2 col-sm-10"> |
| 139 | <div class="checkbox"> |
| 140 | <label><input type="checkbox" value="1" name="subscribeall"{% if result.subscribeall == '1' %} checked{% endif %}> {{ lang.add.subscribeall }} (--subscribeall)</label> |
| 141 | </div> |
| 142 | </div> |
| 143 | </div> |
| 144 | <div class="form-group"> |
| 145 | <div class="col-sm-offset-2 col-sm-10"> |
| 146 | <div class="checkbox"> |
| 147 | <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label> |
| 148 | </div> |
| 149 | </div> |
| 150 | </div> |
| 151 | <div class="form-group"> |
| 152 | <div class="col-sm-offset-2 col-sm-10"> |
| 153 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="edit_selected" data-id="editsyncjob" data-item="{{ result.id }}" data-api-url='edit/syncjob' data-api-attr='{}' href="#">{{ lang.edit.save }}</button> |
| 154 | </div> |
| 155 | </div> |
| 156 | </form> |
| 157 | {% else %} |
| 158 | {{ parent() }} |
| 159 | {% endif %} |
| 160 | {% endblock %} |