Skip to content

Commit f612f1e

Browse files
author
filip
committed
Fixed code formatting to tabs
1 parent 06697fd commit f612f1e

File tree

10 files changed

+95
-94
lines changed

10 files changed

+95
-94
lines changed

interface/web/help/faq_delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
// Check module permissions
1212
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
13-
header('Location: ../index.php');
14-
die;
13+
header('Location: ../index.php');
14+
die;
1515
}
1616

1717
// Load the form

interface/web/help/faq_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
// Check the module permissions and redirect if not allowed.
1111
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
12-
header('Location: ../index.php');
13-
die;
12+
header('Location: ../index.php');
13+
die;
1414
}
1515

1616
// Load the templating and form classes
@@ -20,7 +20,7 @@
2020
// Create a class page_action that extends the tform_actions base class
2121
class page_action extends tform_actions {
2222

23-
//* Customisations for the page actions will be defined here
23+
//* Customisations for the page actions will be defined here
2424

2525
}
2626

interface/web/help/faq_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
// Check the module permissions
1010
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
11-
header('Location: ../index.php');
12-
die();
11+
header('Location: ../index.php');
12+
die();
1313
}
1414

1515
// Loading the class

interface/web/help/faq_sections_delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
// Check module permissions
1212
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
13-
header('Location: ../index.php');
14-
die;
13+
header('Location: ../index.php');
14+
die;
1515
}
1616

1717
// Load the form

interface/web/help/faq_sections_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
// Check the module permissions and redirect if not allowed.
1111
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
12-
header('Location: ../index.php');
13-
die;
12+
header('Location: ../index.php');
13+
die;
1414
}
1515

1616
// Load the templating and form classes
@@ -20,7 +20,7 @@
2020
// Create a class page_action that extends the tform_actions base class
2121
class page_action extends tform_actions {
2222

23-
//* Customisations for the page actions will be defined here
23+
//* Customisations for the page actions will be defined here
2424

2525
}
2626

interface/web/help/faq_sections_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
// Check the module permissions
1010
if(!stristr($_SESSION['s']['user']['modules'],'help')) {
11-
header('Location: ../index.php');
12-
die();
11+
header('Location: ../index.php');
12+
die();
1313
}
1414

1515
// Loading the class

interface/web/help/form/faq.tform.php

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -49,56 +49,57 @@
4949
// The form definition of the first tab. The name of the tab is called 'message'. We refer
5050
// to this name in the $form['tab_default'] setting above.
5151
$form['tabs']['message'] = array(
52-
'title' => 'FAQ', // Title of the Tab
53-
'width' => 100, // Tab width
54-
'template' => 'templates/faq_edit.htm', // Template file name
55-
'fields' => array(
52+
'title' => 'FAQ', // Title of the Tab
53+
'width' => 100, // Tab width
54+
'template' => 'templates/faq_edit.htm', // Template file name
55+
'fields' => array(
5656

5757
//*** BEGIN Datatable columns **********************************
5858

59-
'hf_section' => array (
60-
'datatype' => 'INTEGER',
61-
'formtype' => 'SELECT',
62-
'default' => '',
63-
'datasource' => array ( 'type' => 'SQL',
64-
'querystring' => 'SELECT hfs_id,hfs_name FROM help_faq_sections',
65-
'keyfield' => 'hfs_id',
66-
'valuefield' => 'hfs_name'
67-
),
68-
'validators' => array ( 0 => array ( 'type' => 'ISINT',
69-
'errmsg'=> 'recipient_id_is_not_integer'),
70-
),
71-
'value' => ($_SESSION['s']['user']['typ'] != 'admin')?array(1 => 'Administrator'):''
72-
),
73-
74-
'hf_question' => array(
75-
'datatype' => 'VARCHAR',
76-
'formtype' => 'TEXT',
77-
'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
78-
'errmsg'=> 'subject_is_empty'
79-
),
80-
),
81-
'default' => '',
82-
'value' => '',
83-
'width' => '30',
84-
'maxlength' => '255'
85-
),
86-
87-
'hf_answer' => array(
88-
'datatype' => 'TEXT',
89-
'formtype' => 'TEXTAREA',
90-
'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
91-
'errmsg'=> 'message_is_empty'
92-
),
93-
),
94-
'default' => '',
95-
'value' => '',
96-
'cols' => '30',
97-
'rows' => '10',
98-
'maxlength' => '255'
99-
),
100-
101-
//*** END Datatable columns **********************************
59+
'hf_section' => array (
60+
'datatype' => 'INTEGER',
61+
'formtype' => 'SELECT',
62+
'default' => '',
63+
'datasource' => array ( 'type' => 'SQL',
64+
'querystring' => 'SELECT hfs_id,hfs_name FROM help_faq_sections',
65+
'keyfield' => 'hfs_id',
66+
'valuefield' => 'hfs_name'
67+
),
68+
'validators' => array ( 0 => array (
69+
'type' => 'ISINT',
70+
'errmsg'=> 'recipient_id_is_not_integer'),
71+
),
72+
'value' => ($_SESSION['s']['user']['typ'] != 'admin')?array(1 => 'Administrator'):''
73+
),
74+
75+
'hf_question' => array(
76+
'datatype' => 'VARCHAR',
77+
'formtype' => 'TEXT',
78+
'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
79+
'errmsg'=> 'subject_is_empty'
80+
),
81+
),
82+
'default' => '',
83+
'value' => '',
84+
'width' => '30',
85+
'maxlength' => '255'
86+
),
87+
88+
'hf_answer' => array(
89+
'datatype' => 'TEXT',
90+
'formtype' => 'TEXTAREA',
91+
'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
92+
'errmsg' => 'message_is_empty'
93+
),
94+
),
95+
'default' => '',
96+
'value' => '',
97+
'cols' => '30',
98+
'rows' => '10',
99+
'maxlength' => '255'
100+
),
101+
102+
//*** END Datatable columns **********************************
102103
)
103104
);
104105
?>

interface/web/help/form/faq_sections.tform.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,26 @@
4949
// The form definition of the first tab. The name of the tab is called 'message'. We refer
5050
// to this name in the $form['tab_default'] setting above.
5151
$form['tabs']['message'] = array(
52-
'title' => 'FAQ', // Title of the Tab
53-
'width' => 100, // Tab width
54-
'template' => 'templates/faq_sections_edit.htm', // Template file name
55-
'fields' => array(
56-
57-
//*** BEGIN Datatable columns **********************************
58-
59-
'hfs_name' => array(
60-
'datatype' => 'VARCHAR',
61-
'formtype' => 'TEXT',
62-
'validators' => array( 0 => array( 'type' => 'NOTEMPTY',
63-
'errmsg'=> 'subject_is_empty'
64-
),
65-
),
66-
'default' => '',
67-
'value' => '',
68-
'width' => '30',
69-
'maxlength' => '255'
70-
),
71-
//*** END Datatable columns **********************************
52+
'title' => 'FAQ', // Title of the Tab
53+
'width' => 100, // Tab width
54+
'template' => 'templates/faq_sections_edit.htm', // Template file name
55+
'fields' => array(
56+
57+
//*** BEGIN Datatable columns **********************************
58+
59+
'hfs_name' => array(
60+
'datatype' => 'VARCHAR',
61+
'formtype' => 'TEXT',
62+
'validators'=> array( 0 => array( 'type' => 'NOTEMPTY',
63+
'errmsg'=> 'subject_is_empty'
64+
),
65+
),
66+
'default' => '',
67+
'value' => '',
68+
'width' => '30',
69+
'maxlength' => '255'
70+
),
71+
//*** END Datatable columns *********************************
7272
)
7373
);
7474
?>

interface/web/help/lib/module.conf.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,27 @@
4646
$itemsfaq = array();
4747
//* admin's tools
4848
if($_SESSION['s']['user']['typ'] == 'admin') {
49-
$itemsfaq[] = array( 'title' => 'Add a Question & Answer Pair',
50-
'target' => 'content',
51-
'link' => 'help/faq_edit.php');
52-
$itemsfaq[] = array( 'title' => 'Manage Sections',
53-
'target' => 'content',
54-
'link' => 'help/faq_sections_list.php');
49+
$itemsfaq[] = array( 'title' => 'Add a Question & Answer Pair',
50+
'target' => 'content',
51+
'link' => 'help/faq_edit.php');
52+
$itemsfaq[] = array( 'title' => 'Manage Sections',
53+
'target' => 'content',
54+
'link' => 'help/faq_sections_list.php');
5555
}
5656
$sql = "SELECT * FROM help_faq_sections";
5757
$res = $app->db->queryAllRecords($sql);
5858
//* all the content sections
5959
if(is_array($res)) {
6060
foreach($res as $v) {
61-
$itemsfaq[] = array( 'title' => $v['hfs_name'],
62-
'target' => 'content',
63-
'link' => 'help/faq_list.php?hfs_id='.$v['hfs_id']);
61+
$itemsfaq[] = array( 'title' => $v['hfs_name'],
62+
'target' => 'content',
63+
'link' => 'help/faq_list.php?hfs_id='.$v['hfs_id']);
6464
}
6565
}
6666

67-
$module['nav'][] = array( 'title' => 'FAQ',
68-
'open' => 1,
69-
'items' => $itemsfaq);
67+
$module['nav'][] = array( 'title' => 'FAQ',
68+
'open' => 1,
69+
'items' => $itemsfaq);
7070
//* -- end of the FAQ menu section
7171

7272

interface/web/help/templates/help_faq_sections_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2>{tmpl_var name="faq_faq_sections_txt"}</h2>
1212
<div class="pnl_listarea">
1313
<fieldset><legend><tmpl_var name="faq_sections_txt"></legend>
1414
<table class="list">
15-
<thead>
15+
<thead>
1616
<tr>
1717
<th class="tbl_col_active" scope="col">{tmpl_var name="faq_section_name_txt"}</th>
1818
<th class="tbl_col_server_id" scope="col">{tmpl_var name="faq_delete_txt"}</th>

0 commit comments

Comments
 (0)