Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker widget field read-only, jupyter email notification correction. #68

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions models/JupyterRequestNew.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ public function uploadNew($requestId)
$username = User::returnUsernameById($request->submitted_by);

$message_autoaccept="We are happy to inform you that your project '$project->name' has been automatically approved. <br /> You can access the project resources via the " . Yii::$app->params['name'] . " website";
$message_autoaccept_mod="We would like to inform you that the On-demand computation project '$project->name', submitted by user $username, has been automatically approved.";

// $message_autoaccept_mod="We would like to inform you that the On-demand computation project '$project->name', submitted by user $username, has been automatically approved.";
$message_autoaccept_mod="We would like to inform you that the On-demand notebooks project '$project->name', submitted by user $username, has been automatically approved.";

}

else
Expand Down Expand Up @@ -332,7 +333,7 @@ public function uploadNewEdit($requestId,$uchanged)
$username = User::returnUsernameById($submitted_by);
$warnings= 'Your request'.$autoaccept_allowed.' will be reviewed.';
$project_id=$project->id;
$message="The books project '$project->name', created by user $username, has been modified and is pending approval.";
$message="The On-demand notebooks project '$project->name', created by user $username, has been modified and is pending approval.";
EmailEventsModerator::NotifyByEmail('edit_project', $project_id,$message);
}

Expand Down
2 changes: 1 addition & 1 deletion models/ProjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function uploadNew($project_type)
} elseif ($project_type == 3){
$project_typen = "Machine Compute";
} else {
$project_typen = "Jupyter Notebook";
$project_typen = "On-demand Notebooks";
}

Yii::$app->db->createCommand()->update('project',['pending_request_id'=>$request_id], "id='$project_id'")->execute();
Expand Down
2 changes: 2 additions & 0 deletions views/project/edit_cold_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".($upperlimits->duration-$interval)."D",
'autoclose'=>true,
Expand All @@ -87,6 +88,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d'
Expand Down
3 changes: 3 additions & 0 deletions views/project/edit_jupyter.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".($upperlimits->duration-$interval)."D",
'readonly' => 'true',
'autoclose'=>true,
'format'=>'yyyy-m-d'
]
Expand All @@ -101,6 +103,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d'
Expand Down
2 changes: 2 additions & 0 deletions views/project/edit_machine_compute.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
<div style="margin-bottom: 20px;">
<?php echo '<label> Project end date * </label>';
if($exceed_limits == 0){echo $form->field($project, 'end_date')->widget(DatePicker::className(),[
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d',
'endDate'=>'+'.(90-$interval)."d"
]
])->label("");}
if($exceed_limits == 1){echo $form->field($project, 'end_date')->widget(DatePicker::className(),[
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d'
Expand Down
2 changes: 2 additions & 0 deletions views/project/edit_ondemand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".($upperlimits->duration-$interval)."D",
'autoclose'=>true,
Expand All @@ -94,6 +95,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d'
Expand Down
2 changes: 2 additions & 0 deletions views/project/edit_service.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".($upperlimits->duration-$interval)."D",
'autoclose'=>true,
Expand All @@ -80,6 +81,7 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d'
Expand Down
6 changes: 4 additions & 2 deletions views/project/new_cold_storage_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('placeholder' => 'Enter date'),
'options' => array('placeholder' => 'Enter date',
'readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".$upperlimits->duration."D",
'autoclose'=>true,
'padding-top'=>"500px;"
'padding-top'=>"500px;",
'readonly'=>true
]
]);?>
</div>
Expand Down
3 changes: 2 additions & 1 deletion views/project/new_jupyter_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('placeholder' => 'Enter date'),
'options' => array('placeholder' => 'Enter date',
'readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".$upperlimits->duration."D",
'autoclose'=>true,
Expand Down
2 changes: 2 additions & 0 deletions views/project/new_machine_compute_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<div style="margin-bottom: 20px;">
<?php echo '<label> Project end date * </label>';
echo $form->field($project, 'end_date')->widget(DatePicker::className(),[
'options' => array('placeholder' => 'Enter date',
'readonly' => 'readonly'),
'pluginOptions' => [
'autoclose'=>true,
'format'=>'yyyy-m-d',
Expand Down
3 changes: 2 additions & 1 deletion views/project/new_ondemand_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('placeholder' => 'Enter date'),
'options' => array('placeholder' => 'Enter date',
'readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".$upperlimits->duration."D",
'autoclose'=>true,
Expand Down
3 changes: 2 additions & 1 deletion views/project/new_service_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
echo DatePicker::widget([
'model' => $project,
'attribute' => 'end_date',
'options' => array('placeholder' => 'Enter date'),
'options' => array('placeholder' => 'Enter date',
'readonly' => 'readonly'),
'pluginOptions' => [
'endDate'=>"+".$upperlimits->duration."D",
'autoclose'=>true,
Expand Down
Loading