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

(-)a/installer/onboarding.pl (-13 / +51 lines)
Lines 5-14 use warnings; Link Here
5
use diagnostics;
5
use diagnostics;
6
6
7
7
8
use C4::Koha;
9
#Pragmas for creating library
10
use Modern::Perl;
8
use Modern::Perl;
11
use CGI qw (-utf8);
9
use CGI qw ( -utf8 );
10
use C4::Koha;
12
use C4::Auth;
11
use C4::Auth;
13
use C4::Context;
12
use C4::Context;
14
use C4::Output;
13
use C4::Output;
Lines 18-31 use Koha::Libraries; Link Here
18
use Koha::LibraryCategories;
17
use Koha::LibraryCategories;
19
18
20
19
21
use POSIX;
20
#use POSIX;
22
use C4::Templates;
21
#use C4::Templates;
23
use C4::Languages qw(getAllLanguages getTranslatedLanguages);
22
#use C4::Languages qw(getAllLanguages getTranslatedLanguages);
24
use C4::Installer;
23
#use C4::Installer;
25
use Koha;
24
#use Koha;
26
use installer::install.pl;
27
25
28
#Setting variables from install.pl origin
26
#Setting variables
27
my $input    = new CGI;
29
my $query    = new CGI;
28
my $query    = new CGI;
30
my $step     = $query->param('step');
29
my $step     = $query->param('step');
31
30
Lines 59-69 my $dbh = DBI->connect( Link Here
59
58
60
59
61
60
61
      my $op = $query->param('op');
62
      $template->param('op'=>$op);
63
      warn $op;
64
      if ( $op && $op eq 'finish' ) {
65
         print $query->redirect("/cgi-bin/koha/mainpage.pl");
66
         exit;
67
      }
68
69
62
70
63
#Performing each step of the onboarding tool
71
#Performing each step of the onboarding tool
64
if ( $step && $step == 1 ) {
72
if ( $step && $step == 1 ) {
65
#This is the Initial step of the onboarding tool to create a library 
73
#This is the Initial step of the onboarding tool to create a library 
66
74
75
76
    my $createlibrary = $query->param('createlibrary');
77
    $template->param('createlibrary'=>$createlibrary);
78
67
#store inputted parameters in variables
79
#store inputted parameters in variables
68
    my $branchcode       = $input->param('branchcode');
80
    my $branchcode       = $input->param('branchcode');
69
    my $categorycode     = $input->param('categorycode');
81
    my $categorycode     = $input->param('categorycode');
Lines 126-135 if ( $step && $step == 1 ) { Link Here
126
            $op = 'list';
138
            $op = 'list';
127
    }
139
    }
128
140
129
        if ($op eq 'list'){
130
             print redirect(-url=>'koha/cgi-bin/koha/onboarding/onboarding.cgi?step=2');
131
        }
132
        
141
        
142
}elsif ( $step && $step == 2 ){
143
144
    my $createpatroncategory = $query->param('createpatroncategory');
145
    $template->param('createpatroncategory'=>$createpatroncategory);
146
147
}elsif ( $step && $step == 3 ){
148
149
    my $createpatron = $query->param('createpatron');
150
    $template->param('createpatron'=>$createpatron);
151
152
}elsif ( $step && $step == 4){
153
154
    my $createitemtype = $query->param('createitemtype');
155
    $template->param('createitemtype'=>$createitemtype);
156
157
}elsif ( $step && $step == 5){
158
159
    my $createcirculationrule = $query->param('createcirculationrule');
160
    $template->param('createcirculationrule'=>$createcirculationrule);
161
162
133
}
163
}
134
164
135
165
Lines 138-142 if ( $step && $step == 1 ) { Link Here
138
168
139
169
140
170
171
output_html_with_http_headers $input, $cookie, $template->output;
172
173
174
175
176
177
178
141
179
142
180
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (+2 lines)
Lines 42-47 Link Here
42
                    <li><a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a></li>
42
                    <li><a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a></li>
43
                    [% END %]
43
                    [% END %]
44
                    <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
44
                    <li><a href="/cgi-bin/koha/about.pl">About Koha</a></li>
45
                    <li><a href="/cgi-bin/koha/summary.pl">Summary</a></li>
46
45
                </ul>
47
                </ul>
46
            </li>
48
            </li>
47
        </ul>
49
        </ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt (-2 / +2 lines)
Lines 65-72 function Hide(link) Link Here
65
65
66
66
67
[% IF ( finish ) %]
67
[% IF ( finish ) %]
68
    <h1>Congratulations, installation complete</h1>
68
<h1>Congratulations, installation complete</h1>
69
    <p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">here</a>.</p>
69
<p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">here</a>.</p>
70
[% END %]
70
[% END %]
71
71
72
72
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-2 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
2
[% SET footerjs = 1 %]
3
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha staff client</title>
2
<title>Koha staff client</title>
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage.css" />
3
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage.css" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt (-42 / +34 lines)
Lines 1-8 Link Here
1
2
3
<!--Includes for creating library--> 
1
<!--Includes for creating library--> 
4
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
5
3
4
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
6
6
<head>
7
<head>
7
<title>Welcome &rsaquo; to  &rsaquo; Koha</title>
8
<title>Welcome &rsaquo; to  &rsaquo; Koha</title>
8
9
Lines 35-58 Link Here
35
</script>
36
</script>
36
</head>
37
</head>
37
38
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>
39
<div>
41
    <h1 align="center"> Welcome to Koha</h1>
40
    <h1 align="center"> Welcome to Koha</h1>
42
    <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
41
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
43
    <form name="startonboarding" method="post" action="onboarding.pl">
42
    <h2> We're just going to set up a few things</h2>
44
    <input type="hidden" name="step" value="0">
45
    <a href="onboarding.pl?setupmyKoha=yes" <button>Set up my koha</button></a>
46
</div>
43
</div>
44
 
45
<!--Create a library screen 2-->
46
[% IF (createlibrary) %]
47
        <!--New Library created-->
48
        <form name="createlibrary" method="post" action="onboarding.pl">
49
            <input type="hidden" name="step" value="2"/>
50
            <h1 align="left"> New Library</h1>
47
51
48
<!--Onboarding tool step 1 - Create a new library screen 1-->
52
            <div>   
49
[% IF (setupmyKoha) %]
53
                 <p> Success: Library created!</p>
50
    <h1 align="left"> New Library</h2>
54
                 <p> To add another library and for more settings, <br>
55
                go to Tools->Administration->Libraries and Groups
56
            </div>
57
            Next up:
58
            <input type="submit" value="Add a patron category"/>
59
        </form>
60
        
61
        <!--Implement if statement to determine if library was succesfully created here....-
62
        <div>
63
             <p> Library was not successfully created</p>
64
        </div>
65
        -->
66
[% ELSE %]    
67
68
       <h1 align="left"> New Library</h2>
51
        <form name="LibraryCreation" method="post" action="onboarding.pl">
69
        <form name="LibraryCreation" method="post" action="onboarding.pl">
52
            <fieldset class="rows">
70
            <fieldset class="rows">
53
                 <input type="hidden" name="step" value="1"/>
71
                 <input type="hidden" name="step" value="1"/>
54
                 <input type="hidden" name="op" value="add_validate" />
72
                 <input type="hidden" name="op" value="add_validate" />
55
                 <input type="hidden" name="op" value="createlibrary"/>
73
                 <input type="hidden" name="createlibrary" value="createlibrary"/>
56
                 <ol>
74
                 <ol>
57
                     <li>
75
                     <li>
58
                        <label for="branchcode" class="required">Library code: </label>
76
                        <label for="branchcode" class="required">Library code: </label>
Lines 61-101 Link Here
61
                    </li>
79
                    </li>
62
                    <li>
80
                    <li>
63
                        <label for="branchname" class="required">Name: </label>
81
                        <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" />
82
                        <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
65
                        <span class="required">Required</span>
83
                        <span class="required">Required</span>
66
                    </li>
84
                    </li>
67
                 </ol>
85
                 </ol>
68
             </fieldset>
86
             </fieldset>
69
            <fieldset class="action">
87
             <br>
70
                <input type="submit" value="Create Library"/>
88
             <input type="submit" class="action" value="Next &gt;&gt;"/>
71
            </fieldset>
72
     </form>
89
     </form>
73
[% END %]
90
[% 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
91
100
92
101
93
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt (-150 / +151 lines)
Lines 2-9 Link Here
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Price %]
4
[% USE Price %]
5
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
8
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
9
[% INCLUDE 'installer-doc-head-close.inc' %]
7
[% INCLUDE 'calendar.inc' %]
10
[% INCLUDE 'calendar.inc' %]
8
[% INCLUDE 'datatables.inc' %]
11
[% INCLUDE 'datatables.inc' %]
9
12
Lines 18-197 Link Here
18
     var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
21
     var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
19
</script>
22
</script>
20
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
23
<script type="text/javascript" src="[% themelang %]/js/categories.js"></script>
21
<style type="text/css">#enrolmentmessage.hint { display : none; }</style>
22
24
23
</head>
25
</head>
24
26
25
     [% IF (addpatroncategory) %]
27
<div>
26
         <!--Onboarding tool step 2-Create a patron category screen 1-->........
28
    <h1 align="center"> Welcome to Koha</h1>
27
         <div id="doc3" class="yui-t2">
29
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
28
            <div id="bd">
30
</div>
29
                <div id="yui-main">
31
30
                <div class="yui-b">
32
<!--Create a patron category screen 2-->
31
         [% FOR m IN messages %]
33
[% IF (createpatroncategory) %]
32
            <div class="dialog [% m.type %]">
34
                
33
                [% SWITCH m.code %]
35
     <form name="createpatroncategory" method="post" action="onboarding.pl">
34
                    [% CASE 'error_on_insert' %]
36
             <input type="hidden" name="step" value="3"/>
35
                        An error occurred when inserting this patron category. The patron category might already exist.
37
             <h1 align="left"> New patron category</h1>
36
                    [% CASE 'success_on_insert' %]
38
             <div>
37
                         Patron category inserted successfully.
39
                 <p> Success: Patron category created!</p>
38
                    [% CASE 'already_exists' %]
40
                 <p> To add another patron category and for more settings<br>
39
                         This patron category already exists.
41
                 go to More->Administration->Patrons & Circulation->Patron Categories</p>
40
                    [% CASE %]
42
             </div>
41
                        [% m.code %]
43
             Next up:<br>
42
                    [% END %]
44
             <input type="submit" value="Add a patron">
43
            </div>
45
     </form>
44
        [% END %]
46
45
47
[% ELSE %]
46
        <form id="category_form" action="/cgi-bin/koha/admin/categories.pl" method="post">
48
    <h1 align="left"> New Patron Category</h2>
49
    
50
    <form id="category_form" method="post" action="onboarding.pl">
51
        <fieldset class="rows">        
47
            <input type="hidden" name="step" value="2"/>
52
            <input type="hidden" name="step" value="2"/>
48
            <input type="hidden" name="op" value="add_validate" />
53
            <input type="hidden" name="op" value="add_validate" />
49
            <input type="hidden" name="op" value="addpatroncategory"/>
54
            <input type="hidden" name="createpatroncategory" value="createpatroncategory"/>
50
55
                <ol>
51
            <h1 align="left"> New Patron Category</h2>
56
                    <li>
52
            <div style="border-width:5px;">
57
                        <label for="categorycode" class="required">Category code: </label>
53
                <fieldset class="rows">
58
                        <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
54
                     <ol>
59
                        <span class="required">Required</span>
55
                        <li>
60
                    </li>
56
                            <label for="categorycode" class="required">Category code: </label>
61
57
                            <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" re    quir    ed="required" />
62
                    <li>
58
                             <span class="required">Required</span>
63
                        <label for="description" class="required">Description: </label>
59
                        </li>
64
                        <input type="text" name="description" id="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" />
60
65
                        <span class="required">Required</span>
61
                        <li>
66
                    </li>
62
                            <label for="description" class="required">Description: </label>
67
63
                            <input type="text" name="description" id="description" size="40" maxlength="80" class="required" requ    ired="re    quired" value="[% category.description |html %]" />
68
                    <li>
64
                            <span class="required">Required</span>
69
                        <label for="overduenoticerequired">Overdue notice required: </label>
65
                        </li>
70
                        <select name="overduenoticerequired" id="overduenoticerequired">
66
71
                            [% IF category.overduenoticerequired %]
67
                        <li>
72
                                <option value="0">No</option>
68
                             <label for="overduenoticerequired">Overdue notice required: </label>
73
                                <option value="1" selected="selected">Yes</option>
69
                             <select name="overduenoticerequired" id="overduenoticerequired">
74
                            [% ELSE %]
70
                                [% IF category.overduenoticerequired %]
75
                                <option value="0" selected="selected">No</option>
71
                                    <option value="0">No</option>
76
                                <option value="1">Yes</option>
72
                                    <option value="1" selected="selected">Yes</option>
77
                            [% END %]
73
                                [% ELSE %]
78
                        </select>
74
                                    <option value="0" selected="selected">No</option>
79
                    </li>
75
                                    <option value="1">Yes</option>
80
76
                                [% END %]
81
                    <li>
77
                            </select>
82
                        <label for="category_type" class="required">Category type: </label>
78
                        </li>
83
                        <select name="category_type" id="category_type">
79
84
                            [% UNLESS category %]
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
                                <option value="" selected="selected">Select a category type</option>
85
                                [% ELSE %]
86
                            [% ELSE %]
86
                                <option value="">Select a category type</option>
87
                                <option value="">Select a category type</option>
87
                                [% END %]
88
                            [% END %]
88
89
89
                                [% IF category and category.category_type == 'A' %]
90
                            [% IF category and category.category_type == 'A' %]
90
                                <option value="A" selected="selected">Adult</ option>
91
                                <option value="A" selected="selected">Adult</ option>
91
                                [% ELSE %]
92
                            [% ELSE %]
92
                                <option value="A">Adult</option>
93
                                <option value="A">Adult</option>
93
                                [% END %]
94
                            [% END %]
94
95
95
                                [% IF category and category.category_type == 'C' %]
96
                            [% IF category and category.category_type == 'C' %]
96
                                <option value="C" selected="selected">Child</ option>
97
                                <option value="C" selected="selected">Child</ option>
97
                                [% ELSE %]
98
                            [% ELSE %]
98
                                <option value="C">Child</option>[% END %]
99
                                <option value="C">Child</option>
100
                            [% END %]
99
101
100
                                [% IF category and category.category_type == 'S' %]
102
                            [% IF category and category.category_type == 'S' %]
101
                                <option value="S" selected="selected">Staff</option>
103
                                <option value="S" selected="selected">Staff</option>
102
                                [% ELSE %]
104
                            [% ELSE %]
103
                                <option value="S">Staff</option>
105
                                <option value="S">Staff</option>
104
                                [% END %]
106
                            [% END %]
105
107
106
                                [% IF category and category.category_type == 'I' %]
108
                            [% IF category and category.category_type == 'I' %]
107
                                <option value="I" selected="selected">Organization</option>
109
                                <option value="I" selected="selected">Organization</option>
108
                                [% ELSE %]
110
                            [% ELSE %]
109
                                <option value="I">Organization</option>
111
                                <option value="I">Organization</option>
110
                                [% END %]
112
                            [% END %]
111
113
112
                                [% IF category and category.category_type == 'P' %]
114
                            [% IF category and category.category_type == 'P' %]
113
                                <option value="P" selected="selected">Professional</option>
115
                                <option value="P" selected="selected">Professional</option>
114
                                [% ELSE %]
116
                            [% ELSE %]
115
                                <option value="P">Professional</option>
117
                                <option value="P">Professional</option>
116
                                [% END %]
118
                            [% END %]
117
119
118
                                [% IF category and category.category_type == 'X' %]
120
                            [% IF category and category.category_type == 'X' %]
119
                                <option value="X" selected="selected">Statistical</option>
121
                                <option value="X" selected="selected">Statistical</option>
120
                                [% ELSE %]
122
                            [% ELSE %]
121
                                <option value="X">Statistical</option>
123
                                <option value="X">Statistical</option>
122
                                [% END %]
124
                            [% END %]
123
                            </select>
125
                        </select>
124
                            <span class="required">Required</span>
126
                        <span class="required">Required</span>
125
                        </li>
127
                    </li>
126
128
127
                        <li>
129
                    <li>
128
                            <label for="default_privacy">Default privacy: </label>
130
                        <label for="default_privacy">Default privacy: </label>
129
                            <select id="default_privacy" name="default_privacy">
131
                        <select id="default_privacy" name="default_privacy" required="required">
130
                                [% SET default_privacy = 'default' %]
132
                            [% SET default_privacy = 'default' %]
131
                                
133
132
                                [% IF category %]
134
                            [% IF category %]
133
                                [% SET default_privacy = category.default_privacy %]
135
                            [% SET default_privacy = category.default_privacy %]
134
                                [% END %]
136
                            [% END %]
135
                            
137
136
                                [% SWITCH default_privacy %]
138
                            [% SWITCH default_privacy %]
137
                                [% CASE 'forever' %]
139
                            [% CASE 'forever' %]
138
                                    <option value="default">Default</option>
140
                                <option value="default">Default</option>
139
                                    <option value="never">Never</option>
141
                                <option value="never">Never</option>
140
                                    <option value="forever" selected="selected">Forever</option>
142
                                <option value="forever" selected="selected">Forever</option>
141
                                [% CASE 'never' %]
143
                            [% CASE 'never' %]
142
                                    <option value="default">Default</option>
144
                                <option value="default">Default</option>
143
                                    <option value="never" selected="selected">Never</option>
145
                                <option value="never" selected="selected">Never</option>
144
                                    <option value="forever">Forever</option>
146
                                <option value="forever">Forever</option>
145
                                [% CASE %]
147
                            [% CASE %]
146
                                    <option value="default" selected="selected">Default</option>
148
                                <option value="default" selected="selected">Default</option>
147
                                    <option value="never">Never</option>
149
                                <option value="never">Never</option>
148
                                    <option value="forever">Forever</option>
150
                                <option value="forever">Forever</option>
149
                                [% END %]
151
                            [% END %]
150
                            </select>
152
                        </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>
153
                        <p>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.</p>
152
                        </li>
154
                    </li>
153
155
154
                        <li>
156
            <span class="label">Enrollment period: </span>
155
                             <span class="label">Enrollment period: </span>
157
                    <fieldset>
156
                             <fieldset>
158
                        <legend>Choose one</legend>
157
                                <legend>Choose one</legend>
159
                            <ol>
158
                                    <ol>
160
                                <li>
159
                                         <li>
161
                                    <label for="enrolmentperiod" style="width:6em;">In months: </label>
160
                                             <label for="enrolmentperiod" style="width:6em;">In months: </label>
162
                                    <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperio    d" size="3"     maxlength="1" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
161
                                             <input type="text" class="enrollmentperiod" name="enrolmentperiod" id="enrolmentperio    d" size="3"     maxlength="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> months
163
                                </li>
162
                                        </li>
164
                                <li>
163
                                        <li>
165
                                    <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
164
                                         <label for="enrolmentperioddate" style="width:6em;">Until date: </label>
166
                                    <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentp    erioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
165
                                          <input type="text" class="enrollmentperiod" name="enrolmentperioddate" id="enrolmentp    erioddate" value="[% category.enrolmentperioddate | $KohaDates %]" />
167
                                </li>
166
                                        </li>
168
                            </ol>
167
                                    </ol>
169
                     </fieldset>
168
                            </fieldset>
170
                     <br>
169
                        </li>
171
                    <input type="submit" class="action" value="Create Patron Category" />
170
172
    </form>
171
                        <fieldset class="action">
173
[% END %]
172
                            <input type="submit" value="Create Patron Category" />
174
            
173
                        </fieldset>
175
                    
174
                    </form>
176
        <!--Onboarding tool step 2-Create a patron category screen 1
175
                 [% END %]
177
         <div id="doc3" class="yui-t2">
176
178
            <div id="bd">
177
                 [% IF (addpatroncategory) %]
179
                <div id="yui-main">
178
                    [% IF (categorycode) %]
180
                <div class="yui-b">
179
                     <form name="createpatroncategory" method="post" action="onboarding.pl">...
181
         [% FOR m IN messages %]
180
                     <input type="hidden" name="op" value="addpatron"/>
182
            <div class="dialog [% m.type %]">
181
                     <h1 align="left"> New patron category</h1>
183
                [% SWITCH m.code %]
182
                        <div style="border-width:5px;">.
184
                    [% CASE 'error_on_insert' %]
183
                            <p> Success: Patron category created!</p>
185
                        An error occurred when inserting this patron category. The patron category might already exist.
184
                            <p> To add another patron category and for more settings<br>
186
                    [% CASE 'success_on_insert' %]
185
                             go to More->Administration->Patrons & Circulation->Patron Categories</p>
187
                         Patron category inserted successfully.
186
                        </div>
188
                    [% CASE 'already_exists' %]
187
                        Next up:
189
                         This patron category already exists.
188
                        <input type="submit" value="Add a patron">
190
                    [% CASE %]
189
191
                        [% m.code %]
190
                        [% ELSE %]
191
                             <p> Patron category was not successfully created</p>
192
                    [% END %]
192
                    [% END %]
193
                [% END %]
193
            </div>
194
194
        [% END %]
195
</body>-->
195
196
196
197
197
198
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt (+122 lines)
Line 0 Link Here
1
<!--Includes for creating patron--> 
2
[% INCLUDE 'doc-head-open.inc' %]
3
4
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
6
7
<head>
8
<title>Create Patron</title>
9
10
<!--jQuery scripts for creating patron-->
11
12
13
14
</head>
15
16
<div>
17
    <h1 align="center"> Welcome to Koha</h1>
18
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
19
</div>
20
 
21
<!--Create a patron screen 2-->
22
[% IF (createpatron) %]
23
        <!--New patron created-->
24
        <form name="createpatron" method="post" action="onboarding.pl">
25
            <input type="hidden" name="step" value="4"/>
26
            <h1 align="left"> New Patron </h1>
27
28
            <div>   
29
                 <p> Success: New patron created!</p>
30
                 <p> To create another patron, go to Patrons > New Patron. <br>
31
                More > Set Permissions in a user page to gain superlibrarian permissions.
32
                </div>
33
                 Next up:
34
                 <input type="submit" value="Add an item type"/>
35
        </form>
36
                 <div>
37
                    <p> Oh no! Patron was not created</p>
38
                </div>
39
[% ELSE %]    
40
<!--Create a patron screen 1-->
41
       <h1 align="left"> New Patron </h2>
42
        <form name="PatronCreation" method="post" action="onboarding.pl">
43
            <fieldset class="rows">
44
                 <input type="hidden" name="step" value="3"/>
45
                 <input type="hidden" name="op" value="add_validate" />
46
                 <input type="hidden" name="createpatron" value="createpatron"/>
47
                    <ol>
48
                    <h3>Patron Identity</h3> 
49
                        <li>
50
                            <label for="surname" class="required">Surname: </label>
51
                            <input type="text" name="surname" id="surname" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
52
                            <span class="required">Required</span>
53
                        </li>
54
                        <li>
55
                            <label for="firstname" class="required">First Name: </label>
56
                            <input type="text" name="firstname" id="firstname" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
57
                            <span class="required">Required</span>
58
                        </li>
59
                    </ol>
60
                    <ol>
61
                    <h3>Library Management</h3>
62
                        <li>
63
                            <label for="cardnum" class="required">Card Number: </label>
64
                            <input type="text" name="cardnum" id="cardnum" size="10" maxlength="20" value="/" class="required" required="required">
65
                            <span class="required">Required</span>
66
                        </li>
67
                        <li>
68
                         <div class="dropdown">
69
                           <button onclick="myFunction()" class="dropbtn">Library: </button>
70
                             <div id="myDropdown" class="dropdown-content">
71
                                <a href="#">Centreville</a>
72
                                <a href="#">Centre City</a>
73
                                <a href="#">Centre of the Earth</a>
74
                              </div>
75
                            </div>
76
                        </li>
77
                        <li>
78
                         <div class="dropdown">
79
                           <button onclick="myFunction()" class="dropbtn">Category: </button>
80
                             <div id="myDropdown" class="dropdown-content">
81
                                <a href="#">Adult</a>
82
                                <a href="#">Infant</a>
83
                                <a href="#">Pet Horse</a>
84
                              </div>
85
                            </div>
86
                        </li> 
87
                    </ol>
88
                     <ol>
89
                    <h3>OPAC/Staff Login</h3> 
90
                        <li>
91
                            <label for="username" class="required">Username: </label>
92
                            <input type="text" name="username" id="username" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
93
                            <span class="required">Required</span>
94
                        </li>
95
                        <li>
96
                            <label for="password" class="required">Password: </label>
97
                            <input type="password" name="password" id="password" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
98
                            <span class="required">Required</span>
99
                        </li>
100
                        <li>
101
                            <label for="password" class="required">Confirm password: </label>
102
                            <input type="password" name="password" id="password" size="80" value="[% library.branchname |html %]" class="    required" required="required" style="width:200px;">
103
                            <span class="required">Required</span>
104
                        </li>
105
                    </ol>
106
             </fieldset>
107
            <fieldset>
108
                <input type="submit" class="action" value="Submit"/>
109
            </fieldset>
110
     </form>
111
[% END %]        
112
113
114
115
116
117
118
119
120
121
122
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt (+79 lines)
Line 0 Link Here
1
<!--Includes for creating item type--> 
2
[% INCLUDE 'doc-head-open.inc' %]
3
4
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
6
7
<head>
8
<title>Create item type</title>
9
10
<!--jQuery scripts for creating item type-->
11
12
13
14
</head>
15
16
<div>
17
    <h1 align="center"> Welcome to Koha</h1>
18
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
19
</div>
20
 
21
<!--Create a item type screen 2-->
22
[% IF (createitemtype) %]
23
        <!--New item type created-->
24
        <form name="createitemtype" method="post" action="onboarding.pl">
25
            <input type="hidden" name="step" value="5"/>
26
            <input type="hidden" name="step" value="1"/>
27
            <h1 align="left"> New Item type </h1>
28
29
            <div>   
30
                 <p> Success: New item type created!</p>
31
                 <p> To create another item type later and for more setttings <br>
32
                 go to More->Administration->Item types 
33
            </div>
34
                 Next up:
35
                 <input type="submit" value="Add an circulation rule"/>
36
                 <br>
37
                 Or:
38
                 <input type="submit" value="Return to Home"/>
39
        </form>
40
            <div>
41
                  <p> Oh no! Patron was not created</p>
42
            </div>
43
[% ELSE %]    
44
<!--Create a item type screen 1-->
45
       <h1 align="left"> New Item type </h2>
46
        <form name="ItemTypeCreation" method="post" action="onboarding.pl">
47
            <fieldset class="rows">
48
                 <input type="hidden" name="step" value="4"/>
49
                 <input type="hidden" name="op" value="add_validate" />
50
                 <input type="hidden" name="createitemtype" value="createitemtype"/>
51
                    <ol>
52
                        <li>
53
                            <label for="itemtype" class="required">Item type: </label>
54
                            <input type="text" name="surname" id="surname" size="10" maxlength="10" value="" class="required" required="required" />
55
                            <span class="required">Required</span>
56
                        </li>
57
                        <li>
58
                            <label for="description" class="required">Description: </label>
59
                            <input type="text" name="firstname" id="firstname" size="80" value="" class="required" required="required" style="width:200px;">
60
                            <span class="required">Required</span>
61
                        </li>
62
                    </ol>
63
            </fieldset>
64
            <fieldset>
65
                <input type="submit" class="action" value="Submit"/>
66
            </fieldset>
67
     </form>
68
[% END %]        
69
70
71
72
73
74
75
76
77
78
79
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt (+251 lines)
Line 0 Link Here
1
<!--Includes for creating circulation rule--> 
2
[% INCLUDE 'doc-head-open.inc' %]
3
4
[% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
5
[% INCLUDE 'installer-doc-head-close.inc' %]
6
7
<head>
8
<title>Create Circulation rule</title>
9
10
<!--jQuery scripts for creating circulation rule-->
11
12
13
14
</head>
15
16
<div>
17
    <h1 align="center"> Welcome to Koha</h1>
18
    <h1 id="logo"><img alt="Koha" style="width:50%;margin:auto;display:block;align:center;"  src="[% interface %]/[% theme %]/img/koha.org-logo.gif"/></h1>
19
</div>
20
21
[% IF (finish) %]
22
<h1>Congratulations you have finished and ready to use Koha</h1>
23
<a href="/cgi-bin/koha/mainpage.pl">Start using Koha</a>
24
25
[% END %]
26
27
<!--Create a circulation rule screen 2-->
28
[% IF (createcirculationrule) %]
29
        <!--New circulation rule created-->
30
        <form name="finish" method="post" action="onboarding.pl">
31
              <input type="hidden" name="op" value="finish" />
32
33
            <h1 align="left"> New Item type </h1>
34
35
            <div>   
36
                 <p> Success: New circulation rule created!</p>
37
                 <p> To create circulation rule, go to <br>
38
                 More->Administration->Circulation and Fine Rules 
39
            </div>
40
                 Next up:
41
                 <input type="submit" name="op" value="finish"/>
42
        </form>
43
            <div>
44
                  <p> Oh no! Circulation Rule was not created</p>
45
            </div>
46
47
48
[% ELSE %]    
49
<!--Create a circulation rule screen 1-->
50
       <h1 align="left"> New Circulation rule </h2>
51
        <form name="CirculationRuleCreation" method="post" action="onboarding.pl">
52
            <fieldset class="rows">
53
                 <input type="hidden" name="step" value="5"/>
54
                 <input type="hidden" name="op" value="add_validate" />
55
                 <input type="hidden" name="createcirculationrule" value="createcirculationrule"/>
56
                    <ol>
57
                        <li>
58
                             <label for="patron_category" class="required">Patron Category: </label>
59
                             <select name="patron_category" id="patron_category">
60
                                 [% UNLESS category %]
61
                                     <option value="" selected="selected">Select a patron category type</option>
62
                                 [% ELSE %]
63
                                     <option value="">Select a patron category type</option>
64
                                 [% END %]
65
66
                                 [% IF category and category.category_type == 'A' %]
67
                                    <option value="A" selected="selected">Adult</option>
68
                                 [% ELSE %]
69
                                    <option value="A">Adult</option>
70
                                 [% END %]
71
72
                                 [% IF category and category.category_type == 'C' %]
73
                                    <option value="C" selected="selected">Child</option>
74
                                 [% ELSE %]
75
                                    <option value="C">Child</option>
76
                                 [% END %]
77
78
                                 [% IF category and category.category_type == 'S' %]
79
                                    <option value="S" selected="selected">Staff</option>
80
                                 [% ELSE %]
81
                                    <option value="S">Staff</option>
82
                                 [% END %]
83
84
                                 [% IF category and category.category_type == 'I' %]
85
                                    <option value="I" selected="selected">Organization</option>
86
                                 [% ELSE %]
87
                                    <option value="I">Organization</option>
88
                                 [% END %]
89
90
                                 [% IF category and category.category_type == 'P' %]
91
                                    <option value="P" selected="selected">Professional</option>
92
                                 [% ELSE %]
93
                                    <option value="P">Professional</option>
94
                                 [% END %]
95
96
                                 [% IF category and category.category_type == 'X' %]
97
                                    <option value="X" selected="selected">Statistical</option>
98
                                 [% ELSE %]
99
                                    <option value="X">Statistical</option>
100
                                 [% END %]
101
                            </select>
102
                        <span class="required">Required</span>
103
                    </li>
104
105
                    <li>
106
                        <label for="item_type"> Item type: </label>
107
                        <select id="item_type" name="item_type" required="required">
108
                              [% UNLESS item_type %]
109
                                 <option value="" selected="selected">Select a item type</option>
110
                              [% ELSE %]
111
                                 <option value="">Select a category type</option>
112
                              [% END %]
113
114
                              [% IF item_type and item.item_type == 'Books' %]
115
                                <option value="Books" selected="selected">Books</option>
116
                              [% ELSE %]
117
                                <option value="Books">Books</option>
118
                              [% END %]
119
120
                              [% IF item_type and item.item_type == 'Computer Files' %]
121
                                <option value="Computer Files" selected="selected">Computer Files</option>
122
                              [% ELSE %]
123
                                <option value="Computer Files">Computer Files</option>
124
                              [% END %]
125
126
                              [% IF item_type and item.item_type == 'Continuing Resources' %]
127
                                <option value="Continuing Resources" selected="selected">Continuing Resources</option>
128
                              [% ELSE %]
129
                                <option value="Continuing Resources">Continuing Resources</option>
130
                              [% END %]
131
132
                              [% IF item_type and item.item_type == 'Maps' %]
133
                                <option value="Maps" selected="selected">Maps</option>
134
                              [% ELSE %]
135
                                <option value="Maps">Maps</option>
136
                              [% END %]
137
138
                              [% IF item_type and item.item_type == 'Mixed Materials' %]
139
                                <option value="Mixed Materials" selected="selected">Mixed Materials</option>
140
                              [% ELSE %]
141
                                <option value="Mixed Materials">Mixed Materials</option>
142
                              [% END %]
143
144
                              [% IF item_type and item.item_type == 'Music' %]
145
                                <option value="Music" selected="selected">Music</option>
146
                              [% ELSE %]
147
                                <option value="Music">Music</option>
148
                              [% END %]
149
150
                              [% IF item_type and item.item_type == 'Reference' %]
151
                                <option value="Reference" selected="selected">Reference</option>
152
                              [% ELSE %]
153
                                <option value="Reference">Reference</option>
154
                              [% END %]
155
156
                              [% IF item_type and item.item_type == 'Visual Materials' %]
157
                                <option value="Visual Materials" selected="selected">Visual Materials</option>
158
                              [% ELSE %]
159
                                <option value="Visual Materials">Visual Materials</option>
160
                              [% END %]
161
                            </select>
162
                            <span class="required"> Required</span>
163
                        </li>
164
165
                        <li>
166
                            <label for="currentcheckoutsallowed" class="required">Current checkouts allowed: </label>
167
                            <input type="text" name="currentcheckoutsallowed" id="currentcheckoutsallowed" size="10" maxlength="10" value="" class="required" required="required" />
168
                            <span class="required">Required</span>
169
                        </li>
170
                        
171
                        <li>
172
                             <label for="loanperiod" class="required">Loan Period: </label>
173
                             <input type="text" name="loanperiod" id="loanperiod" size="10" maxlength="10" value="" class="required" required="required" />
174
                              <span class="required">Required</span>
175
                        </li>
176
177
                        <li>
178
                            <label for="units">Units: </label>
179
                            <select name="units" id="units">
180
                                   [% SET units = 'days' %]
181
182
                                   [% IF category %] <!--Check  if category is the correct value name in the context of units of days that a loan period is for in the item borrowing script-->
183
                                   [% SET default_privacy = category.default_privacy %]
184
                                   [% END %]
185
186
                                   [% SWITCH units %]
187
                                   [% CASE 'days' %]
188
                                     <option value="days" selected="selected">Days</option>
189
                                     <option value="hours">Hours</option>
190
                                   [% CASE 'hours' %]
191
                                     <option value="days">Days</option>
192
                                     <option value="hours" selected="selected">Hours</option>
193
                                   [% END %]
194
                            </select>
195
                        </li>
196
197
                        <li>
198
                             <label for="renewalsallowed" class="required">Renewals Allowed: </label>
199
                             <input type="text" name="renewalsallowed" id="renewalsallowed" size="10" maxlength="10" value="" class="required" required="required" />
200
                              <span class="required">Required</span>
201
                        </li>
202
203
                         <li>
204
                             <label for="renewalperiod" class="required">Renewals Period: </label>
205
                             <input type="text" name="renewalperiod" id="renewalperiod" size="10" maxlength="10" value="" class="required" required="required" />
206
                              <span class="required">Required</span>
207
                        </li>
208
209
                         <li>
210
                            <label for="onshelfholds">On shelf holds allowed: </label>
211
                            <select name="onshelfholds" id="onshelfholds">
212
                                   [% SET onshelfholdsallowed = 'yes' %]
213
214
                                   [% IF category %]
215
                                   [% SET onshelfholdsallowed = category.onshelfholdsallowed %]
216
                                   [% END %]
217
218
                                   [% SWITCH onshelfholdsallowed %]
219
                                   [% CASE 'yes' %]
220
                                     <option value="yes" selected="selected">Yes</option>
221
                                     <option value="anyunavailable">If any unavailable</option>
222
                                     <option value="allunavailable">If all unavailable</option>
223
                                   [% CASE 'anyunavailable' %]
224
                                     <option value="yes">Yes</option>
225
                                     <option value="anyunavailable" selected="selected">If any unavailable</option>
226
                                     <option value="allunavailable">If all unavailable</option>
227
                                   [% CASE 'allunavailable' %]
228
                                     <option value="yes">Yes</option>
229
                                     <option value="anyunavailable">If any unavailable</option>
230
                                     <option value="allunavailable" selected="selected">If all unavailable</option>
231
                                   [% END %]
232
                            </select>
233
                        </li>
234
                    </ol>
235
            </fieldset>
236
            <fieldset>
237
                <input type="submit" class="action" value="Submit"/>
238
            </fieldset>
239
     </form>
240
[% END %]        
241
242
243
244
245
246
247
248
249
250
251
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt (+41 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha Tutorial Summary</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
</head>
6
<body id="admin_admin-home" class="admin">
7
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'cat-search.inc' %]
9
10
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Summary</div>
11
12
<div id="doc" class="yui-t7">
13
    <div id="bd">
14
        <div id="yui-main" class="sysprefs">
15
            <div class="yui-g"><h1>Tutorial Summary Page</h1></div>
16
            <fieldset>
17
            <h2>Library</h2>
18
            <p> To add another library and for more settings, go to </br>
19
            More > Administration > Libraries and Groups </p>
20
21
            <h2>Patron Category</h2>
22
            <p>To add another patron category and for more settings, go to</br>
23
            More > Administration > Patrons and Circulation > Patron Categories</p>
24
25
            <h2>Patron</h2>
26
            <p>To create another patron, go to Patrons > New Patron. To set the </br>
27
            permissions of the patron, go to the patron's page and More > Set Permissions</p>
28
29
            <h2>Item Type</h2>
30
            <p>To create another item type and for more settings, go to</br>
31
            More > Administration > Item types </p>
32
33
            <h2>Circulation Rule</h2>
34
            <p>To create another circulation rule, go to </br>
35
            More > Administration > Circulation and Fine Rules</p<
36
            </fieldset> 
37
38
        </div>
39
    </div>
40
</div>
41
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/summary.pl (-1 / +58 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright Pat Eyler 2003
4
# Copyright Biblibre 2006
5
# Parts Copyright Liblime 2008
6
# Parts Copyright Chris Nighswonger 2010
7
#
8
# This file is part of Koha.
9
#
10
# Koha is free software; you can redistribute it and/or modify it
11
# under the terms of the GNU General Public License as published by
12
# the Free Software Foundation; either version 3 of the License, or
13
# (at your option) any later version.
14
#
15
# Koha is distributed in the hope that it will be useful, but
16
# WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
# GNU General Public License for more details.
19
#
20
# You should have received a copy of the GNU General Public License
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
23
use Modern::Perl;
24
25
use CGI qw ( -utf8 );
26
use List::MoreUtils qw/ any /;
27
use LWP::Simple;
28
use XML::Simple;
29
use Config;
30
31
use C4::Output;
32
use C4::Auth;
33
use C4::Context;
34
use C4::Installer;
35
36
use Koha;
37
use Koha::Acquisition::Currencies;
38
use Koha::Patrons;
39
use Koha::Caches;
40
use Koha::Config::SysPrefs;
41
use C4::Members::Statistics;
42
43
#use Smart::Comments '####';
44
45
my $query = new CGI;
46
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
47
    {
48
        template_name   => "summary.tt",
49
        query           => $query,
50
        type            => "intranet",
51
        authnotrequired => 0,
52
        flagsrequired   => { catalogue => 1 },
53
        debug           => 1,
54
    }
55
);
56
57
58
output_html_with_http_headers $query, $cookie, $template->output;

Return to bug 17855