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

Change selectbox by switch

parent 8bec6bcd
Pipeline #5298 passed with stages
in 11 minutes and 31 seconds
......@@ -20,7 +20,7 @@ install_dependencies:
- node_modules
policy: pull-push
script:
- yarn global add @angular/cli
- yarn global add @angular/cli@v11-lts
- yarn install
only:
refs:
......@@ -37,7 +37,7 @@ test:
script:
- apt-get update
- apt-get install -y --no-install-recommends firefox-esr
- yarn global add @angular/cli
- yarn global add @angular/cli@v11-lts
- ng test --no-watch --browsers FirefoxHeadlessCI --code-coverage
artifacts:
paths:
......@@ -76,7 +76,7 @@ build:
- node_modules
policy: pull
script:
- yarn global add @angular/cli
- yarn global add @angular/cli@v11-lts
- ng build --prod --base-href /admin/
artifacts:
paths:
......
......@@ -3,7 +3,7 @@ FROM node:15-slim
ENV DEBIAN_FRONTEND=noninteractive
# Yarn
RUN yarn global add @angular/cli
RUN yarn global add @angular/cli@v11-lts
RUN ng config -g cli.packageManager yarn
RUN ng config -g cli.warnings.versionMismatch false
......
.custom-switch label {
cursor: pointer;
}
\ No newline at end of file
......@@ -50,23 +50,15 @@
<label for="display">Display</label>
<input id="display" type="number" class="form-control" name="display" [ngModel]="model.display" required>
</div>
<div class="form-group">
<label for="count">Count</label>
<input id="count" type="number" class="form-control" name="count" [ngModel]="model.count">
</div>
<div class="form-check mb-2">
<input class="form-check-input" id="vo" type="checkbox" name="vo" [ngModel]="model.vo">
<label class="form-check-label" for="vo">VO format</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input" id="public" type="checkbox" name="public" [ngModel]="model.public">
<label class="form-check-label" for="public">Public</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" id="public" type="checkbox" name="public" [ngModel]="model.public">
<label class="custom-control-label" for="public">Public</label>
</div>
</accordion-group>
<accordion-group heading="Cone-search configuration" [isDisabled]="isConeSearchDisabled()">
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="cone_search" name="cone_search" [ngModel]="getConfigConeSearchEnabled()">
<label class="form-check-label" for="cone_search">Enabled</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="cone_search" name="cone_search" [ngModel]="getConfigConeSearchEnabled()">
<label class="custom-control-label" for="cone_search">Enabled</label>
</div>
<div class="form-group">
<div class="form-row">
......@@ -84,49 +76,49 @@
</div>
</div>
</div>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" id="plot_enabled" name="plot_enabled" [ngModel]="getConfigConeSearchCol('plot_enabled')" [disabled]="!ngForm.form.value.cone_search">
<label class="form-check-label" for="plot_enabled">Activate plot</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="plot_enabled" name="plot_enabled" [ngModel]="getConfigConeSearchCol('plot_enabled')" [disabled]="!ngForm.form.value.cone_search">
<label class="custom-control-label" for="plot_enabled">Activate plot</label>
</div>
</accordion-group>
<accordion-group heading="Page result configuration">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="results_server_link" name="results_server_link" [ngModel]="getConfig('results_server_link')">
<label class="form-check-label" for="results_server_link">Display server link to the results</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="results_server_link" name="results_server_link" [ngModel]="getConfig('results_server_link')">
<label class="custom-control-label" for="results_server_link">Display server link to the results</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="opened_datatable" name="opened_datatable" [ngModel]="getConfig('opened_datatable')">
<label class="form-check-label" for="opened_datatable">Open the results datatable accordion</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="opened_datatable" name="opened_datatable" [ngModel]="getConfig('opened_datatable')">
<label class="custom-control-label" for="opened_datatable">Open the results datatable accordion</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="selectable_row" name="selectable_row" [ngModel]="getConfig('selectable_row')">
<label class="form-check-label" for="selectable_row">Datatable rows selectable</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="selectable_row" name="selectable_row" [ngModel]="getConfig('selectable_row')">
<label class="custom-control-label" for="selectable_row">Datatable rows selectable</label>
</div>
</accordion-group>
<accordion-group heading="Search and data download">
<div class="form-check pt-3">
<input class="form-check-input" type="checkbox" id="download_result_csv" name="download_result_csv" [ngModel]="getConfigDownloadResultFormat('csv')">
<label class="form-check-label" for="download_result_csv">Display download results button in CSV format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_csv" name="download_result_csv" [ngModel]="getConfigDownloadResultFormat('csv')">
<label class="custom-control-label" for="download_result_csv">Display download results button in CSV format</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="download_result_ascii" name="download_result_ascii" [ngModel]="getConfigDownloadResultFormat('ascii')">
<label class="form-check-label" for="download_result_ascii">Display download results button in ASCII format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_ascii" name="download_result_ascii" [ngModel]="getConfigDownloadResultFormat('ascii')">
<label class="custom-control-label" for="download_result_ascii">Display download results button in ASCII format</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="download_result_spectra" name="download_result_spectra" [ngModel]="getConfigDownloadResultFormat('spectra')">
<label class="form-check-label" for="download_result_spectra">Display download results button in Spectra format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_spectra" name="download_result_spectra" [ngModel]="getConfigDownloadResultFormat('spectra')">
<label class="custom-control-label" for="download_result_spectra">Display download results button in Spectra format</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="download_result_stamp" name="download_result_stamp" [ngModel]="getConfigDownloadResultFormat('stamp')">
<label class="form-check-label" for="download_result_stamp">Display download results button in Stamp format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_stamp" name="download_result_stamp" [ngModel]="getConfigDownloadResultFormat('stamp')">
<label class="custom-control-label" for="download_result_stamp">Display download results button in Stamp format</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="download_result_vo" name="download_result_vo" [ngModel]="getConfigDownloadResultFormat('vo')">
<label class="form-check-label" for="download_result_vo">Display download results button in VO format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_vo" name="download_result_vo" [ngModel]="getConfigDownloadResultFormat('vo')">
<label class="custom-control-label" for="download_result_vo">Display download results button in VO format</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="download_result_fits" name="download_result_fits" [ngModel]="getConfigDownloadResultFormat('fits')">
<label class="form-check-label" for="download_result_fits">Display download results button in FITS format</label>
<div class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="download_result_fits" name="download_result_fits" [ngModel]="getConfigDownloadResultFormat('fits')">
<label class="custom-control-label" for="download_result_fits">Display download results button in FITS format</label>
</div>
</accordion-group>
</accordion>
......
......@@ -8,7 +8,8 @@ import { Dataset, Project, Attribute, DatasetFamily, FileInfo } from '../../stor
@Component({
selector: 'app-form-dataset',
templateUrl: 'form-dataset.component.html'
templateUrl: 'form-dataset.component.html',
styleUrls: ['form-dataset.component.css']
})
export class FormDatasetComponent {
@ViewChild(NgForm, {static: true}) ngForm: NgForm;
......
.custom-switch label {
cursor: pointer;
}
\ No newline at end of file
......@@ -15,34 +15,34 @@
</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 class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="authentication" name="authentication" [ngModel]="getConfig('authentication', 'allowed')">
<label class="custom-control-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 class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="search" name="search" [ngModel]="getConfig('search', 'allowed')">
<label class="custom-control-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 class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="search_multiple" name="search_multiple" [ngModel]="getConfig('search_multiple', 'allowed')">
<label class="custom-control-label" for="search_multiple">Search multiple allowed</label>
</div>
<div class="form-check mb-2">
<input class="form-check-input"
<div class="custom-control custom-switch">
<input class="custom-control-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>
<label class="custom-control-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 class="custom-control custom-switch">
<input class="custom-control-input" type="checkbox" id="documentation" name="documentation" [ngModel]="getConfig('documentation', 'allowed')">
<label class="custom-control-label" for="documentation">Documentation allowed</label>
</div>
</accordion-group>
</accordion>
......
......@@ -5,7 +5,8 @@ import { Instance } from '../../store/model';
@Component({
selector: 'app-form-instance',
templateUrl: 'form-instance.component.html'
templateUrl: 'form-instance.component.html',
styleUrls: ['form-instance.component.css']
})
export class FormInstanceComponent {
@ViewChild(NgForm, {static: true}) ngForm: NgForm;
......
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