Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/take-new-snapshot.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2019 The Software Heritage developers | Copyright (C) 2019 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
{% endcomment %} | {% endcomment %} | ||||
{% load swh_templatetags %} | {% load swh_templatetags %} | ||||
{% if snapshot_context and snapshot_context.origin_info and snapshot_context.origin_info.type|origin_type_savable %} | {% if snapshot_context and snapshot_context.origin_info and snapshot_context.origin_info.type|origin_type_savable %} | ||||
{% if grecaptcha_activated %} | |||||
<script src="https://www.google.com/recaptcha/api.js"></script> | |||||
{% endif %} | |||||
<!-- entry in the Actions menu --> | <!-- entry in the Actions menu --> | ||||
<div class="dropdown-submenu"> | <div class="dropdown-submenu"> | ||||
<button class="dropdown-item" type="button" tabindex="-1" data-toggle="modal" data-target="#swh-take-new-snapshot-modal"> | <button class="dropdown-item" type="button" tabindex="-1" data-toggle="modal" data-target="#swh-take-new-snapshot-modal"> | ||||
<i class="fa fa-camera fa-fw" aria-hidden="true"></i>Take a new snapshot | <i class="fa fa-camera fa-fw" aria-hidden="true"></i>Take a new snapshot | ||||
</button> | </button> | ||||
</div> | </div> | ||||
<div class="modal fade" id="swh-take-new-snapshot-modal" tabindex="-1" role="dialog" aria-labelledby="swh-take-new-snapshot-modal-label" aria-hidden="true"> | <div class="modal fade" id="swh-take-new-snapshot-modal" tabindex="-1" role="dialog" aria-labelledby="swh-take-new-snapshot-modal-label" aria-hidden="true"> | ||||
Show All 22 Lines | <div class="modal-dialog"> | ||||
<label for="swh-input-origin-type">Origin type</label> | <label for="swh-input-origin-type">Origin type</label> | ||||
<input id="swh-input-origin-type" class="form-control" value="{{ snapshot_context.origin_info.type }}" disabled> | <input id="swh-input-origin-type" class="form-control" value="{{ snapshot_context.origin_info.type }}" disabled> | ||||
</div> | </div> | ||||
<div class="form-group col-md-9"> | <div class="form-group col-md-9"> | ||||
<label for="swh-input-origin-url">Origin url</label> | <label for="swh-input-origin-url">Origin url</label> | ||||
<input type="text" class="form-control" id="swh-input-origin-url" value="{{ snapshot_context.origin_info.url }}" disabled> | <input type="text" class="form-control" id="swh-input-origin-url" value="{{ snapshot_context.origin_info.url }}" disabled> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="form-row"> | <div class="form-row"> | ||||
{% if grecaptcha_activated %} | |||||
<div class="form-group col-md-6"> | <div class="form-group col-md-6"> | ||||
<div class="g-recaptcha" id="swh-take-new-snapshot-recaptcha" data-sitekey="{{ grecaptcha_site_key }}"></div> | <div class="g-recaptcha" id="swh-take-new-snapshot-recaptcha" data-sitekey="{{ grecaptcha_site_key }}"></div> | ||||
</div> | </div> | ||||
<div class="col-md-3"></div> | <div class="col-md-3"></div> | ||||
<div class="form-group col-md-3"> | <div class="form-group col-md-3"> | ||||
<label for="swh-take-new-snapshot-submit">​</label> | <label for="swh-take-new-snapshot-submit">​</label> | ||||
<button type="submit" id="swh-take-new-snapshot-save-submit" class="btn btn-default btn-block">Submit</button> | <button type="submit" id="swh-take-new-snapshot-save-submit" class="btn btn-default btn-block">Submit</button> | ||||
</div> | </div> | ||||
{% else %} | |||||
<div class="col-md-4"></div> | |||||
<div class="col-md-4 form-group"> | |||||
<label for="swh-take-new-snapshot-submit">​</label> | |||||
<button type="submit" id="swh-take-new-snapshot-save-submit" class="btn btn-default btn-block">Submit</button> | |||||
</div> | |||||
<div class="col-md-4"></div> | |||||
{% endif %} | |||||
</div> | </div> | ||||
</form> | </form> | ||||
<div id="swh-take-new-snapshot-request-status"> | <div id="swh-take-new-snapshot-request-status"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<script> | <script> | ||||
swh.browse.initTakeNewSnapshot(); | swh.browse.initTakeNewSnapshot(); | ||||
</script> | </script> | ||||
{% endif %} | {% endif %} | ||||
No newline at end of file | No newline at end of file |