From 45d9e25135983a1558e99cb9d4645560d6b07ff1 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:22:31 +0700 Subject: [PATCH 01/11] feat: file admin form fills more space --- less/modules/buttons.less | 8 +++ less/modules/forms.less | 4 ++ protected/views/adminFile/_form.php | 81 +++++++++++++++++++++-------- 3 files changed, 70 insertions(+), 23 deletions(-) diff --git a/less/modules/buttons.less b/less/modules/buttons.less index 036f828bd0..b16c7641f0 100644 --- a/less/modules/buttons.less +++ b/less/modules/buttons.less @@ -42,6 +42,14 @@ } } +.btn-min-width { + min-width: 120px; + display: flex; + justify-content: center; + align-items: center; +} + + .danger-btn { color: @color-true-white; background-color: @color-brand-danger-650; diff --git a/less/modules/forms.less b/less/modules/forms.less index ba55ce8ef0..80db4b11d9 100644 --- a/less/modules/forms.less +++ b/less/modules/forms.less @@ -30,6 +30,10 @@ input:not([type="submit"]):not([type="button"]), select, textarea, .form-control } } +textarea.form-control { + resize: vertical; +} + // Base checkbox styles input[type="checkbox"] { width: auto; diff --git a/protected/views/adminFile/_form.php b/protected/views/adminFile/_form.php index 6d170aefac..c25c1af51c 100644 --- a/protected/views/adminFile/_form.php +++ b/protected/views/adminFile/_form.php @@ -1,15 +1,18 @@ -
+
-
+
beginWidget('CActiveForm', array( 'id' => 'file-form', 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] )); ?> -

Fields with * are required.

+

Fields with * are required.

hasErrors()) : ?> -
+
errorSummary($model); ?>
@@ -25,6 +28,9 @@ 'valueField' => 'id', 'textField' => 'identifier', ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], 'inputOptions' => [ 'required' => true, ], @@ -34,6 +40,9 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'name', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], 'inputOptions' => [ 'required' => true, 'maxlength' => 100 @@ -44,6 +53,9 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'location', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], 'inputOptions' => [ 'required' => true, 'maxlength' => 200 @@ -54,6 +66,9 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'extension', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], 'inputOptions' => [ 'required' => true, 'maxlength' => 30 @@ -64,31 +79,43 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'size', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], 'inputOptions' => [ 'required' => true, ], 'tooltip' => 'The size of file on disk in bytes' ]); + $this->widget('application.components.controls.DateField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'date_stamp', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + 'tooltip' => 'The date the file is made publicly available, usually the same as the dataset release date. Format: yyyy-mm-dd' + ]); $this->widget('application.components.controls.TextArea', [ 'form' => $form, 'model' => $model, 'attributeName' => 'description', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], 'inputOptions' => [ 'rows' => 6, 'cols' => 50 ], 'tooltip' => 'The description of the files content' ]); - $this->widget('application.components.controls.DateField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'date_stamp', - 'tooltip' => 'The date the file is made publicly available, usually the same as the dataset release date. Format: yyyy-mm-dd' - ]); $this->widget('application.components.controls.DropdownField', [ 'form' => $form, 'model' => $model, 'attributeName' => 'format_id', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], 'listDataOptions' => [ 'data' => FileFormat::model()->findAll(), 'valueField' => 'id', @@ -100,6 +127,9 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'type_id', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], 'listDataOptions' => [ 'data' => FileType::model()->findAll(), 'valueField' => 'id', @@ -111,33 +141,36 @@ 'form' => $form, 'model' => $model, 'attributeName' => 'sample_name', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], 'tooltip' => 'If the file is directly and solely related to a single Sample entity named in GigaDB, a link to that sample can be added here by entering the exact name of the sample' ]); ?> isNewRecord) { ?> -
+
fileAttributes) { ?> - - - - + + + + fileAttributes as $fa) { ?> - -
Attributes
Attribute NameValueUnitActionsAttribute NameValueUnitActions
+ attribute->attribute_name ?> value ?> + unit ? $fa->unit->name : '' ?> @@ -155,7 +188,7 @@
-
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
endWidget(); ?> From 6945bc1c6c6f95a5df24568547850af5fb20afa2 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:35:22 +0700 Subject: [PATCH 02/11] feat: updates admin sample form --- protected/views/adminSample/_form.php | 45 ++++++++++++++++++--------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/protected/views/adminSample/_form.php b/protected/views/adminSample/_form.php index 0f608b9660..7da3e12146 100644 --- a/protected/views/adminSample/_form.php +++ b/protected/views/adminSample/_form.php @@ -1,11 +1,13 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'sample-form', - 'enableAjaxValidation' => false, - )); ?> +
+ beginWidget('CActiveForm', array( + 'id' => 'sample-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> +

Fields with * are required.

hasErrors()) : ?> @@ -13,7 +15,9 @@ errorSummary($model); ?>
+
+
labelEx($model, 'species_id', array('class' => 'control-label')); ?> error($model, 'species_id'); ?>
+
+
attributesList = $model->attributesList ? $model->attributesList : $model->getAttributesList(true); // this sets the default text content of the textarea - $this->widget('application.components.controls.TextArea', [ + $this->widget('application.components.controls.TextField', [ 'form' => $form, 'model' => $model, - 'attributeName' => 'attributesList', + 'attributeName' => 'name', + 'inputOptions' => [ + 'maxlength' => 50 + ], ]); + ?> +
- $this->widget('application.components.controls.TextField', [ +
+ attributesList = $model->attributesList ? $model->attributesList : $model->getAttributesList(true); + $this->widget('application.components.controls.TextArea', [ 'form' => $form, 'model' => $model, - 'attributeName' => 'name', + 'attributeName' => 'attributesList', 'inputOptions' => [ - 'maxlength' => 50 + 'rows' => 6, + 'cols' => 50 ], ]); ?> +
+
Cancel isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?>
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file From 2cea6567ac745bd562e5d999800b56c3b5b6cf86 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:44:27 +0700 Subject: [PATCH 03/11] feat: update admin author and admin sample forms --- protected/views/adminAuthor/_form.php | 134 +++++++++++++--------- protected/views/adminSample/_form.php | 154 +++++++++++++------------- 2 files changed, 157 insertions(+), 131 deletions(-) diff --git a/protected/views/adminAuthor/_form.php b/protected/views/adminAuthor/_form.php index 8cd304bf3e..8ac85cf20a 100644 --- a/protected/views/adminAuthor/_form.php +++ b/protected/views/adminAuthor/_form.php @@ -1,18 +1,19 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'author-form', + 'enableAjaxValidation' => false, + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'author-form', - 'enableAjaxValidation' => false, - )); ?> +
+
+

Fields with * are required.

-

Fields with * are required.

- - hasErrors()) : ?> -
- errorSummary($model); ?> -
- + hasErrors()) : ?> +
+ errorSummary($model); ?> +
+ +
widget('application.components.controls.TextField', [ @@ -23,6 +24,9 @@ 'required' => true, 'maxlength' => 255 ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], ]); $this->widget('application.components.controls.TextField', [ @@ -32,7 +36,11 @@ 'inputOptions' => [ 'maxlength' => 255 ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], ]); + $this->widget('application.components.controls.TextField', [ 'form' => $form, 'model' => $model, @@ -40,7 +48,11 @@ 'inputOptions' => [ 'maxlength' => 255 ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], ]); + $this->widget('application.components.controls.TextField', [ 'form' => $form, 'model' => $model, @@ -48,7 +60,11 @@ 'inputOptions' => [ 'maxlength' => 255 ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], ]); + $this->widget('application.components.controls.TextField', [ 'form' => $form, 'model' => $model, @@ -56,7 +72,11 @@ 'inputOptions' => [ 'maxlength' => 128 ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], ]); + $this->widget('application.components.controls.TextField', [ 'form' => $form, 'model' => $model, @@ -64,55 +84,59 @@ 'inputOptions' => [ 'maxlength' => 128 ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], ]); ?> -
- getIdenticalAuthors(); - if (!empty($identical_authors)) { - ?> -
- this author is merged with author(s): -
    - findByPk($author_id); - echo "
  • " . $author->getAuthorDetails() . "
  • "; - } - ?> -
- -
- - +
+
+ getIdenticalAuthors(); + if (!empty($identical_authors)) { + ?> +
+ this author is merged with author(s): +
    + findByPk($author_id); + echo "
  • " . $author->getAuthorDetails() . "
  • "; + } + ?> +
+
+ - $model->id), - array('class' => 'btn btn-link') - ); - } - ?> + $model->id), + array('class' => 'btn btn-link') + ); + } + ?> +
-
- id) { - echo CHtml::link( - 'Merge with an author', - array('adminAuthor/prepareAuthorMerge', 'origin_author_id' => $model->id), - array('class' => 'btn background-btn-o') - ); - } - ?> - Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> +
+
+ id) { + echo CHtml::link( + 'Merge with an author', + array('adminAuthor/prepareAuthorMerge', 'origin_author_id' => $model->id), + array('class' => 'btn background-btn-o btn-min-width') + ); + } + ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminSample/_form.php b/protected/views/adminSample/_form.php index 7da3e12146..4cb4c417f7 100644 --- a/protected/views/adminSample/_form.php +++ b/protected/views/adminSample/_form.php @@ -1,89 +1,91 @@
- beginWidget('CActiveForm', array( - 'id' => 'sample-form', - 'enableAjaxValidation' => false, - 'htmlOptions' => [ - 'class' => 'row' - ] - )); ?> + beginWidget('CActiveForm', array( + 'id' => 'sample-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
-

Fields with * are required.

+
+

Fields with * are required.

- hasErrors()) : ?> -
- errorSummary($model); ?> -
- -
+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
-
-
- labelEx($model, 'species_id', array('class' => 'control-label')); ?> - select = 't.id, t.common_name'; - $criteria->limit = 100; +
+
+ labelEx($model, 'species_id', array('class' => 'control-label')); ?> + select = 't.id, t.common_name'; + $criteria->limit = 100; - $this->widget('zii.widgets.jui.CJuiAutoComplete', array( - 'name' => 'name', - 'model' => $model, - 'attribute' => 'species_id', - 'source' => $this->createUrl('/adminDatasetSample/autocomplete'), - 'options' => array( - 'minLength' => '2', - ), - 'htmlOptions' => array( - 'aria-describedby' => $form->error($model, 'species_id') ? 'species_id-desc' : '', - 'required' => true, - 'aria-required' => 'true', - 'class' => 'form-control', - 'placeholder' => 'name', - 'size' => 'auto', - ), - )); - ?> + $this->widget('zii.widgets.jui.CJuiAutoComplete', array( + 'name' => 'name', + 'model' => $model, + 'attribute' => 'species_id', + 'source' => $this->createUrl('/adminDatasetSample/autocomplete'), + 'options' => array( + 'minLength' => '2', + ), + 'htmlOptions' => array( + 'aria-describedby' => $form->error($model, 'species_id') ? 'species_id-desc' : '', + 'required' => true, + 'aria-required' => 'true', + 'class' => 'form-control', + 'placeholder' => 'name', + 'size' => 'auto', + ), + )); + ?> - -
+
+
-
- widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'maxlength' => 50 - ], - ]); - ?> -
+ widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'maxlength' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ] + ]); + ?> -
- attributesList = $model->attributesList ? $model->attributesList : $model->getAttributesList(true); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'attributesList', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> -
+ attributesList = $model->attributesList ? $model->attributesList : $model->getAttributesList(true); + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'attributesList', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); + ?> -
-
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
+
- endWidget(); ?> + endWidget(); ?>
\ No newline at end of file From ece6a2bd00653fc919a090f193aee69630e6810c Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:47:47 +0700 Subject: [PATCH 04/11] feat: tweaks responsive btn width --- less/modules/buttons.less | 3 +++ 1 file changed, 3 insertions(+) diff --git a/less/modules/buttons.less b/less/modules/buttons.less index b16c7641f0..2ab4bdead4 100644 --- a/less/modules/buttons.less +++ b/less/modules/buttons.less @@ -47,6 +47,9 @@ display: flex; justify-content: center; align-items: center; + @media (min-width: 768px) { + min-width: 150px; + } } From b94585eb72577b910c421bda2e4565b85207d6a3 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:54:58 +0700 Subject: [PATCH 05/11] feat: admin dataset form and tweaks on other forms --- protected/views/adminAuthor/_form.php | 257 ++++---- protected/views/adminDatasetAuthor/_form.php | 126 ++-- protected/views/adminFile/_form.php | 604 ++++++++++--------- 3 files changed, 503 insertions(+), 484 deletions(-) diff --git a/protected/views/adminAuthor/_form.php b/protected/views/adminAuthor/_form.php index 8ac85cf20a..933c004979 100644 --- a/protected/views/adminAuthor/_form.php +++ b/protected/views/adminAuthor/_form.php @@ -1,142 +1,143 @@
- beginWidget('CActiveForm', array( - 'id' => 'author-form', - 'enableAjaxValidation' => false, - )); ?> + beginWidget('CActiveForm', array( + 'id' => 'author-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
-
-

Fields with * are required.

+
+

Fields with * are required.

- hasErrors()) : ?> -
- errorSummary($model); ?> -
- -
+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'surname', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 255 - ], - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - ]); + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'surname', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 255 + ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'first_name', - 'inputOptions' => [ - 'maxlength' => 255 - ], - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'first_name', + 'inputOptions' => [ + 'maxlength' => 255 + ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'middle_name', - 'inputOptions' => [ - 'maxlength' => 255 - ], - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'middle_name', + 'inputOptions' => [ + 'maxlength' => 255 + ], + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'custom_name', - 'inputOptions' => [ - 'maxlength' => 255 - ], - 'groupOptions' => [ - 'class' => 'col-md-12' - ], - ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'custom_name', + 'inputOptions' => [ + 'maxlength' => 255 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'orcid', - 'inputOptions' => [ - 'maxlength' => 128 - ], - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'orcid', + 'inputOptions' => [ + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'gigadb_user_id', - 'inputOptions' => [ - 'maxlength' => 128 - ], - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - ]); - ?> + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'gigadb_user_id', + 'inputOptions' => [ + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + ?> -
-
- getIdenticalAuthors(); - if (!empty($identical_authors)) { - ?> -
- this author is merged with author(s): -
    - findByPk($author_id); - echo "
  • " . $author->getAuthorDetails() . "
  • "; - } - ?> -
-
- +
+
+ getIdenticalAuthors(); + if (!empty($identical_authors)) { + ?> +
+ this author is merged with author(s): +
    + findByPk($author_id); + echo "
  • " . $author->getAuthorDetails() . "
  • "; + } + ?> +
+
+ - $model->id), - array('class' => 'btn btn-link') - ); - } - ?> -
-
+ $model->id), + array('class' => 'btn btn-link') + ); + } + ?> +
+
-
-
- id) { - echo CHtml::link( - 'Merge with an author', - array('adminAuthor/prepareAuthorMerge', 'origin_author_id' => $model->id), - array('class' => 'btn background-btn-o btn-min-width') - ); - } - ?> - Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> -
-
-
+
+
+ id) { + echo CHtml::link( + 'Merge with an author', + array('adminAuthor/prepareAuthorMerge', 'origin_author_id' => $model->id), + array('class' => 'btn background-btn-o btn-min-width') + ); + } + ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
- endWidget(); ?> + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminDatasetAuthor/_form.php b/protected/views/adminDatasetAuthor/_form.php index 9de668db55..8ef352c106 100644 --- a/protected/views/adminDatasetAuthor/_form.php +++ b/protected/views/adminDatasetAuthor/_form.php @@ -1,64 +1,76 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'dataset-author-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'dataset-author-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - ]); - ?> + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'author_id', + 'listDataOptions' => [ + 'data' => Author::model()->findAll(array('order' => 'surname')), + 'valueField' => 'id', + 'textField' => 'fullAuthor', + ], + 'enableSorting' => true, + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'author_id', - 'listDataOptions' => [ - 'data' => Author::model()->findAll(array('order' => 'surname')), - 'valueField' => 'id', - 'textField' => 'fullAuthor', - ], - 'enableSorting' => true, - ]); - ?> + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'rank', + 'inputOptions' => [ + 'required' => 'required', + 'aria-required' => 'true', + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'rank', - 'inputOptions' => [ - 'required' => 'required', - 'aria-required' => 'true', - ], - ]); - ?> +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
-
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
- -
\ No newline at end of file + endWidget(); ?> +
\ No newline at end of file diff --git a/protected/views/adminFile/_form.php b/protected/views/adminFile/_form.php index c25c1af51c..e80f757f08 100644 --- a/protected/views/adminFile/_form.php +++ b/protected/views/adminFile/_form.php @@ -1,277 +1,283 @@
-
- beginWidget('CActiveForm', array( - 'id' => 'file-form', - 'enableAjaxValidation' => false, - 'htmlOptions' => [ - 'class' => 'row' - ] - )); ?> +
+ beginWidget('CActiveForm', array( + 'id' => 'file-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -

Fields with * are required.

+

Fields with * are required.

- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - 'inputOptions' => [ - 'required' => true, - ], - 'tooltip' => 'The DOI of the dataset to which the file is linked, select from dropdown menu' - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 100 - ], - 'tooltip' => 'the name of the file as it will appear in the file table on the dataset page' - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'location', - 'groupOptions' => [ - 'class' => 'col-md-12' - ], - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 200 - ], - 'tooltip' => 'Complete path of the file location including the server' - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'extension', - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 30 - ], - 'tooltip' => 'The file extension, usually ignoring any archive related extension, e.g. something.fasta.gz would have extension fasta not gz' - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'size', - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - 'inputOptions' => [ - 'required' => true, - ], - 'tooltip' => 'The size of file on disk in bytes' - ]); - $this->widget('application.components.controls.DateField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'date_stamp', - 'groupOptions' => [ - 'class' => 'col-md-4' - ], - 'tooltip' => 'The date the file is made publicly available, usually the same as the dataset release date. Format: yyyy-mm-dd' - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'description', - 'groupOptions' => [ - 'class' => 'col-md-12' - ], - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - 'tooltip' => 'The description of the files content' - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'format_id', - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - 'listDataOptions' => [ - 'data' => FileFormat::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'name', - ], - 'tooltip' => 'The format of the file content, usually a MIME format, select from the dropdown menu' - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'type_id', - 'groupOptions' => [ - 'class' => 'col-md-6' - ], - 'listDataOptions' => [ - 'data' => FileType::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'name', - ], - 'tooltip' => 'The type of data contained in the file, select from the dropdown menu' - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'sample_name', - 'groupOptions' => [ - 'class' => 'col-md-12' - ], - 'tooltip' => 'If the file is directly and solely related to a single Sample entity named in GigaDB, a link to that sample can be added here by entering the exact name of the sample' - ]); - ?> + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + 'inputOptions' => [ + 'required' => true, + ], + 'tooltip' => 'The DOI of the dataset to which the file is linked, select from dropdown menu' + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 100 + ], + 'tooltip' => 'the name of the file as it will appear in the file table on the dataset page' + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'location', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 200 + ], + 'tooltip' => 'Complete path of the file location including the server' + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'extension', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 30 + ], + 'tooltip' => 'The file extension, usually ignoring any archive related extension, e.g. something.fasta.gz would have extension fasta not gz' + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'size', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + 'inputOptions' => [ + 'required' => true, + ], + 'tooltip' => 'The size of file on disk in bytes' + ]); + $this->widget('application.components.controls.DateField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'date_stamp', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + 'tooltip' => 'The date the file is made publicly available, usually the same as the dataset release date. Format: yyyy-mm-dd' + ]); + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'description', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'tooltip' => 'The description of the files content' + ]); + $this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'format_id', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + 'listDataOptions' => [ + 'data' => FileFormat::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'name', + ], + 'tooltip' => 'The format of the file content, usually a MIME format, select from the dropdown menu' + ]); + $this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'type_id', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + 'listDataOptions' => [ + 'data' => FileType::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'name', + ], + 'tooltip' => 'The type of data contained in the file, select from the dropdown menu' + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'sample_name', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + 'tooltip' => 'If the file is directly and solely related to a single Sample entity named in GigaDB, a link to that sample can be added here by entering the exact name of the sample' + ]); + ?> - isNewRecord) { ?> -
- fileAttributes) { ?> - - - - - - - - - - - - fileAttributes as $fa) { ?> - - - - - - - - -
Attributes
Attribute NameValueUnitActions
- attribute->attribute_name ?> - - value ?> - - unit ? $fa->unit->name : '' ?> - -
- - -
-
- -
- -
- +
+ +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+ endWidget(); ?> +
+
+ \ No newline at end of file From cbd318b9fccc0469fda00fe964a93c38bec68b17 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:56:22 +0700 Subject: [PATCH 06/11] feat: admin dataset sample form --- protected/views/adminDatasetSample/_form.php | 85 +++++++++++--------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/protected/views/adminDatasetSample/_form.php b/protected/views/adminDatasetSample/_form.php index f76431a553..24f94700e8 100644 --- a/protected/views/adminDatasetSample/_form.php +++ b/protected/views/adminDatasetSample/_form.php @@ -1,11 +1,13 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'dataset-sample-form', - 'enableAjaxValidation' => false, - )); ?> - +
+ beginWidget('CActiveForm', array( + 'id' => 'dataset-sample-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> + +

Fields with * are required.

hasErrors()) : ?> @@ -13,39 +15,46 @@ errorSummary($model); ?>
+
- widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - ]); - ?> - - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'sample_id', - 'listDataOptions' => [ - 'data' => Sample::model()->findAll(array('limit' => 10000, 'order' => 'id DESC')), - 'valueField' => 'id', - 'textField' => 'id', - ], - ]); - ?> - + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + ?> + + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'sample_id', + 'listDataOptions' => [ + 'data' => Sample::model()->findAll(array('limit' => 10000, 'order' => 'id DESC')), + 'valueField' => 'id', + 'textField' => 'id', + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + ?> + +
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file From 36fd6a7a3277bc858f9e510affe17787e95517d1 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 13:58:37 +0700 Subject: [PATCH 07/11] feat: admin dataset project form --- protected/views/adminDatasetProject/_form.php | 95 ++++++++++--------- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/protected/views/adminDatasetProject/_form.php b/protected/views/adminDatasetProject/_form.php index 692fec8232..e92640a908 100644 --- a/protected/views/adminDatasetProject/_form.php +++ b/protected/views/adminDatasetProject/_form.php @@ -1,55 +1,64 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'dataset-project-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'dataset-project-form', - 'enableAjaxValidation' => false, - )); ?> - - hasErrors()) : ?> + hasErrors()) : ?> +
errorSummary($model); ?>
- +
+ - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + ?> - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'project_id', - 'listDataOptions' => [ - 'data' => Project::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'name', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'project_id', + 'listDataOptions' => [ + 'data' => Project::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'name', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + ?> +
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file From c0d5a1bf9ffc25a52d0e8acd358c797e4ad0f94e Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 14:49:17 +0700 Subject: [PATCH 08/11] feat: update simple forms layouts --- protected/views/adminDatasetSample/_form.php | 4 +- protected/views/adminDatasetType/_form.php | 77 +++--- protected/views/adminExternalLink/_form.php | 122 +++++---- protected/views/adminFileFormat/_form.php | 78 +++--- protected/views/adminFileType/_form.php | 101 ++++---- protected/views/adminLink/_form.php | 108 ++++---- protected/views/adminLinkPrefix/_form.php | 107 ++++---- protected/views/adminManuscript/_form.php | 108 ++++---- protected/views/adminProject/_form.php | 104 ++++---- protected/views/adminPublisher/_form.php | 88 ++++--- protected/views/adminRelation/_form.php | 158 ++++++------ protected/views/adminSpecies/_form.php | 138 ++++++----- protected/views/attribute/_form.php | 168 ++++++++----- protected/views/datasetFunder/_form.php | 162 ++++++------ protected/views/datasetLog/_form.php | 110 ++++---- protected/views/funder/_form.php | 105 ++++---- protected/views/news/_form.php | 113 +++++---- protected/views/report/index.php | 248 +++++++++---------- protected/views/rssMessage/_form.php | 84 ++++--- 19 files changed, 1219 insertions(+), 964 deletions(-) diff --git a/protected/views/adminDatasetSample/_form.php b/protected/views/adminDatasetSample/_form.php index 24f94700e8..55818b328e 100644 --- a/protected/views/adminDatasetSample/_form.php +++ b/protected/views/adminDatasetSample/_form.php @@ -28,7 +28,7 @@ 'textField' => 'identifier', ], 'groupOptions' => [ - 'class' => 'col-md-6' + 'class' => 'col-md-12' ], ]); ?> @@ -44,7 +44,7 @@ 'textField' => 'id', ], 'groupOptions' => [ - 'class' => 'col-md-6' + 'class' => 'col-md-12' ], ]); ?> diff --git a/protected/views/adminDatasetType/_form.php b/protected/views/adminDatasetType/_form.php index 472b69e6d3..b4a832020d 100644 --- a/protected/views/adminDatasetType/_form.php +++ b/protected/views/adminDatasetType/_form.php @@ -1,11 +1,13 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'type-form', - 'enableAjaxValidation' => false, - )); ?> - +
+ beginWidget('CActiveForm', array( + 'id' => 'type-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> + +

Fields with * are required.

hasErrors()) : ?> @@ -13,35 +15,42 @@ errorSummary($model); ?>
+
- widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 32 - ], - ]); - - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'description', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> - + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 32 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); + + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'description', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); + ?> + +
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminExternalLink/_form.php b/protected/views/adminExternalLink/_form.php index ef75d64424..dc13c3fe29 100644 --- a/protected/views/adminExternalLink/_form.php +++ b/protected/views/adminExternalLink/_form.php @@ -1,62 +1,76 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'external-link-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'external-link-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Dataset::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Dataset::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'url', - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'external_link_type_id', - 'listDataOptions' => [ - 'data' => ExternalLinkType::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'name', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'url', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+ $this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'external_link_type_id', + 'listDataOptions' => [ + 'data' => ExternalLinkType::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'name', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - endWidget(); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminFileFormat/_form.php b/protected/views/adminFileFormat/_form.php index 70f7e10e63..ef52d44191 100644 --- a/protected/views/adminFileFormat/_form.php +++ b/protected/views/adminFileFormat/_form.php @@ -1,46 +1,56 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'file-format-form', - 'enableAjaxValidation' => false, - )); ?> +
+ beginWidget('CActiveForm', array( + 'id' => 'file-format-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> +

Fields with * are required.

hasErrors()) : ?> -
- errorSummary($model); ?> -
+
+ errorSummary($model); ?> +
+
- widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 10 - ], - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'description', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 10 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'description', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); + ?> + +
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
- - endWidget(); ?>
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminFileType/_form.php b/protected/views/adminFileType/_form.php index a02a413429..d0eae6bf9e 100644 --- a/protected/views/adminFileType/_form.php +++ b/protected/views/adminFileType/_form.php @@ -1,47 +1,56 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'file-type-form', - 'enableAjaxValidation' => false, - )); ?> - -

Fields with * are required.

- - hasErrors()) : ?> -
- errorSummary($model); ?> -
- - - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 100 - ], - ]); - - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'description', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> - -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
- +
+ beginWidget('CActiveForm', array( + 'id' => 'file-type-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> + +
+

Fields with * are required.

+ + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
+ + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 100 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'description', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminLink/_form.php b/protected/views/adminLink/_form.php index fcb66a85fa..d0032f89c5 100644 --- a/protected/views/adminLink/_form.php +++ b/protected/views/adminLink/_form.php @@ -1,55 +1,67 @@ -
+beginWidget('CActiveForm', array( + 'id' => 'link-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] +)); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'link-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()) : ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- +widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], +]); - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.CheckBoxField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'is_primary', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'link', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 100 - ], - ]); - ?> +$this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'link', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 100 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], +]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+$this->widget('application.components.controls.CheckBoxField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'is_primary', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], +]); +?> - endWidget(); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
-
\ No newline at end of file +endWidget(); ?> \ No newline at end of file diff --git a/protected/views/adminLinkPrefix/_form.php b/protected/views/adminLinkPrefix/_form.php index f300a61cd2..d184746d44 100644 --- a/protected/views/adminLinkPrefix/_form.php +++ b/protected/views/adminLinkPrefix/_form.php @@ -1,56 +1,69 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'prefix-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'prefix-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'prefix', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 20 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + $this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'source', + 'dataset' => array('EBI' => 'EBI', 'NCBI' => 'NCBI', 'DDBJ' => 'DDBJ'), + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'prefix', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 20 - ], - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'source', - 'dataset' => array('EBI' => 'EBI', 'NCBI' => 'NCBI', 'DDBJ' => 'DDBJ'), - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'url', - 'inputOptions' => [ - 'rows' => 3, - 'cols' => 50 - ], - ]); - ?> + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'url', + 'inputOptions' => [ + 'rows' => 3, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
+
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminManuscript/_form.php b/protected/views/adminManuscript/_form.php index 3157c9e7c0..fde37fb17c 100644 --- a/protected/views/adminManuscript/_form.php +++ b/protected/views/adminManuscript/_form.php @@ -1,55 +1,69 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'manuscript-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'manuscript-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'identifier', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 32 - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'pmid', - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'identifier', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 32 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+ $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'pmid', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - endWidget(); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminProject/_form.php b/protected/views/adminProject/_form.php index 45b65af3e5..7337c76216 100644 --- a/protected/views/adminProject/_form.php +++ b/protected/views/adminProject/_form.php @@ -1,53 +1,67 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'project-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'project-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'url', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'url', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 128 - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'maxlength' => 255 - ] - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'image_location', - 'inputOptions' => [ - 'maxlength' => 100 - ] - ]); - ?> + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'maxlength' => 255 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+ $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'image_location', + 'inputOptions' => [ + 'maxlength' => 100 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> - endWidget(); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminPublisher/_form.php b/protected/views/adminPublisher/_form.php index 2dda0c41e7..01c119c031 100644 --- a/protected/views/adminPublisher/_form.php +++ b/protected/views/adminPublisher/_form.php @@ -1,46 +1,56 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'publisher-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'publisher-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 45 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 45 - ], - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'description', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'description', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
+
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/adminRelation/_form.php b/protected/views/adminRelation/_form.php index b3e91f44c9..cdef4c0931 100644 --- a/protected/views/adminRelation/_form.php +++ b/protected/views/adminRelation/_form.php @@ -1,78 +1,98 @@ -
+beginWidget('CActiveForm', array( + 'id' => 'relation-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] +)); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'relation-form', - 'enableAjaxValidation' => false, - )); ?> +user->hasFlash('error') || $model->hasErrors()): ?> +
+ user->hasFlash('error')): ?> +
+ user->getFlash('error'); ?> +
+ -

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
+ - user->hasFlash('error')):?> -
- user->getFlash('error'); ?> -
- +
+

Fields with * are required.

+
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- +widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], +]); - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'related_doi', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'identifier', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'relationship_id', - 'listDataOptions' => [ - 'data' => Relationship::model()->findAll(), - 'valueField' => 'id', - 'textField' => 'name', - ], - ]); - if ('insert' === $model->getScenario()) { - $this->widget('application.components.controls.CheckBoxField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'add_reciprocal', - 'label' => 'Do you want to add a reciprocal relation model' - ]); - } - ?> +$this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'related_doi', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'identifier', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], +]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+$this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'relationship_id', + 'listDataOptions' => [ + 'data' => Relationship::model()->findAll(), + 'valueField' => 'id', + 'textField' => 'name', + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], +]); - endWidget(); ?> -
+if ('insert' === $model->getScenario()) { + $this->widget('application.components.controls.CheckBoxField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'add_reciprocal', + 'label' => 'Do you want to add a reciprocal relation model', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); +} +?> +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+ +endWidget(); ?> \ No newline at end of file diff --git a/protected/views/adminSpecies/_form.php b/protected/views/adminSpecies/_form.php index 21768eb8d0..259cb57614 100644 --- a/protected/views/adminSpecies/_form.php +++ b/protected/views/adminSpecies/_form.php @@ -1,62 +1,80 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'species-form', - 'enableAjaxValidation' => false, - )); ?> - -

Fields with * are required.

- - hasErrors()) : ?> -
- errorSummary($model); ?> -
- - - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'tax_id', - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'common_name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 64 - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'genbank_name', - 'inputOptions' => [ - 'maxlength' => 128 - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'scientific_name', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 128 - ], - ]); - ?> - -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
+
+ beginWidget('CActiveForm', array( + 'id' => 'species-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> +
+

Fields with * are required.

+ + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
+ + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'tax_id', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'common_name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 64 + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'scientific_name', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'genbank_name', + 'inputOptions' => [ + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/attribute/_form.php b/protected/views/attribute/_form.php index be17f79c7b..676c330eec 100644 --- a/protected/views/attribute/_form.php +++ b/protected/views/attribute/_form.php @@ -1,71 +1,111 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'attribute-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'attribute-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'attribute_name', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'definition', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'model', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'structured_comment_name', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'value_syntax', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'allowed_units', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'occurance', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'ontology_link', - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'note', - ]); - ?> + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'attribute_name', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+ $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'model', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - endWidget(); ?> -
+ $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'definition', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'structured_comment_name', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'value_syntax', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'allowed_units', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'occurance', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'ontology_link', + 'groupOptions' => [ + 'class' => 'col-md-4' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'note', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/datasetFunder/_form.php b/protected/views/datasetFunder/_form.php index 8b0fd39794..3643de9388 100644 --- a/protected/views/datasetFunder/_form.php +++ b/protected/views/datasetFunder/_form.php @@ -1,78 +1,100 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'dataset-funder-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'dataset-funder-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'dataset' => $datasets, + 'inputOptions' => [ + 'required' => true, + ], + 'tooltip' => 'Select or type the relevant Dataset DOI ID', + 'groupOptions' => [ + 'class' => 'col-md-6' + ] + ]); - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'dataset' => $datasets, - 'inputOptions' => [ - 'required' => true, - ], - 'tooltip' => 'Select or type the relevant Dataset DOI ID' - ]); - $this->widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'funder_id', - 'dataset' => $funders, - 'inputOptions' => [ - 'required' => true, - ], - 'tooltip' => 'Select the Funder name from the drop-down list. If the name is not present, it will need to be added via the Funder Admin page' - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'grant_award', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - 'tooltip' => 'Type the Grant/Award ID provided by the submitter' - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'awardee', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - 'tooltip' => 'Insert the Principle Investigators name who was awarded the grant, use format Initials Surname e.g. CI Hunter' - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'comments', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - 'tooltip' => 'Use this field to include a program name if the award was part of a specific program, or other short details as required' - ]); - ?> + $this->widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'funder_id', + 'dataset' => $funders, + 'inputOptions' => [ + 'required' => true, + ], + 'tooltip' => 'Select the Funder name from the drop-down list. If the name is not present, it will need to be added via the Funder Admin page', + 'groupOptions' => [ + 'class' => 'col-md-6' + ] + ]); -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
+ $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'grant_award', + 'inputOptions' => [ + 'rows' => 4, + 'cols' => 50 + ], + 'tooltip' => 'Type the Grant/Award ID provided by the submitter', + 'groupOptions' => [ + 'class' => 'col-md-12' + ] + ]); - endWidget(); ?> -
+ $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'awardee', + 'inputOptions' => [ + 'rows' => 4, + 'cols' => 50 + ], + 'tooltip' => 'Insert the Principle Investigators name who was awarded the grant, use format Initials Surname e.g. CI Hunter', + 'groupOptions' => [ + 'class' => 'col-md-6' + ] + ]); + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'comments', + 'inputOptions' => [ + 'rows' => 4, + 'cols' => 50 + ], + 'tooltip' => 'Use this field to include a program name if the award was part of a specific program, or other short details as required', + 'groupOptions' => [ + 'class' => 'col-md-6' + ] + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/datasetLog/_form.php b/protected/views/datasetLog/_form.php index 059cbcf57b..f2ee208003 100644 --- a/protected/views/datasetLog/_form.php +++ b/protected/views/datasetLog/_form.php @@ -1,52 +1,60 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'dataset-log-form', - 'enableAjaxValidation' => false, - )); ?> - -

Fields with * are required.

- - hasErrors()) : ?> -
- errorSummary($model); ?> -
- - - - widget('application.components.controls.DropdownField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'dataset_id', - 'listDataOptions' => [ - 'data' => Util::getDois(), - 'valueField' => 'id', - 'textField' => 'identifier', - ], - 'inputOptions' => [ - 'required' => true, - ], - ]); - - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'message', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - ?> - -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
- +
+ beginWidget('CActiveForm', array( + 'id' => 'dataset-log-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> + +
+

Fields with * are required.

+ + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
+ + widget('application.components.controls.DropdownField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'dataset_id', + 'listDataOptions' => [ + 'data' => Util::getDois(), + 'valueField' => 'id', + 'textField' => 'identifier', + ], + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'message', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/funder/_form.php b/protected/views/funder/_form.php index fbebba6446..55a62e61a7 100644 --- a/protected/views/funder/_form.php +++ b/protected/views/funder/_form.php @@ -1,47 +1,60 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'funder-form', - 'enableAjaxValidation' => false, - )); ?> - -

Fields with * are required.

- - hasErrors()) : ?> -
- errorSummary($model); ?> -
- - - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'uri', - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'primary_name_display', - - ]); - $this->widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'country', - ]); - ?> - -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> -
- +
+ beginWidget('CActiveForm', array( + 'id' => 'funder-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> + +
+

Fields with * are required.

+ + hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
+ + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'uri', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'primary_name_display', + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + + $this->widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'country', + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?> +
+
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/news/_form.php b/protected/views/news/_form.php index 699bcb5989..45b9a566be 100644 --- a/protected/views/news/_form.php +++ b/protected/views/news/_form.php @@ -1,11 +1,13 @@ -
- -
- beginWidget('CActiveForm', array( - 'id' => 'news-form', - 'enableAjaxValidation' => false, - )); ?> +
+ beginWidget('CActiveForm', array( + 'id' => 'news-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> +

Fields with * are required.

hasErrors()) : ?> @@ -13,49 +15,66 @@ errorSummary($model); ?>
+
+ + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'title', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 200 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + + $this->widget('application.components.controls.DateField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'start_date', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'title', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 200 - ], - ]); - $this->widget('application.components.controls.TextArea', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'body', - 'inputOptions' => [ - 'rows' => 6, - 'cols' => 50 - ], - ]); - $this->widget('application.components.controls.DateField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'start_date', - 'inputOptions' => [ - 'required' => true, - ], - ]); - $this->widget('application.components.controls.DateField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'end_date', - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + $this->widget('application.components.controls.DateField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'end_date', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-6' + ], + ]); + $this->widget('application.components.controls.TextArea', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'body', + 'inputOptions' => [ + 'rows' => 6, + 'cols' => 50 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> + +
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> + Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
- - endWidget(); ?>
+ + endWidget(); ?>
\ No newline at end of file diff --git a/protected/views/report/index.php b/protected/views/report/index.php index afc8614522..277a9394a4 100644 --- a/protected/views/report/index.php +++ b/protected/views/report/index.php @@ -1,46 +1,46 @@
- widget('TitleBreadcrumb', [ - 'pageTitle' => 'Report', - 'breadcrumbItems' => [ - ['label' => 'Admin', 'href' => '/site/admin'], - ['isActive' => true, 'label' => 'Report'], - ] - ]); - ?> - -
- - - + -
-
-
- - 'form-control')) ?> -
-
- - 'form-control')) ?> -
-
- - 'js-multi form-control', 'multiple' => 'multiple', 'data-placeholder' => Yii::t('app', 'Select DOIs')) - ); ?> -
-
- -
-
+
+
+ + 'form-control')) ?> +
+
+ + 'form-control')) ?> +
+
+ + 'js-multi form-control', 'multiple' => 'multiple', 'data-placeholder' => Yii::t('app', 'Select DOIs')) + ); ?> +
+
+
+
-
+
+ +
\ No newline at end of file diff --git a/protected/views/rssMessage/_form.php b/protected/views/rssMessage/_form.php index 8424021534..e02e14249b 100644 --- a/protected/views/rssMessage/_form.php +++ b/protected/views/rssMessage/_form.php @@ -1,45 +1,55 @@ -
+
+ beginWidget('CActiveForm', array( + 'id' => 'rss-message-form', + 'enableAjaxValidation' => false, + 'htmlOptions' => [ + 'class' => 'row' + ] + )); ?> -
- beginWidget('CActiveForm', array( - 'id' => 'rss-message-form', - 'enableAjaxValidation' => false, - )); ?> +
+

Fields with * are required.

-

Fields with * are required.

+ hasErrors()): ?> +
+ errorSummary($model); ?> +
+ +
- hasErrors()) : ?> -
- errorSummary($model); ?> -
- + widget('application.components.controls.TextField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'message', + 'inputOptions' => [ + 'required' => true, + 'maxlength' => 128 + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); - widget('application.components.controls.TextField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'message', - 'inputOptions' => [ - 'required' => true, - 'maxlength' => 128 - ], - ]); - $this->widget('application.components.controls.DateField', [ - 'form' => $form, - 'model' => $model, - 'attributeName' => 'publication_date', - 'inputOptions' => [ - 'required' => true, - ], - ]); - ?> + $this->widget('application.components.controls.DateField', [ + 'form' => $form, + 'model' => $model, + 'attributeName' => 'publication_date', + 'inputOptions' => [ + 'required' => true, + ], + 'groupOptions' => [ + 'class' => 'col-md-12' + ], + ]); + ?> -
- Cancel - isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn')); ?> -
- - endWidget(); ?> +
+
+ Cancel + isNewRecord ? 'Create' : 'Save', array('class' => 'btn background-btn btn-min-width')); ?>
+
+ endWidget(); ?>
\ No newline at end of file From e7ac64126ca5a07dd7bf5631efb96ad844f982bb Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 15:05:05 +0700 Subject: [PATCH 09/11] feat: update user form --- protected/views/user/_form.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/protected/views/user/_form.php b/protected/views/user/_form.php index 865e828895..8c817e9beb 100755 --- a/protected/views/user/_form.php +++ b/protected/views/user/_form.php @@ -1,6 +1,8 @@ -
+
+
+
- user->getFlashes() as $key => $message) { echo '
' . $message . "
\n"; } @@ -8,7 +10,6 @@ findByAttributes(array("requester_id" => $model->id, "status" => "pending")); $linked_author = $model->id ? Author::findAttachedAuthorByUserId($model->id) : null; - ?> +
+
+
@@ -239,8 +243,8 @@

-
- isNewRecord ? Yii::t('app', 'Register') : 'Save', array('class' => 'btn background-btn submit-btn')) ?> +
+ isNewRecord ? Yii::t('app', 'Register') : 'Save', array('class' => 'btn background-btn submit-btn btn-min-width')) ?>
endWidget() ?> From 41eef41591387d72fbd5ff4f713451cf6b4b7a47 Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 15:07:00 +0700 Subject: [PATCH 10/11] chore: up log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8802e816f..b2798ab5a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +- Feat #2100: Admin forms layout fills screen width - Fix #2094: Make Semgrep-based SAST analyzer available in tagged release - Feat #701: Code refactoring to separate upload status transitions and notifications to prepare for upload status overhaul - Security #1867: Update the gitlab static application security testing (SAST) job using the Semgrep-based analyzer From f068371b5d244a9af71e61a024fcb156c7d51dbf Mon Sep 17 00:00:00 2001 From: luis-toptal Date: Sat, 23 Nov 2024 16:05:22 +0700 Subject: [PATCH 11/11] feat: admin dataset projects one col --- protected/views/adminDatasetProject/_form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protected/views/adminDatasetProject/_form.php b/protected/views/adminDatasetProject/_form.php index e92640a908..2422c9e127 100644 --- a/protected/views/adminDatasetProject/_form.php +++ b/protected/views/adminDatasetProject/_form.php @@ -29,7 +29,7 @@ 'required' => true, ], 'groupOptions' => [ - 'class' => 'col-md-6' + 'class' => 'col-md-12' ], ]); ?> @@ -48,7 +48,7 @@ 'required' => true, ], 'groupOptions' => [ - 'class' => 'col-md-6' + 'class' => 'col-md-12' ], ]); ?>