xref: /OK3568_Linux_fs/yocto/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun{% load static %}
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
4*4882a593Smuzhiyun<script>
5*4882a593Smuzhiyun  $(document).ready(function (){
6*4882a593Smuzhiyun    try {
7*4882a593Smuzhiyun      newCustomImageModalInit();
8*4882a593Smuzhiyun    } catch (e) {
9*4882a593Smuzhiyun      document.write("Sorry, An error has occurred loading this page");
10*4882a593Smuzhiyun      console.warn(e);
11*4882a593Smuzhiyun    }
12*4882a593Smuzhiyun  });
13*4882a593Smuzhiyun</script>
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun<div class="modal fade" id="new-custom-image-modal" aria-hidden="false">
16*4882a593Smuzhiyun  <div class="modal-dialog">
17*4882a593Smuzhiyun    <div class="modal-content">
18*4882a593Smuzhiyun      <div class="modal-header">
19*4882a593Smuzhiyun        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
20*4882a593Smuzhiyun        <h3>New custom image</h3>
21*4882a593Smuzhiyun      </div>
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun      <div class="modal-body">
24*4882a593Smuzhiyun        <!--
25*4882a593Smuzhiyun          this container is visible if there are multiple image recipes which could
26*4882a593Smuzhiyun          be used as a basis for the new custom image; radio buttons are added to it
27*4882a593Smuzhiyun          via newCustomImageModalSetRecipes() as required
28*4882a593Smuzhiyun        -->
29*4882a593Smuzhiyun        <div data-role="image-selector" style="display:none;">
30*4882a593Smuzhiyun          <h4>Which image do you want to customise?</h4>
31*4882a593Smuzhiyun          <span class="help-block text-danger" id="invalid-recipe-help" style="display:none"></span>
32*4882a593Smuzhiyun          <div data-role="image-selector-radios"></div>
33*4882a593Smuzhiyun          <div class="air"></div>
34*4882a593Smuzhiyun        </div>
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun        <h4>Name your custom image</h4>
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun        <div class="row">
39*4882a593Smuzhiyun          <div class="col-md-10">
40*4882a593Smuzhiyun            <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*4882a593Smuzhiyun            </p>
42*4882a593Smuzhiyun            <div class="form-group">
43*4882a593Smuzhiyun              <input type="text" class="form-control input-lg" placeholder="Type the custom image name" required>
44*4882a593Smuzhiyun            </div>
45*4882a593Smuzhiyun            <span class="help-block text-danger" id="invalid-name-help" style="display:none"></span>
46*4882a593Smuzhiyun          </div>
47*4882a593Smuzhiyun        </div>
48*4882a593Smuzhiyun      </div>
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun      <div class="modal-footer">
51*4882a593Smuzhiyun        <button id="create-new-custom-image-btn" class="btn btn-primary btn-large" disabled>
52*4882a593Smuzhiyun          <span data-role="submit-state">Create custom image</span>
53*4882a593Smuzhiyun          <span data-role="loading-state" style="display:none">
54*4882a593Smuzhiyun            <i class="fa-pulse icon-spinner"></i>&nbsp;Creating custom image...
55*4882a593Smuzhiyun          </span>
56*4882a593Smuzhiyun        </button>
57*4882a593Smuzhiyun      </div>
58*4882a593Smuzhiyun    </div>
59*4882a593Smuzhiyun  </div>
60*4882a593Smuzhiyun</div>
61