|
Lines 106-126
sub add_update_attribute_type {
Link Here
|
| 106 |
my $template = shift; |
106 |
my $template = shift; |
| 107 |
my $code = shift; |
107 |
my $code = shift; |
| 108 |
|
108 |
|
| 109 |
my $description = $input->param('description'); |
109 |
my $description = $input->param('description'); |
| 110 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
110 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
| 111 |
my $unique_id = $input->param('unique_id') ? 1 : 0; |
111 |
my $unique_id = $input->param('unique_id') ? 1 : 0; |
| 112 |
my $is_date = $input->param('is_date') ? 1 : 0; |
112 |
my $is_date = $input->param('is_date') ? 1 : 0; |
| 113 |
my $opac_display = $input->param('opac_display') ? 1 : 0; |
113 |
my $opac_display = $input->param('opac_display') ? 1 : 0; |
| 114 |
my $opac_editable = $input->param('opac_editable') ? 1 : 0; |
114 |
my $opac_editable = $input->param('opac_editable') ? 1 : 0; |
| 115 |
my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; |
115 |
my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; |
| 116 |
my $searched_by_default = $input->param('searched_by_default') ? 1 : 0; |
116 |
my $searched_by_default = $input->param('searched_by_default') ? 1 : 0; |
| 117 |
my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; |
117 |
my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; |
| 118 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
118 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
| 119 |
my $opac_mandatory = $input->param('opac_mandatory') ? 1 : 0; |
119 |
my $opac_mandatory = $input->param('opac_mandatory') ? 1 : 0; |
| 120 |
my $authorised_value_category = $input->param('authorised_value_category'); |
120 |
my $self_renewal_verification_check = $input->param('self_renewal_verification_check') ? 1 : 0; |
| 121 |
my $display_checkout = $input->param('display_checkout') ? 1 : 0; |
121 |
my $authorised_value_category = $input->param('authorised_value_category'); |
| 122 |
my $category_code = $input->param('category_code') || undef; |
122 |
my $display_checkout = $input->param('display_checkout') ? 1 : 0; |
| 123 |
my $class = $input->param('class'); |
123 |
my $category_code = $input->param('category_code') || undef; |
|
|
124 |
my $class = $input->param('class'); |
| 124 |
|
125 |
|
| 125 |
my $attr_type = Koha::Patron::Attribute::Types->find($code); |
126 |
my $attr_type = Koha::Patron::Attribute::Types->find($code); |
| 126 |
if ( $op eq 'edit' ) { |
127 |
if ( $op eq 'edit' ) { |
|
Lines 144-163
sub add_update_attribute_type {
Link Here
|
| 144 |
|
145 |
|
| 145 |
$attr_type->set( |
146 |
$attr_type->set( |
| 146 |
{ |
147 |
{ |
| 147 |
repeatable => $repeatable, |
148 |
repeatable => $repeatable, |
| 148 |
unique_id => $unique_id, |
149 |
unique_id => $unique_id, |
| 149 |
is_date => $is_date, |
150 |
is_date => $is_date, |
| 150 |
opac_display => $opac_display, |
151 |
opac_display => $opac_display, |
| 151 |
opac_editable => $opac_editable, |
152 |
opac_editable => $opac_editable, |
| 152 |
staff_searchable => $staff_searchable, |
153 |
staff_searchable => $staff_searchable, |
| 153 |
searched_by_default => $searched_by_default, |
154 |
searched_by_default => $searched_by_default, |
| 154 |
keep_for_pseudonymization => $keep_for_pseudonymization, |
155 |
keep_for_pseudonymization => $keep_for_pseudonymization, |
| 155 |
mandatory => $mandatory, |
156 |
mandatory => $mandatory, |
| 156 |
opac_mandatory => $opac_mandatory, |
157 |
opac_mandatory => $opac_mandatory, |
| 157 |
authorised_value_category => $authorised_value_category, |
158 |
self_renewal_verification_check => $self_renewal_verification_check, |
| 158 |
display_checkout => $display_checkout, |
159 |
authorised_value_category => $authorised_value_category, |
| 159 |
category_code => $category_code, |
160 |
display_checkout => $display_checkout, |
| 160 |
class => $class, |
161 |
category_code => $category_code, |
|
|
162 |
class => $class, |
| 161 |
} |
163 |
} |
| 162 |
)->store; |
164 |
)->store; |
| 163 |
|
165 |
|