Skip to content

Commit

Permalink
add id to tr elements in forms for better styling
Browse files Browse the repository at this point in the history
also add ids to labels in the bibliography form
  • Loading branch information
matlam committed Jan 8, 2017
1 parent 9257903 commit d5c6938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/modules/bibliography/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,14 @@ function getimagesizefromstring($string_data)
}
$str_input = '<a class="notAJAX btn btn-primary openPopUp notIframe" href="'.MWB.'bibliography/pop_pattern.php" height="420px" title="'.__('Add new pattern').'"><i class="glyphicon glyphicon-plus"></i> Add New Pattern</a>&nbsp;';
$str_input .= simbio_form_element::selectList('itemCodePattern', $pattern_options, '', 'style="width: auto"').' &nbsp;';
$str_input .= __('Total item(s)').': <input type="text" class="small_input" style="width: 100px;" name="totalItems" value="0" /> &nbsp;';
$str_input .= '<label id="totalItemsLabel">' . __('Total item(s)').':</label> <input type="text" class="small_input" style="width: 100px;" name="totalItems" value="0" /> &nbsp;';
// get collection type data related to this record from database
$coll_type_q = $dbs->query("SELECT coll_type_id, coll_type_name FROM mst_coll_type");
$coll_type_options = array();
while ($coll_type_d = $coll_type_q->fetch_row()) {
$coll_type_options[] = array($coll_type_d[0], $coll_type_d[1]);
}
$str_input .= __('Collection Type').': '.simbio_form_element::selectList('collTypeID', $coll_type_options, '', 'style="width: 100px;"');;
$str_input .= '<label id="collTypeIDLabel">' . __('Collection Type').':</label> '.simbio_form_element::selectList('collTypeID', $coll_type_options, '', 'style="width: 100px;"');;
$form->addAnything(__('Item(s) code batch generator'), $str_input);
// biblio item add
if (!$in_pop_up AND $form->edit_mode) {
Expand Down
4 changes: 4 additions & 0 deletions simbio2/simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public function printOut()
}
// append row
$_table->appendTableRow(array($row['label'], ':', $_form_element));
if(!empty($row['element']->element_name))
{
$_table->setCellAttr($_row_num+1, null, 'id="simbioFormRow' . $row['element']->element_name . '"');
}
// set the column header attr
$_table->setCellAttr($_row_num+1, 0, 'width="20%" valign="top"'.$this->table_header_attr);
$_table->setCellAttr($_row_num+1, 1, 'width="1%" valign="top"'.$this->table_header_attr);
Expand Down

0 comments on commit d5c6938

Please sign in to comment.