Class: OLE_QA::Framework::OLELS::Patron_Address_Line
- Inherits:
-
Line_Object
- Object
- Common_Object
- Data_Object
- Line_Object
- OLE_QA::Framework::OLELS::Patron_Address_Line
- Defined in:
- lib/olels/objects/patron_address_line.rb
Overview
An address line on an individual patron record.
Instance Attribute Summary
Attributes inherited from Line_Object
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#set_elements ⇒ Object
Define screen elements for patron record address line.
Methods inherited from Line_Object
#initialize, #line_id, #set_subline
Methods inherited from Common_Object
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
This class inherits a constructor from OLE_QA::Framework::Line_Object
Instance Method Details
#set_elements ⇒ Object
Define screen elements for patron record address line.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/olels/objects/patron_address_line.rb', line 19 def set_elements # Format id string based on line_id . # @note Address line 0 has no numerical identifier. element(:details_link) {(line_id == 0) ? id_str = 'OlePatronDocument-Address_detLink_add' : id_str = "OlePatronDocument-Address_detLink_line#{line_id - 1}" b.a(:id => id_str)} element(:address_type_selector) {(line_id == 0) ? id_str = 'addressTypeCode_add_control' : id_str = "addressTypeCode_line#{line_id - 1}_control" b.select_list(:id => id_str)} element(:address_source_selector) {(line_id == 0) ? id_str = 'addressSource_add_control' : id_str = "addressSource_line#{line_id - 1}_control" b.select_list(:id => id_str)} element(:valid_from_date_field) {(line_id == 0) ? id_str = 'addressValidFrom_add_control' : id_str = "addressValidFrom_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:valid_to_date_field) {(line_id == 0) ? id_str = 'addressValidTo_add_control' : id_str = "addressValidTo_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:verified_checkbox) {(line_id == 0) ? id_str = 'addressVerified_add_control' : id_str = "addressVerified_line#{line_id - 1}_control" b.checkbox(:id => id_str)} element(:preferred_checkbox) {(line_id == 0) ? id_str = 'defaultValue_add_control' : id_str = "defaultValue_line#{line_id - 1}_control" b.checkbox(:id => id_str)} element(:active_checkbox) {(line_id == 0) ? id_str = 'active_add_control' : id_str = "active_line#{line_id - 1}_control" b.checkbox(:id => id_str)} # Details Area element(:line_1_field) {(line_id == 0) ? id_str = 'line1_add_control' : id_str = "line1_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:line_2_field) {(line_id == 0) ? id_str = 'line2_add_control' : id_str = "line2_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:line_3_field) {(line_id == 0) ? id_str = 'line3_add_control' : id_str = "line3_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:city_field) {(line_id == 0) ? id_str = 'city_add_control' : id_str = "city_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:state_selector) {(line_id == 0) ? id_str = 'state_add_control' : id_str = "state_line#{line_id - 1}_control" b.select_list(:id => id_str)} element(:postal_code_field) {(line_id == 0) ? id_str = 'postalCode_add_control' : id_str = "postalCode_line#{line_id - 1}_control" b.text_field(:id => id_str)} element(:country_selector) {(line_id == 0) ? id_str = 'country_add_control' : id_str = "country_line#{line_id - 1}_control" b.select_list(:id => id_str)} # Add/Delete element(:add_button) {b.(:id => 'OlePatronDocument-Address_add')} element(:delete_button) {b.(:id => "OlePatronDocument-Address_delete_line#{line_id - 1}")} end |