Lines 114-119
sub add_update_attribute_type {
Link Here
|
114 |
my $description = $input->param('description'); |
114 |
my $description = $input->param('description'); |
115 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
115 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
116 |
my $unique_id = $input->param('unique_id') ? 1 : 0; |
116 |
my $unique_id = $input->param('unique_id') ? 1 : 0; |
|
|
117 |
my $trim_value = $input->param('trim_value') ? 1 : 0; |
117 |
my $opac_display = $input->param('opac_display') ? 1 : 0; |
118 |
my $opac_display = $input->param('opac_display') ? 1 : 0; |
118 |
my $opac_editable = $input->param('opac_editable') ? 1 : 0; |
119 |
my $opac_editable = $input->param('opac_editable') ? 1 : 0; |
119 |
my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; |
120 |
my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; |
Lines 149-154
sub add_update_attribute_type {
Link Here
|
149 |
{ |
150 |
{ |
150 |
repeatable => $repeatable, |
151 |
repeatable => $repeatable, |
151 |
unique_id => $unique_id, |
152 |
unique_id => $unique_id, |
|
|
153 |
trim_value => $trim_value, |
152 |
opac_display => $opac_display, |
154 |
opac_display => $opac_display, |
153 |
opac_editable => $opac_editable, |
155 |
opac_editable => $opac_editable, |
154 |
staff_searchable => $staff_searchable, |
156 |
staff_searchable => $staff_searchable, |
Lines 236-247
sub edit_attribute_type_form {
Link Here
|
236 |
$can_be_set_to_unique = 0 if $@; |
238 |
$can_be_set_to_unique = 0 if $@; |
237 |
$attr_type->unique_id(0); |
239 |
$attr_type->unique_id(0); |
238 |
} |
240 |
} |
|
|
241 |
my $can_be_trimmed = 1; |
242 |
if ( $attr_type->trim_value == 0 ) { |
243 |
$attr_type->trim_value(1); |
244 |
eval {$attr_type->check_untrimmed_values}; |
245 |
$can_be_trimmed = 0 if $@; |
246 |
$attr_type->trim_value(0); |
247 |
} |
239 |
$template->param( |
248 |
$template->param( |
240 |
attribute_type => $attr_type, |
249 |
attribute_type => $attr_type, |
241 |
attribute_type_form => 1, |
250 |
attribute_type_form => 1, |
242 |
edit_attribute_type => 1, |
251 |
edit_attribute_type => 1, |
243 |
can_be_set_to_nonrepeatable => $can_be_set_to_nonrepeatable, |
252 |
can_be_set_to_nonrepeatable => $can_be_set_to_nonrepeatable, |
244 |
can_be_set_to_unique => $can_be_set_to_unique, |
253 |
can_be_set_to_unique => $can_be_set_to_unique, |
|
|
254 |
can_be_trimmed => $can_be_trimmed, |
245 |
confirm_op => 'edit_attribute_type_confirmed', |
255 |
confirm_op => 'edit_attribute_type_confirmed', |
246 |
categories => $patron_categories, |
256 |
categories => $patron_categories, |
247 |
); |
257 |
); |