blob: d448d3afc12638fe60bfb18251f50a4a51e685b3 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001{% load static %}
2
3<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
4<script>
5 $(document).ready(function (){
6 try {
7 newCustomImageModalInit();
8 } catch (e) {
9 document.write("Sorry, An error has occurred loading this page");
10 console.warn(e);
11 }
12 });
13</script>
14
Patrick Williamsc0f7c042017-02-23 20:41:17 -060015<div class="modal fade" id="new-custom-image-modal" aria-hidden="false">
16 <div class="modal-dialog">
17 <div class="modal-content">
18 <div class="modal-header">
19 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
20 <h3>New custom image</h3>
21 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023 <div class="modal-body">
24 <!--
25 this container is visible if there are multiple image recipes which could
26 be used as a basis for the new custom image; radio buttons are added to it
27 via newCustomImageModalSetRecipes() as required
28 -->
29 <div data-role="image-selector" style="display:none;">
30 <h4>Which image do you want to customise?</h4>
31 <span class="help-block text-danger" id="invalid-recipe-help" style="display:none"></span>
32 <div data-role="image-selector-radios"></div>
33 <div class="air"></div>
34 </div>
35
36 <h4>Name your custom image</h4>
37
38 <div class="row">
39 <div class="col-md-10">
40 <p class="help-block">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).
41 </p>
42 <div class="form-group">
43 <input type="text" class="form-control input-lg" placeholder="Type the custom image name" required>
44 </div>
45 <span class="help-block text-danger" id="invalid-name-help" style="display:none"></span>
46 </div>
47 </div>
48 </div>
49
50 <div class="modal-footer">
51 <button id="create-new-custom-image-btn" class="btn btn-primary btn-large" disabled>
52 <span data-role="submit-state">Create custom image</span>
53 <span data-role="loading-state" style="display:none">
54 <i class="fa-pulse icon-spinner"></i>&nbsp;Creating custom image...
55 </span>
56 </button>
57 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050058 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050059 </div>
60</div>