View | Details | Raw Unified | Return to bug 17855
Collapse All | Expand All

(-)a/installer/onboarding.pl (+142 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
#Recommended pragmas
3
use strict;
4
use warnings;
5
use diagnostics;
6
7
8
use C4::Koha;
9
#Pragmas for creating library
10
use Modern::Perl;
11
use CGI qw (-utf8);
12
use C4::Auth;
13
use C4::Context;
14
use C4::Output;
15
use Koha::Patrons;
16
use Koha::Items;
17
use Koha::Libraries;
18
use Koha::LibraryCategories;
19
20
21
use POSIX;
22
use C4::Templates;
23
use C4::Languages qw(getAllLanguages getTranslatedLanguages);
24
use C4::Installer;
25
use Koha;
26
use installer::install.pl;
27
28
#Setting variables from install.pl origin
29
my $query    = new CGI;
30
my $step     = $query->param('step');
31
32
my ( $template, $loggedinuser, $cookie) = get_template_and_user(
33
     {
34
        template_name => "/onboarding/onboardingstep" . ( $step ? $step : 1 ) . ".tt",
35
        query         => $query,
36
        type          => "intranet",
37
        authnotrequired => 0,
38
        debug           => 1,
39
    }
40
);
41
42
#Check database connection
43
my %info;
44
$info{'dbname'} = C4::Context->config("database");
45
$info{'dbms'} =
46
(   C4::Context->config("db_scheme")
47
    ? C4::Context->config("db_scheme")
48
     : "mysql" );
49
50
$info{'hostname'} = C4::Context->config("hostname");
51
$info{'port'}     = C4::Context->config("port");
52
$info{'user'}     = C4::Context->config("user");
53
$info{'password'} = C4::Context->config("pass");
54
my $dbh = DBI->connect(
55
         "DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}"
56
          . ( $info{port} ? ";port=$info{port}" : "" ),
57
           $info{'user'}, $info{'password'}
58
);
59
60
61
62
63
#Performing each step of the onboarding tool
64
if ( $step && $step == 1 ) {
65
#This is the Initial step of the onboarding tool to create a library 
66
67
#store inputted parameters in variables
68
    my $branchcode       = $input->param('branchcode');
69
    my $categorycode     = $input->param('categorycode');
70
    my $op               = $input->param('op') || 'list';
71
    my @messages;
72
    my $library;
73
74
#Find branchcode if it exists
75
    if ( $op eq 'add_form' ) {
76
        if ($branchcode) {
77
            $library = Koha::Libraries->find($branchcode);
78
         }
79
80
        $template->param(
81
            library    => $library,
82
            categories => [ Koha::LibraryCategories->search( {}, { order_by => [ 'categorytype', 'categoryname' ] } ) ],
83
            $library ? ( selected_categorycodes => [ map { $_->categorycode } $library->get_categories ] ) : (),
84
        );
85
    } elsif ( $op eq 'add_validate' ) {
86
        my @fields = qw(
87
            branchname
88
        );
89
90
        my $is_a_modif = $input->param('is_a_modif');
91
92
        my @categories;
93
        for my $category ( Koha::LibraryCategories->search ) {
94
            push @categories, $category
95
                if $input->param( "selected_categorycode_" . $category->categorycode );
96
         }
97
        if ($is_a_modif) {
98
            my $library = Koha::Libraries->find($branchcode);
99
            for my $field (@fields) {
100
                 $library->$field( scalar $input->param($field) );
101
            }
102
            $library->update_categories( \@categories );
103
104
            eval { $library->store; };
105
106
            if ($@) {
107
                push @messages, { type => 'alert', code => 'error_on_update' };
108
            } else {
109
                push @messages, { type => 'message', code => 'success_on_update' };
110
            }
111
        } else {
112
            $branchcode =~ s|\s||g;
113
            my $library = Koha::Library->new(
114
                 {   branchcode => $branchcode,
115
                    ( map { $_ => scalar $input->param($_) || undef } @fields )
116
                }
117
            );
118
            eval { $library->store; };
119
            $library->add_to_categories( \@categories );
120
            if ($@) {
121
                push @messages, { type => 'alert', code => 'error_on_insert' };
122
            } else {
123
                push @messages, { type => 'message', code => 'success_on_insert' };
124
            }
125
        }
126
            $op = 'list';
127
    }
128
129
        if ($op eq 'list'){
130
             print redirect(-url=>'koha/cgi-bin/koha/onboarding/onboarding.cgi?step=2');
131
        }
132
        
133
}
134
135
136
137
138
139
140
141
142
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-48 / +54 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
1
[% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
2
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/installer/onboarding.pl">[% END %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
3
[% INCLUDE 'installer-doc-head-close.inc' %]
4
<div>
4
<div>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
5
<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Koha web  installer &rsaquo; Step 3</h1>
Lines 64-70 Link Here
64
[% END %]
64
[% END %]
65
[% IF ( finish ) %]
65
[% IF ( finish ) %]
66
    <h1>Congratulations, installation complete</h1>
66
    <h1>Congratulations, installation complete</h1>
67
    <p>If this page does not redirect in 5 seconds, click <a href="/">here</a>.</p>
67
    <p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">here</a>.</p>
68
[% END %]
68
[% END %]
69
[% IF ( choosemarc ) %]
69
[% IF ( choosemarc ) %]
70
    <h2 align="center">Select your MARC flavor</h2>
70
    <h2 align="center">Select your MARC flavor</h2>
Lines 75-84 Link Here
75
    <p>
75
    <p>
76
    [% FOREACH flavourloo IN flavourloop %]
76
    [% FOREACH flavourloo IN flavourloop %]
77
    <div>
77
    <div>
78
            [% IF ( flavourloo.checked ) %]
78
            [% IF ( flavourloo.label == "Unimarc") %]
79
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
79
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]                 <br/>
80
            [% ELSE %]
80
            [% ELSE %]
81
                <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
81
                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
82
            [% END %]
82
            [% END %]
83
    </div>
83
    </div>
84
    [% END %]
84
    [% END %]
Lines 100-148 Link Here
100
      [% IF ( frameworksloop ) %]
100
      [% IF ( frameworksloop ) %]
101
      <h2>MARC frameworks: [% marcflavour %]</h2>
101
      <h2>MARC frameworks: [% marcflavour %]</h2>
102
      [% IF ( en_marc_frameworks ) %]
102
      [% IF ( en_marc_frameworks ) %]
103
      <h4><span class="error">No MARC frameworks are available for your language.                 Defaulting to the frameworks supplied for English (en)<span></h4>
103
         <h4><span class="error">No MARC frameworks are available for your language.                 Defaulting to the frameworks supplied for English (en)<span></h4>
104
      [% END %]
104
      [% END %]
105
      [% FOREACH frameworksloo IN frameworksloop %]
105
      [% FOREACH frameworksloo IN frameworksloop %]
106
      <div>
106
        <div>
107
      <h3>[% frameworksloo.label %]</h3>
107
        <h3>[% frameworksloo.label %]</h3>
108
      [% FOREACH framework IN frameworksloo.frameworks %]
108
        [% FOREACH framework IN frameworksloo.frameworks %]
109
      <table style="border:1px;vertical-align:top;">
109
            <table style="border:1px;vertical-align:top;">
110
      <tr>
110
            <tr>
111
         <td style = "border:1px; vertical-align:top;">
111
            <td style = "border:1px; vertical-align:top;">
112
        [% IF (frameworksloo.label == "Default" ) %]   
112
            [% IF (frameworksloo.label == "Default" ) %]   
113
             <input type="hidden" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" />
113
                 <input type="hidden" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" />
114
            [% ELSE %]
115
                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" />
116
            [% END %]
117
            </td>
118
            <td>
119
            [% IF (frameworksloo.label == "Default" ) %]
120
            <ul>
121
                <label for="[% framework.fwkname %]">
122
                <li> [% framework.fwkdescription %]</li>
123
                <em>([% framework.fwkname %])</em>
124
                </label>
125
            </ul>
126
         </td>
114
        [% ELSE %]
127
        [% ELSE %]
115
             <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" />
128
        <td>
116
         [% END %]
129
            <label for= "[% framework.fwkname %]">
117
      </td>
130
                [% framework.fwkdescription %]
118
      <td>
131
                <em>([% framework.fwkname %])</em>
119
      [% IF (frameworksloo.label == "Default" ) %]
132
            </label>
120
        <ul>
133
        </td>
121
        <label for="[% framework.fwkname %]">
134
        [% END %]
122
            <li>[% framework.fwkdescription %]</li>
135
        </tr>
123
            <em>([% framework.fwkname %])</em>
124
        </label>
125
        </ul>
126
      </td>
127
      [% ELSE %]
128
      <td>
129
         <label for= "[% framework.fwkname %]">
130
            [% framework.fwkdescription %]
131
            <em>([% framework.fwkname %])</em>
132
         </label>
133
      </td>
134
      [% END %]
135
      </tr>
136
        </table>
136
        </table>
137
      [% END %]
137
    [% END %]
138
      </div>
138
    </div>
139
      [% END %]
139
    [% END %]
140
    <h2>Other data</h2>
140
    <h2>Other data</h2>
141
                  [% END %]
141
    [% END %]
142
                  [% IF ( en_sample_data ) %]
142
    [% IF ( en_sample_data ) %]
143
                      <h4><span class="error">No sample data and settings ar    e available for your language.
143
        <h4><span class="error">No sample data and settings are available for your language.
144
             132                 Defaulting to the samples supplied for English     (en)<span></h4>
144
                Defaulting to the samples supplied for English (en)<span></h4>
145
                 [% END %]
145
    [% END %]
146
    [% FOREACH levelloo IN levelloop %]
146
    [% FOREACH levelloo IN levelloop %]
147
    <div>
147
    <div>
148
    <h3>[% levelloo.label %]</h3>
148
    <h3>[% levelloo.label %]</h3>
Lines 151-169 Link Here
151
        <tr>
151
        <tr>
152
        <td style="vertical-align:top;">
152
        <td style="vertical-align:top;">
153
        [% IF (levelloo.label == "Default" ) %]
153
        [% IF (levelloo.label == "Default" ) %]
154
              <input type="hidden" name="framework" value=    "[% framework.fwkfile %]" id="[%framework.fwkname %]" />
154
<<<<<<< HEAD
155
             <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
156
=======
157
            <ul>
158
            </ul>
159
>>>>>>> 9e47b85... Removed test text
155
        [% ELSE %]
160
        [% ELSE %]
156
            <input type="checkbox" name="framework" value="[%framework.fwk %]" id=="[%framework.fwkname%]"/>
161
             <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id=="[%framework.fwkname%]"/> 
157
        [% END %]
162
        [% END %]
158
        </td>
163
        </td>
159
        <td>
164
        <td>
160
        [% IF (levelloo.label == "Default") %]
165
        [% IF (levelloo.label == "Default") %]
161
           <ul>
166
            <ul>
162
            <label for="[% framework.fwkname %]">
167
            <label for="[% framework.fwkname %]">
163
               <li> [% framework.fwkdescription %]</li>
168
               <li> [% framework.fwkdescription %]</li>
164
                <em>([% framework.fwkname %])</em>
169
                <em>([% framework.fwkname %])</em>
165
            </label>
170
            </label>
166
           </ul>
171
            </ul>
167
        </td>
172
        </td>
168
        [% ELSE %]
173
        [% ELSE %]
169
        <td>
174
        <td>
Lines 201-207 Link Here
201
        <form name="finish">
206
        <form name="finish">
202
        <input type="hidden" name="step" value="3" />
207
        <input type="hidden" name="step" value="3" />
203
        <input type="hidden" name="op" value="finish" />
208
        <input type="hidden" name="op" value="finish" />
204
        <input type="submit" value="Finish" /></form>
209
        <input type="submit" value="Finish"/>
210
        </form>
205
        </p>
211
        </p>
206
    </p>
212
    </p>
207
[% END %]
213
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (+109 lines)
Line 0 Link Here
1
2
3
<!--Includes for creating library--> 
4
[% INCLUDE 'doc-head-open.inc' %]
5
6
<head>
7
<title>Welcome &rsaquo; to  &rsaquo; Koha</title>
8
9
<!--jQuery code for create library-->
10
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
11
<script type="text/javascript">
12
    //<![CDATA[
13
          $(document).ready(function() {
14
                  $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
15
                     "aoColumnDefs": [
16
                         { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
17
                     ],
18
                     "iDisplayLength": 10,
19
                     "sPaginationType": "four_button"
20
                  }));
21
22
                  [% UNLESS library %]
23
                      $("#Aform").on("submit", function( event ) {
24
                               if ( $("#branchcode").val().match(/\s/) ) {
25
                                 event.preventDefault();
26
                                 alert(_("The library code entered contains whitespace characters. Please remove any whitespace     characters from the library code"));
27
                                 return false;
28
                                } else {
29
                                 return true;
30
                                }
31
                       });
32
                 [% END %]..
33
         });
34
    //]]>
35
</script>
36
</head>
37
38
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
39
[% INCLUDE 'installer-doc-head-close.inc' %]
40
<div>
41
    <h1 align="center"> Welcome to Koha</h1>
42
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
43
    <form name="startonboarding" method="post" action="onboarding.pl">
44
    <input type="hidden" name="step" value="0">
45
    <a href="onboarding.pl?setupmyKoha=yes" <button>Set up my koha</button></a>
46
</div>
47
48
<!--Onboarding tool step 1 - Create a new library screen 1-->
49
[% IF (setupmyKoha) %]
50
    <h1 align="left"> New Library</h2>
51
        <form name="LibraryCreation" method="post" action="onboarding.pl">
52
            <fieldset class="rows">
53
                 <input type="hidden" name="step" value="1"/>
54
                 <input type="hidden" name="op" value="add_validate" />
55
                 <input type="hidden" name="op" value="createlibrary"/>
56
                 <ol>
57
                     <li>
58
                        <label for="branchcode" class="required">Library code: </label>
59
                        <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
60
                        <span class="required">Required</span>
61
                    </li>
62
                    <li>
63
                        <label for="branchname" class="required">Name: </label>
64
                        <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="    required" required="required" />
65
                        <span class="required">Required</span>
66
                    </li>
67
                 </ol>
68
             </fieldset>
69
            <fieldset class="action">
70
                <input type="submit" value="Create Library"/>
71
            </fieldset>
72
     </form>
73
[% END %]
74
75
<!--Create a library screen 2-->
76
[% IF (createlibrary) %]
77
    [% IF (library) %]
78
        <!--New Library created-->
79
        <form name="createlibrary" method="post" action="onboarding.pl">
80
            <input type="hidden" name="step" value="1"/>
81
            <input type="hidden" name="op" value="addpatroncategory"/>
82
            <h1 align="left"> New Library</h1>
83
84
            <div>   
85
                 <p> Success: Library created!</p><br>
86
                 <p> To add another library and for more settings, <br>
87
                go to Tools->Administration->Libraries and Groups
88
                </div>
89
                 Next up:
90
                 <input type="submit" value="Add a patron category"/>
91
             </form>
92
         [% ELSE %] <!-- Library not created successfully-->
93
                 <div>
94
                    <p> Library was not successfully created</p>
95
                 </div>
96
         [% END %]
97
    [% END %]
98
99
100
101
102
103
104
105
106
107
108
109
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-1 / +213 lines)
Line 0 Link Here
0
- 
1
<!--Pragmas for using and including packages for create patron category-->
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Price %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
8
[% INCLUDE 'datatables.inc' %]
9
10
11
<head>
12
<title> Add a patron category</title>
13
14
<!--JQuery scripts for create patron category-->
15
<script type="text/javascript">
16
     var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
17
     var MSG_BOTH_ENROLLMENTPERIODS = _("Please choose only one enrollment period setting.");
18
     var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
19
</script>
20
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
21
<style type="text/css">#enrolmentmessage.hint { display : none; }</style>
22
23
</head>
24
25
     [% IF (addpatroncategory) %]
26
         <!--Onboarding tool step 2-Create a patron category screen 1-->........
27
         <div id="doc3" class="yui-t2">
28
            <div id="bd">
29
                <div id="yui-main">
30
                <div class="yui-b">
31
         [% FOR m IN messages %]
32
            <div class="dialog [% m.type %]">
33
                [% SWITCH m.code %]
34
                    [% CASE 'error_on_insert' %]
35
                        An error occurred when inserting this patron category. The patron category might already exist.
36
                    [% CASE 'success_on_insert' %]
37
                         Patron category inserted successfully.
38
                    [% CASE 'already_exists' %]
39
                         This patron category already exists.
40
                    [% CASE %]
41
                        [% m.code %]
42
                    [% END %]
43
            </div>
44
        [% END %]
45
46
        <form id="category_form" action="/cgi-bin/koha/admin/categories.pl" method="post">
47
            <input type="hidden" name="step" value="2"/>
48
            <input type="hidden" name="op" value="add_validate" />
49
            <input type="hidden" name="op" value="addpatroncategory"/>
50
51
            <h1 align="left"> New Patron Category</h2>
52
            <div style="border-width:5px;">
53
                <fieldset class="rows">
54
                     <ol>
55
                        <li>
56
                            <label for="categorycode" class="required">Category code: </label>
57
                            <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" re    quir    ed="required" />
58
                             <span class="required">Required</span>
59
                        </li>
60
61
                        <li>
62
                            <label for="description" class="required">Description: </label>
63
                            <input type="text" name="description" id="description" size="40" maxlength="80" class="required" requ    ired="re    quired" value="[% category.description |html %]" />
64
                            <span class="required">Required</span>
65
                        </li>
66
67
                        <li>
68
                             <label for="overduenoticerequired">Overdue notice required: </label>
69
                             <select name="overduenoticerequired" id="overduenoticerequired">
70
                                [% IF category.overduenoticerequired %]
71
                                    <option value="0">No</option>
72
                                    <option value="1" selected="selected">Yes</option>
73
                                [% ELSE %]
74
                                    <option value="0" selected="selected">No</option>
75
                                    <option value="1">Yes</option>
76
                                [% END %]
77
                            </select>
78
                        </li>
79
80
                        <li>
81
                            <label for="category_type" class="required">Category type: </label>
82
                            <select name="category_type" id="category_type">
83
                                [% UNLESS category %]
84
                                <option value="" selected="selected">Select a category type</option>
85
                                [% ELSE %]
86
                                <option value="">Select a category type</option>
87
                                [% END %]
88
89
                                [% IF category and category.category_type == 'A' %]
90
                                <option value="A" selected="selected">Adult</ option>
91
                                [% ELSE %]
92
                                <option value="A">Adult</option>
93
                                [% END %]
94
95
                                [% IF category and category.category_type == 'C' %]
96
                                <option value="C" selected="selected">Child</ option>
97
                                [% ELSE %]
98
                                <option value="C">Child</option>[% END %]
99
100
                                [% IF category and category.category_type == 'S' %]
101
                                <option value="S" selected="selected">Staff</option>
102
                                [% ELSE %]
103
                                <option value="S">Staff</option>
104
                                [% END %]
105
106
                                [% IF category and category.category_type == 'I' %]
107
                                <option value="I" selected="selected">Organization</option>
108
                                [% ELSE %]
109
                                <option value="I">Organization</option>
110
                                [% END %]
111
112
                                [% IF category and category.category_type == 'P' %]
113
                                <option value="P" selected="selected">Professional</option>
114
                                [% ELSE %]
115
                                <option value="P">Professional</option>
116
                                [% END %]
117
118
                                [% IF category and category.category_type == 'X' %]
119
                                <option value="X" selected="selected">Statistical</option>
120
                                [% ELSE %]
121
                                <option value="X">Statistical</option>
122
                                [% END %]
123
                            </select>
124
                            <span class="required">Required</span>
125
                        </li>
126
127
                        <li>
128
                            <label for="default_privacy">Default privacy: </label>
129
                            <select id="default_privacy" name="default_privacy">
130
                                [% SET default_privacy = 'default' %]
131
                                
132
                                [% IF category %]
133
                                [% SET default_privacy = category.default_privacy %]
134
                                [% END %]
135
                            
136
                                [% SWITCH default_privacy %]
137
                                [% CASE 'forever' %]
138
                                    <option value="default">Default</option>
139
                                    <option value="never">Never</option>
140
                                    <option value="forever" selected="selected">Forever</option>
141
                                [% CASE 'never' %]
142
                                    <option value="default">Default</option>
143
                                    <option value="never" selected="selected">Never</option>
144
                                    <option value="forever">Forever</option>
145
                                [% CASE %]
146
                                    <option value="default" selected="selected">Default</option>
147
                                    <option value="never">Never</option>
148
                                    <option value="forever">Forever</option>
149
                                [% END %]
150
                            </select>
151
                            <span>Controls how long a patrons checkout history is kept for new patrons of this category. "Never"     anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <i>batch_anonymise.pl</i> which should be set up by your system administrator.</span>
152
                        </li>
153
154
                        <li>
155
                             <span class="label">Enrollment period: </span>
156
                             <fieldset>
157
                                <legend>Choose one</legend>
158
                                    <ol>
159
                                         <li>
160
                                             <label for="enrolmentperiod" style="width:6em;">In months: </label>
161
                                             <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperio    d" size="3"     maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
162
                                        </li>
163
                                        <li>
164
                                         <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
165
                                          <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentp    erioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
166
                                        </li>
167
                                    </ol>
168
                            </fieldset>
169
                        </li>
170
171
                        <fieldset class="action">
172
                            <input type="submit" value="Create Patron Category" />
173
                        </fieldset>
174
                    </form>
175
                 [% END %]
176
177
                 [% IF (addpatroncategory) %]
178
                    [% IF (categorycode) %]
179
                     <form name="createpatroncategory" method="post" action="onboarding.pl">...
180
                     <input type="hidden" name="op" value="addpatron"/>
181
                     <h1 align="left"> New patron category</h1>
182
                        <div style="border-width:5px;">.
183
                            <p> Success: Patron category created!</p>
184
                            <p> To add another patron category and for more settings<br>
185
                             go to More->Administration->Patrons & Circulation->Patron Categories</p>
186
                        </div>
187
                        Next up:
188
                        <input type="submit" value="Add a patron">
189
190
                        [% ELSE %]
191
                             <p> Patron category was not successfully created</p>
192
                    [% END %]
193
                [% END %]
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

Return to bug 17855