Commit 8e6fb10b authored by François Agneray's avatar François Agneray
Browse files

Add accordion display for instance form

parent 180c0507
Pipeline #4929 passed with stages
in 10 minutes and 39 seconds
<form name="form" (ngSubmit)="f.form.valid && emit(f.form.value)" #f="ngForm" novalidate>
<div class="form-group">
<label for="name">Name</label>
<input id="name" type="text" class="form-control" name="name" [ngModel]="model.name" #name="ngModel" [disabled]="model.name" required>
</div>
<div class="form-group">
<label for="label">Label</label>
<input id="label" type="text" class="form-control" name="label" [ngModel]="model.label" #label="ngModel" required>
</div>
<div class="form-group">
<label for="client_url">Client URL</label>
<input id="client_url" type="text" class="form-control" name="client_url" [ngModel]="model.client_url" #clientUrl="ngModel">
</div>
<hr class="mt-4">
<h4>Authentication: </h4>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="authentication" name="authentication" [ngModel]="getConfig('authentication', 'allowed')">
<label class="form-check-label" for="authentication">User authentication available</label>
</div>
<hr>
<h4>Search: </h4>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="search" name="search" [ngModel]="getConfig('search', 'allowed')">
<label class="form-check-label" for="search">Classic search allowed</label>
</div>
<hr>
<h4>Search multiple: </h4>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="search_multiple" name="search_multiple" [ngModel]="getConfig('search_multiple', 'allowed')">
<label class="form-check-label" for="search_multiple">Search multiple allowed</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input"
type="checkbox"
id="all_datasets_selected"
name="all_datasets_selected"
[disabled]="!ngForm.form.value.search_multiple"
[ngModel]="getConfig('search_multiple', 'all_datasets_selected')">
<label class="form-check-label" for="all_datasets_selected">All datasets with cone search enabled selected by default</label>
</div>
<hr>
<h4>Documentation: </h4>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="documentation" name="documentation" [ngModel]="getConfig('documentation', 'allowed')">
<label class="form-check-label" for="documentation">Documentation allowed</label>
</div>
<accordion [isAnimated]="true">
<accordion-group heading="General information" [isOpen]="'true'">
<div class="form-group">
<label for="name">Name</label>
<input id="name" type="text" class="form-control" name="name" [ngModel]="model.name" #name="ngModel" [disabled]="model.name" required>
</div>
<div class="form-group">
<label for="label">Label</label>
<input id="label" type="text" class="form-control" name="label" [ngModel]="model.label" #label="ngModel" required>
</div>
<div class="form-group">
<label for="client_url">Client URL</label>
<input id="client_url" type="text" class="form-control" name="client_url" [ngModel]="model.client_url" #clientUrl="ngModel">
</div>
</accordion-group>
<accordion-group heading="Authentication">
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="authentication" name="authentication" [ngModel]="getConfig('authentication', 'allowed')">
<label class="form-check-label" for="authentication">User authentication available</label>
</div>
</accordion-group>
<accordion-group heading="Search">
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="search" name="search" [ngModel]="getConfig('search', 'allowed')">
<label class="form-check-label" for="search">Classic search allowed</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="search_multiple" name="search_multiple" [ngModel]="getConfig('search_multiple', 'allowed')">
<label class="form-check-label" for="search_multiple">Search multiple allowed</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input"
type="checkbox"
id="all_datasets_selected"
name="all_datasets_selected"
[disabled]="!ngForm.form.value.search_multiple"
[ngModel]="getConfig('search_multiple', 'all_datasets_selected')">
<label class="form-check-label" for="all_datasets_selected">All datasets with cone search enabled selected by default</label>
</div>
</accordion-group>
<accordion-group heading="Documentation">
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="documentation" name="documentation" [ngModel]="getConfig('documentation', 'allowed')">
<label class="form-check-label" for="documentation">Documentation allowed</label>
</div>
</accordion-group>
</accordion>
<div class="form-group pt-4">
<ng-content></ng-content>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment