Skip to content

Commit

Permalink
Merge pull request #22 from matlam/prevent-password-autocomplete-in-n…
Browse files Browse the repository at this point in the history
…ew-member-form

Prevent password autocomplete in new member form by Matthias Lamerz (@matlam)
  • Loading branch information
Senayan Library Management System (SLiMS) authored Jan 8, 2017
2 parents e3487f0 + 2526e54 commit 6be4730
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 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
9 changes: 7 additions & 2 deletions admin/modules/membership/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,17 @@ function getimagesizefromstring($string_data)

$form->addAnything(__('Photo'), $str_input);

// hidden username and password fields so that the password manager of the browser will not fill in the username in the memberEmail and the password in the memberPasswd field
$form->addTextField('text', 'dummyUserField', null, null, '');
$form->addTextField('password', 'dummyPasswdField', null, null, '');
echo '<style type="text/css">#simbioFormRowdummyPasswdField, #simbioFormRowdummyUserField {display: none}</style>';

// member email
$form->addTextField('text', 'memberEmail', __('E-mail'), $rec_d['member_email'], 'style="width: 40%;"');
// member password
$form->addTextField('password', 'memberPasswd', __('New Password'), null, 'style="width: 40%;"');
$form->addTextField('password', 'memberPasswd', __('New Password'), null, 'style="width: 40%;" autocomplete="new-password"');
// member password confirmation
$form->addTextField('password', 'memberPasswd2', __('Confirm New Password'), null, 'style="width: 40%;"');
$form->addTextField('password', 'memberPasswd2', __('Confirm New Password'), null, 'style="width: 40%;" autocomplete="new-password"');

// edit mode messagge
if ($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 6be4730

Please sign in to comment.