mirror of https://github.com/portainer/portainer
88 lines
3.4 KiB
HTML
88 lines
3.4 KiB
HTML
<ng-form name="commonCustomTemplateForm">
|
|
<!-- title-input -->
|
|
<div class="form-group mb-0">
|
|
<label for="template_title" class="col-sm-3 col-lg-2 control-label required text-left"> Title </label>
|
|
<div class="col-sm-8">
|
|
<input
|
|
type="text"
|
|
class="form-control"
|
|
ng-model="$ctrl.formValues.Title"
|
|
ng-pattern="$ctrl.nameRegex"
|
|
id="template_title"
|
|
name="template_title"
|
|
placeholder="e.g. mytemplate"
|
|
auto-focus
|
|
required
|
|
/>
|
|
<span class="help-block">
|
|
<div ng-show="commonCustomTemplateForm.template_title.$invalid">
|
|
<div class="small text-warning mt-2">
|
|
<div ng-messages="commonCustomTemplateForm.template_title.$error">
|
|
<p class="vertical-center" ng-message="required"> <pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon> Title is required. </p>
|
|
<p class="vertical-center" ng-message="pattern">
|
|
<pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon>
|
|
{{ $ctrl.nameRegexError }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- !title-input -->
|
|
|
|
<!-- description-input -->
|
|
<div class="form-group mb-0">
|
|
<label for="description" class="col-sm-3 col-lg-2 control-label required text-left">Description</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" class="form-control" id="description" ng-model="$ctrl.formValues.Description" name="description" required />
|
|
<span class="help-block">
|
|
<div class="small text-warning mt-2">
|
|
<div ng-show="commonCustomTemplateForm.description.$invalid">
|
|
<div ng-messages="commonCustomTemplateForm.description.$error">
|
|
<p class="vertical-center" ng-message="required"> <pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon> Description is required.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- !description-input -->
|
|
|
|
<!-- note-input -->
|
|
<div class="form-group">
|
|
<label for="note" class="col-sm-3 col-lg-2 control-label text-left">Note</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" class="form-control" id="note" ng-model="$ctrl.formValues.Note" />
|
|
</div>
|
|
</div>
|
|
<!-- !note-input -->
|
|
|
|
<!-- icon-url-input -->
|
|
<div class="form-group">
|
|
<label for="icon-url" class="col-sm-3 col-lg-2 control-label text-left">Icon URL</label>
|
|
<div class="col-sm-8">
|
|
<input type="text" class="form-control" id="icon-url" ng-model="$ctrl.formValues.Logo" />
|
|
</div>
|
|
</div>
|
|
<!-- !icon-url-input -->
|
|
|
|
<!-- platform-input -->
|
|
<div ng-if="$ctrl.showPlatformField" class="form-group">
|
|
<label for="platform" class="col-sm-3 col-lg-2 control-label text-left">Platform</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" ng-model="$ctrl.formValues.Platform" ng-options="+(opt.value) as opt.label for opt in $ctrl.platformTypes"> </select>
|
|
</div>
|
|
</div>
|
|
<!-- !platform-input -->
|
|
|
|
<!-- platform-input -->
|
|
<div ng-if="$ctrl.showTypeField" class="form-group">
|
|
<label for="platform" class="col-sm-3 col-lg-2 control-label text-left">Type</label>
|
|
<div class="col-sm-8">
|
|
<select class="form-control" ng-model="$ctrl.formValues.Type" ng-options="+(opt.value) as opt.label for opt in $ctrl.templateTypes"> </select>
|
|
</div>
|
|
</div>
|
|
<!-- !platform-input -->
|
|
</ng-form>
|