MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit fec5d02f authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil
Browse files

js/form_builder.js: input for information

parent c771a589
...@@ -124,12 +124,11 @@ FormBuilder.prototype.build_date = function(id, object, name, label) { ...@@ -124,12 +124,11 @@ FormBuilder.prototype.build_date = function(id, object, name, label) {
return d; return d;
} }
FormBuilder.prototype.build_info = function(object, keys) { FormBuilder.prototype.build_info = function(object, keys, label) {
var d = this.build_wrapper(); var d = this.build_wrapper();
var id = 'info'; var id = 'info';
var label = labelise(id);
var txt = this.build_textarea('info', "text", 'info', object, label); var txt = this.build_input('info', "text", 'info', 'text', object, label + ' information (#tags can be used)');
$(txt).data('needs-atwho', true); $(txt).data('needs-atwho', true);
$(txt).on('focus', function() { $(txt).on('focus', function() {
$(this).data('keys', keys); $(this).data('keys', keys);
...@@ -172,7 +171,7 @@ PatientFormBuilder.prototype.build = function(index) { ...@@ -172,7 +171,7 @@ PatientFormBuilder.prototype.build = function(index) {
div.appendChild(this.build_field('first_name', undefined, undefined, true)); div.appendChild(this.build_field('first_name', undefined, undefined, true));
div.appendChild(this.build_field('last_name', undefined, undefined, true)); div.appendChild(this.build_field('last_name', undefined, undefined, true));
div.appendChild(this.build_date('birth')); div.appendChild(this.build_date('birth'));
div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()])); div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()], 'patient'));
return div; return div;
}; };
...@@ -202,7 +201,7 @@ RunFormBuilder.prototype.build = function(index) { ...@@ -202,7 +201,7 @@ RunFormBuilder.prototype.build = function(index) {
div.appendChild(this.set_id()); div.appendChild(this.set_id());
div.appendChild(this.build_field('name', undefined, undefined, true)); div.appendChild(this.build_field('name', undefined, undefined, true));
div.appendChild(this.build_date('run_date', 'run_date', 'Date')); div.appendChild(this.build_date('run_date', 'run_date', 'Date'));
div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()])); div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()], 'run'));
div.appendChild(this.build_field('sequencer')); div.appendChild(this.build_field('sequencer'));
div.appendChild(this.build_field('pcr', 'pcr', 'PCR')); div.appendChild(this.build_field('pcr', 'pcr', 'PCR'));
return div; return div;
...@@ -232,7 +231,7 @@ GenericFormBuilder.prototype.build = function(index) { ...@@ -232,7 +231,7 @@ GenericFormBuilder.prototype.build = function(index) {
div.appendChild(this.build_input('id', 'text', 'id', 'hidden', this.type)); div.appendChild(this.build_input('id', 'text', 'id', 'hidden', this.type));
div.appendChild(this.build_input('sample_set_id', 'text', 'sample_set_id', 'hidden', this.type)); div.appendChild(this.build_input('sample_set_id', 'text', 'sample_set_id', 'hidden', this.type));
div.appendChild(this.build_field('name', undefined, undefined, true)); div.appendChild(this.build_field('name', undefined, undefined, true));
div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()])); div.appendChild(this.build_info(this.type, [$('#group_select option:selected').val()], 'set'));
return div; return div;
} }
...@@ -263,7 +262,7 @@ FileFormBuilder.prototype.build = function(index) { ...@@ -263,7 +262,7 @@ FileFormBuilder.prototype.build = function(index) {
div.appendChild(this.build_hidden_fields()); div.appendChild(this.build_hidden_fields());
div.appendChild(this.build_file_div()); div.appendChild(this.build_file_div());
div.appendChild(this.build_date('sampling_date', 'file')); div.appendChild(this.build_date('sampling_date', 'file'));
div.appendChild(this.build_info('file', this.group_ids)); div.appendChild(this.build_info('file', this.group_ids, 'sample'));
div.appendChild(this.build_set_div()); div.appendChild(this.build_set_div());
return div; return 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