summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaketh14992021-04-01 16:27:33 +0530
committerSaketh14992021-04-01 16:27:33 +0530
commitdb8d41616dbe7a01ba4825768daad2720ca22b0d (patch)
tree5772bad8f41e0648668728918d89728334d089e1
parentdc64743422ea56fc0614940cb17219549999eb0a (diff)
downloaddwsim_custom_model-db8d41616dbe7a01ba4825768daad2720ca22b0d.tar.gz
dwsim_custom_model-db8d41616dbe7a01ba4825768daad2720ca22b0d.tar.bz2
dwsim_custom_model-db8d41616dbe7a01ba4825768daad2720ca22b0d.zip
Update proposal edit form
-rwxr-xr-xmanage_proposal.inc59
-rwxr-xr-xproposal.inc9
2 files changed, 66 insertions, 2 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc
index 9b7341e..2fe9066 100755
--- a/manage_proposal.inc
+++ b/manage_proposal.inc
@@ -703,6 +703,11 @@ function custom_model_proposal_edit_form($form, &$form_state)
'#required' => TRUE,
'#default_value' => $proposal_data->contributor_name
);
+ $form['contributor_contact_no'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Contact No.'),
+ '#default_value' => $proposal_data->contact_no
+ );
$form['student_email_id'] = array(
'#type' => 'item',
'#title' => t('Email'),
@@ -730,6 +735,28 @@ function custom_model_proposal_edit_form($form, &$form_state)
'#required' => TRUE,
'#default_value' => $proposal_data->university
);
+ $form['department'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Department / Branch'),
+ '#options' => _cm_list_of_departments(),
+ '#default_value' => $proposal_data->department
+ );
+ $form['other_department'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Department/Branch name not in list'),
+ '#size' => 100,
+ '#attributes' => array(
+ 'placeholder' => t('Enter your department name')
+ ),
+ '#states' => array(
+ 'visible' => array(
+ ':input[name="department"]' => array(
+ 'value' => 'Others'
+ )
+ )
+ ),
+ '#default_value' => $proposal_data->other_department
+ );
$form['country'] = array(
'#type' => 'select',
'#title' => t('Country'),
@@ -827,6 +854,12 @@ function custom_model_proposal_edit_form($form, &$form_state)
'placeholder' => 'Insert pincode of your city/ village....'
)
);
+ $form['version'] = array(
+ '#type' => 'textfield',
+ '#title' => t('DWSIM Version'),
+ '#options' => _list_of_software_versions(),
+ '#default_value' => $proposal_data->version,
+ );
$form['project_title'] = array(
'#type' => 'textarea',
'#title' => t('Title of the Custom Model'),
@@ -836,14 +869,36 @@ function custom_model_proposal_edit_form($form, &$form_state)
'#default_value' => $proposal_data->project_title
);
$form['reference'] = array(
- '#type' => 'textarea',
+ '#type' => 'textfield',
'#title' => t('Reference'),
'#size' => 10000,
'#attributes' => array(
- 'placeholder' => 'Links of must be provided....'
+ 'placeholder' => 'Enter Reference'
),
'#default_value' => $proposal_data->reference
);
+ $form['script_used'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Script used to create the Custom Model'),
+ /*'#options' => array(
+ 'Scilab' => 'Scilab',
+ 'IronPython' => 'IronPython'
+ ),*/
+ '#default_value' => $proposal_data->script_used
+ );
+ /*$form['samplefile'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Upload Abstract of Custom Model'),
+ '#collapsible' => FALSE,
+ '#collapsed' => FALSE
+ );*/
+ $form/*['samplefile']*/['samplefilepath'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Uploaded Abstract of Custom Model'),
+ //'#title' => t('Upload circuit diagram'),
+ '#default_value' => $proposal_data->samplefilepath
+ );
+
$form['delete_proposal'] = array(
'#type' => 'checkbox',
'#title' => t('Delete Proposal')
diff --git a/proposal.inc b/proposal.inc
index 2f644b1..633f360 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -228,6 +228,15 @@ function custom_model_proposal_form($form, &$form_state, $no_js_use = FALSE)
'#description' => t('Maximum character limit is 250'),
'#required' => TRUE
);
+ $form['reference'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Reference'),
+ '#size' => 10000,
+ '#attributes' => array(
+ 'placeholder' => 'Enter Reference'
+ ),
+ '#required' => TRUE,
+ );
$form['script_used'] = array(
'#type' => 'select',
'#title' => t('Script used to create the Custom Model'),