|
57 | 57 | <!-- form start --> |
58 | 58 | <div class="card-body"> |
59 | 59 | <div class="form-inputs"> |
| 60 | + <h4>Basic information</h4> |
60 | 61 | <%= f.input :name, required: true, autofocus: true, wrapper: :input_group do %> |
61 | 62 | <span class="input-group-text"><i class="fa fa-user"></i></span> |
62 | 63 | <%= f.input_field :name, class: "form-control" %> |
|
65 | 66 | <span class="input-group-text"><i class="fa fa-desktop"></i></span> |
66 | 67 | <%= f.input_field :short_name, disabled: true, class: "form-control" %> |
67 | 68 | <% end %> |
68 | | - <%= f.input :ndbn_member, label: 'NDBN Membership', wrapper: :input_group do %> |
69 | | - <%= f.association :ndbn_member, label_method: :full_name, value_method: :id, label: false %> |
| 69 | + <%= f.input :ndbn_member, label: "NDBN membership ID", wrapper: :input_group do %> |
| 70 | + <div class="mb-n3"> <%# Removes "margin-bottom: 1rem" added by "form-group" class below %> |
| 71 | + <%= f.association :ndbn_member, label_method: :full_name, value_method: :id, label: false %> |
| 72 | + </div> |
70 | 73 | <% end %> |
71 | | - <%= f.input :url, as: :url, placeholder: "http://www.example.com", wrapper: :input_group do %> |
| 74 | + <%= f.input :url, label: "URL", wrapper: :input_group do %> |
72 | 75 | <span class="input-group-text"><i class="fa fa-link"></i></span> |
73 | | - <%= f.input_field :url, class: "form-control" %> |
| 76 | + <%= f.input_field :url, class: "form-control", placeholder: "http://www.example.com" %> |
74 | 77 | <% end %> |
75 | 78 | <%= f.input :email, wrapper: :input_group do %> |
76 | 79 | <span class="input-group-text"><i class="fa fa-envelope"></i></span> |
77 | 80 | <%= f.input_field :email, class: "form-control" %> |
78 | 81 | <% end %> |
79 | | - |
80 | 82 | <%= f.input :address do %> |
81 | 83 | <span class="input-group-text"><i class="fa fa-address-book"></i></span> |
82 | 84 | <%= f.input_field :street, class: "form-control", placeholder: "street" %> |
83 | 85 | <%= f.input_field :city, class: "form-control", placeholder: "city" %> |
84 | 86 | <%= f.input_field :state, collection: us_states, class: "form-control", placeholder: "state" %> |
85 | 87 | <%= f.input_field :zipcode, class: "form-control", placeholder: "zipcode" %> |
86 | 88 | <% end %> |
87 | | - |
88 | | - <%= render 'shared/deadline_day_fields', f: f %> |
89 | | - |
90 | | - <% default_reminder_email_text_hint = "You can use the variable <code>%{partner_name}</code> to include the partner's name in the message." %> |
91 | | - <%= f.input :reminder_email_text, label: "Additional text for reminder email", hint: default_reminder_email_text_hint.html_safe do %> |
92 | | - <%= f.rich_text_area :reminder_email_text, placeholder: 'Enter reminder email content...' %> |
| 89 | + <%= f.input :logo do %> |
| 90 | + <% if current_organization.logo.attached? %> |
| 91 | + <div> |
| 92 | + <p> |
| 93 | + <%= image_tag current_organization.logo, class: "main_logo" %> |
| 94 | + </p> |
| 95 | + <p> |
| 96 | + <a href="#showTheLogo" class="btn btn-xs btn-info" data-bs-toggle="modal"> |
| 97 | + View Original |
| 98 | + </a> |
| 99 | + </p> |
| 100 | + <div id="showTheLogo" class="modal fade"> |
| 101 | + <div class="modal-dialog gap-2"> |
| 102 | + <%= image_tag current_organization.logo, class: "thumbnail" %> |
| 103 | + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> |
| 104 | + </div> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + <label class="control-label mr-2">Update Logo</label> |
| 108 | + <% end %> |
| 109 | + <%= f.input_field :logo, as: :file %> |
| 110 | + <p class="help-block"> |
| 111 | + Logo should be a 4:1 ratio of width / height (default image is 763 x 188 pixels). |
| 112 | + Only jpeg/png format is supported. Images should be under 1 MB in size. |
| 113 | + </p> |
93 | 114 | <% end %> |
| 115 | + <hr> |
94 | 116 |
|
95 | | - <%= f.input :intake_location, :collection => current_organization.storage_locations.active.alphabetized, :label_method => :name, :value_method => :id, :label => "Default Intake Location", :include_blank => true, wrapper: :input_group %> |
96 | | - |
97 | | - <%= f.label :partner_form_fields, 'Partner Profile Sections' %> |
98 | | - |
99 | | - <%= f.select(:partner_form_fields, Organization::ALL_PARTIALS, { include_hidden: true }, { multiple: true, class: 'form-control custom-select', 'data-controller': 'select2', 'data-select2-config-value': '{}'}) %> |
100 | | - |
101 | | - <br> |
| 117 | + <h4>Storage</h4> |
| 118 | + <%= f.input :intake_location, :collection => current_organization.storage_locations.active.alphabetized, :label_method => :name, :value_method => :id, :label => "Default intake Storage Location (for Donations and Purchases)", :include_blank => true, wrapper: :input_group %> |
102 | 119 | <%= f.input :default_storage_location, :collection => current_organization.storage_locations.active.alphabetized, :label_method => :name, :value_method => :id, :label => "Default Storage Location", :include_blank => true, wrapper: :input_group %> |
| 120 | + <hr> |
103 | 121 |
|
104 | | - <%= f.input :invitation_text, label: "Custom Partner Invitation Message", wrapper: :input_group do %> |
| 122 | + <h4>Partner approval process</h4> |
| 123 | + <%= f.input :one_step_partner_invite, label: 'Use one-step Partner invite and approve process?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 124 | + <%= f.input :invitation_text, label: "Custom Partner invitation message", wrapper: :input_group do %> |
105 | 125 | <%= f.text_area :invitation_text, class: "form-control" %> |
106 | 126 | <% end %> |
| 127 | + <%= f.label :partner_form_fields, 'Partner Profile sections' %> |
| 128 | + <%= f.select(:partner_form_fields, Organization::ALL_PARTIALS, { include_hidden: true }, { multiple: true, class: 'form-control custom-select', 'data-controller': 'select2', 'data-select2-config-value': '{}'}) %> |
| 129 | + <br> |
| 130 | + <hr> |
107 | 131 |
|
108 | | - <%= f.input :repackage_essentials, label: 'Does your bank repackage essentials?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
109 | | - <%= f.input :distribute_monthly, label: 'Does your bank distribute monthly?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
110 | | - |
| 132 | + <h4>What kind of Requests can approved Partners make?</h4> |
| 133 | + <%= f.input :enable_child_based_requests, label: 'Enable Partners to make child-based Requests?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 134 | + <%= f.input :enable_individual_requests, label: 'Enable Partners to make Requests by indicating number of individuals needing each Item?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 135 | + <%= f.input :enable_quantity_based_requests, label: 'Enable Partners to make quantity-based Requests?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
111 | 136 | <% if Flipper.enabled?(:enable_packs) %> |
112 | 137 | <%= label_tag "organization[request_unit_names]", 'Custom request units used. Please use singular form -- e.g. pack, not packs. There will be a default "unit" entry provided.' %> |
113 | 138 | <%= select_tag( |
|
127 | 152 | } |
128 | 153 | ) %> |
129 | 154 | <% end %> |
| 155 | + <hr> |
130 | 156 |
|
131 | | - <%= f.input :enable_child_based_requests, label: 'Enable partners to make child-based requests?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
132 | | - <%= f.input :enable_individual_requests, label: 'Enable partners to make requests for individuals?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
133 | | - <%= f.input :enable_quantity_based_requests, label: 'Enable partners to make quantity-based requests?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
134 | | - <%= f.input :ytd_on_distribution_printout, label: 'Show Year-to-date values on distribution printout?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
135 | | - <%= f.input :signature_for_distribution_pdf, label: "Include Signature Lines on Distribution Printout?", as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
136 | | - <%= f.input :one_step_partner_invite, label: 'Use One Step Invite and Approve partner process?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
137 | | - <%= f.input :hide_value_columns_on_receipt, label: 'Hide both value columns on distribution receipts?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
138 | | - <%= f.input :hide_package_column_on_receipt, label: 'Hide the package column on distribution receipts?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
139 | | - <%= f.input :receive_email_on_requests, label: 'Receive email when partner makes a request?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
140 | | - |
| 157 | + <h4>Other emails</h4> |
| 158 | + <%= render 'shared/deadline_day_fields', f: f %> |
| 159 | + <% default_reminder_email_text_hint = "You can use the variable <code>%{partner_name}</code> to include the partner's name in the message." %> |
| 160 | + <%= f.input :reminder_email_text, label: "Additional text for reminder email", hint: default_reminder_email_text_hint.html_safe do %> |
| 161 | + <%= f.rich_text_area :reminder_email_text, placeholder: 'Enter reminder email content...' %> |
| 162 | + <% end %> |
141 | 163 | <% default_email_text_hint = "You can use the variables <code>%{partner_name}</code>, <code>%{delivery_method}</code>, <code>%{distribution_date}</code>, and <code>%{comment}</code> to include the partner's name, delivery method, distribution date, and comments sent in the request." %> |
142 | | - <%= f.input :default_email_text, label: "Distribution Email Content", hint: default_email_text_hint.html_safe do %> |
| 164 | + <%= f.input :default_email_text, label: "Distribution email content", hint: default_email_text_hint.html_safe do %> |
143 | 165 | <%= f.rich_text_area :default_email_text, placeholder: 'Enter distribution email content...' %> |
144 | 166 | <% end %> |
145 | | - |
146 | | - <%= f.input :logo, wrapper: :input_group do %> |
147 | | - |
148 | | - <% if current_organization.logo.attached? %> |
149 | | - <div> |
150 | | - <p> |
151 | | - <%= image_tag current_organization.logo, class: "main_logo" %> |
152 | | - </p> |
153 | | - <p> |
154 | | - <a href="#showTheLogo" class="btn btn-xs btn-info" data-bs-toggle="modal"> |
155 | | - View Original |
156 | | - </a> |
157 | | - </p> |
158 | | - <div id="showTheLogo" class="modal fade"> |
159 | | - <div class="modal-dialog"> |
160 | | - <%= image_tag current_organization.logo, class: "thumbnail" %> |
161 | | - <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> |
162 | | - </div> |
163 | | - </div> |
164 | | - </div> |
165 | | - <label class="control-label">Update Logo</label> |
166 | | - <% end %> |
167 | | - |
168 | | - <%= f.input_field :logo, as: :file %> |
169 | | - <p class="help-block"> |
170 | | - Logo should be a 4:1 ratio of width / height (default image is 763 x 188 pixels). |
171 | | - Only jpeg/png format is supported. Images should be under 1 MB in size. |
172 | | - </p> |
173 | | - |
174 | | - <% end %> |
175 | | - |
| 167 | + <%= f.input :receive_email_on_requests, label: 'Receive email when Partner makes a Request?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 168 | + <hr> |
| 169 | + |
| 170 | + <h4>Printing</h4> |
| 171 | + <%= f.input :ytd_on_distribution_printout, label: 'Show year-to-date values on Distribution printout?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 172 | + <%= f.input :signature_for_distribution_pdf, label: "Include signature lines on Distribution printout?", as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 173 | + <%= f.input :hide_value_columns_on_receipt, label: 'Hide value columns on Distribution and Donation printout?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 174 | + <%= f.input :hide_package_column_on_receipt, label: 'Hide package column on Distribution printout?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 175 | + |
| 176 | + <h4>Annual Survey</h4> |
| 177 | + <%= f.input :repackage_essentials, label: 'Does your Bank repackage essentials?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
| 178 | + <%= f.input :distribute_monthly, label: 'Does your Bank distribute monthly?', as: :radio_buttons, collection: [[true, 'Yes'], [false, 'No']], label_method: :second, value_method: :first %> |
176 | 179 | </div> |
177 | 180 | </div> |
178 | 181 | <!-- /.card-body --> |
|
0 commit comments