mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 02:03:04 +01:00
Creating a custom image through the "New custom image" dialog can sometimes result in a long pause between pressing the button to create the image, and being transferred to the page showing details of its content. This can make it appear as though pressing the button had no effect. To prevent this from happening, disable the button and text box in the new custom image dialog after the "Create image" button is pressed. Also show a loading spinner and "loading..." text on the button to make it clear that the application is still responding. [YOCTO #9475] (Bitbake rev: dd8bede91e08c0b64b949ca98c74e6144da88fd1) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
{% load static %}
|
||
|
||
<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
|
||
<script>
|
||
$(document).ready(function (){
|
||
try {
|
||
newCustomImageModalInit();
|
||
} catch (e) {
|
||
document.write("Sorry, An error has occurred loading this page");
|
||
console.warn(e);
|
||
}
|
||
});
|
||
</script>
|
||
|
||
<div class="modal fade" id="new-custom-image-modal" aria-hidden="false">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h3>New custom image</h3>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<!--
|
||
this container is visible if there are multiple image recipes which could
|
||
be used as a basis for the new custom image; radio buttons are added to it
|
||
via newCustomImageModalSetRecipes() as required
|
||
-->
|
||
<div data-role="image-selector" style="display:none;">
|
||
<h4>Which image do you want to customise?</h4>
|
||
<span class="help-block text-danger" id="invalid-recipe-help" style="display:none"></span>
|
||
<div data-role="image-selector-radios"></div>
|
||
<div class="air"></div>
|
||
</div>
|
||
|
||
<h4>Name your custom image</h4>
|
||
|
||
<div class="row">
|
||
<div class="col-md-10">
|
||
<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 (-).
|
||
</p>
|
||
<div class="form-group">
|
||
<input type="text" class="form-control input-lg" placeholder="Type the custom image name" required>
|
||
</div>
|
||
<span class="help-block text-danger" id="invalid-name-help" style="display:none"></span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<button id="create-new-custom-image-btn" class="btn btn-primary btn-large" disabled>
|
||
<span data-role="submit-state">Create custom image</span>
|
||
<span data-role="loading-state" style="display:none">
|
||
<i class="fa-pulse icon-spinner"></i> Creating custom image...
|
||
</span>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|