blob: b628122650b01d99fc523d60e3dfd1bbe817cee1 [file] [log] [blame]
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<div class="ami-dialog" id="dialog-box">
<header class="dialog-header">
<h4 class="modal-title">Create image</h4>
<button type="button" class="close" (click)="dialogRef.close()">&times;</button>
</header>
<div class="dialog-content">
<div class="content-box" *ngIf="notebook">
<form [formGroup]="createAMIForm" novalidate>
<div class="control-group name">
<label class="label">Name</label>
<div class="control">
<input type="text" formControlName="name" placeholder="Enter image name">
<span class="error" *ngIf="createAMIForm.controls['name'].hasError('duplication')">This
image name already exists in project.</span>
<span class="error" *ngIf="createAMIForm.controls['name'].hasError('maxlength') && !createAMIForm.controls['name'].hasError('pattern')">Name cannot be longer than 10 characters.</span>
<span class="error"
*ngIf="createAMIForm.controls['name'].hasError('pattern')">
Name can contain only letters, numbers, hyphens and '_' but can not end with special characters.</span>
</div>
</div>
<div class="control-group">
<label class="label">Description</label>
<div class="control">
<textarea formControlName="description" placeholder="Leave description"></textarea>
</div>
</div>
</form>
<div class="text-center m-top-30 m-bott-10">
<button mat-raised-button type="button" class="butt action" (click)="dialogRef.close()">Cancel</button>
<button mat-raised-button type="button" [disabled]="!createAMIForm.valid"
(click)="assignChanges(createAMIForm.value)" class="butt butt-success action">Create</button>
</div>
</div>
</div>
</div>