mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.3 KiB
32 lines
1.3 KiB
<div class="title">
|
|
<form *ngIf="renaming; else noRenaming" [formGroup]="renameForm" (ngSubmit)="rename()">
|
|
<div class="row no-gutters">
|
|
<div class="col">
|
|
<div class="form-group mr-2">
|
|
<sqx-control-errors for="name"></sqx-control-errors>
|
|
|
|
<input type="text" class="form-control form-underlined" formControlName="name" [maxLength]="maxLength" sqxFocusOnInit (keydown)="onKeyDown($event.keyCode)" spellcheck="false">
|
|
</div>
|
|
</div>
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-primary mr-1" [disabled]="!renameForm.valid || !renameForm.dirty">
|
|
{{ 'common.save' | sqxTranslate }}
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-text-secondary btn-cancel mr-4" (click)="toggleRename()">
|
|
<i class="icon-close"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<ng-template #noRenaming>
|
|
<div class="title-view">
|
|
<h3 class="title-name" [class.fallback]="!name" (dblclick)="toggleRename()">
|
|
{{name || fallback}}
|
|
</h3>
|
|
|
|
<i class="title-edit icon-pencil" *ngIf="!disabled" (click)="toggleRename()"></i>
|
|
</div>
|
|
</ng-template>
|
|
</div>
|