Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
10ded212
Commit
10ded212
authored
Jan 31, 2011
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Test CKEditor
parent
d3710434
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/comm/propal.php
+11
-10
11 additions, 10 deletions
htdocs/comm/propal.php
htdocs/lib/doleditor.class.php
+8
-5
8 additions, 5 deletions
htdocs/lib/doleditor.class.php
htdocs/main.inc.php
+6
-0
6 additions, 0 deletions
htdocs/main.inc.php
with
25 additions
and
15 deletions
htdocs/comm/propal.php
+
11
−
10
View file @
10ded212
...
...
@@ -29,6 +29,8 @@
* \version $Id$
*/
if
(
!
defined
(
'REQUIRE_CKEDITOR'
))
define
(
'REQUIRE_CKEDITOR'
,
'1'
);
require
(
"../main.inc.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
'/comm/propal/class/propal.class.php'
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/propale/modules_propale.php"
);
...
...
@@ -45,12 +47,11 @@ $langs->load('bills');
$langs
->
load
(
'orders'
);
$langs
->
load
(
'products'
);
$sall
=
isset
(
$_GET
[
"sall"
])
?
$_GET
[
"sall"
]
:
$_POST
[
"sall"
];
if
(
isset
(
$_GET
[
"msg"
]))
{
$mesg
=
$_GET
[
"mesg"
];
}
$year
=
isset
(
$_GET
[
"year"
])
?
$_GET
[
"year"
]
:
""
;
$month
=
isset
(
$_GET
[
"month"
])
?
$_GET
[
"month"
]
:
""
;
$socid
=
isset
(
$_GET
[
'socid'
])
?
$_GET
[
'socid'
]
:
$_POST
[
'socid'
];
$mesg
=
isset
(
$_GET
[
'mesg'
])
?
$_GET
[
'mesg'
]
:
''
;
$sall
=
GETPOST
(
"sall"
);
$mesg
=
GETPOST
(
"mesg"
);
$year
=
GETPOST
(
"year"
);
$month
=
GETPOST
(
"month"
);
$socid
=
GETPOST
(
'socid'
);
// Security check
$module
=
'propale'
;
...
...
@@ -370,11 +371,11 @@ if ($_GET["action"] == 'classifybilled')
/*
* Cloture de la propale
*/
if
(
$_REQUE
ST
[
'action'
]
==
'setstatut'
&&
$user
->
rights
->
propale
->
cloturer
)
if
(
GETPO
ST
(
'action'
)
==
'setstatut'
&&
$user
->
rights
->
propale
->
cloturer
)
{
if
(
!
$_POST
[
'cancel'
])
{
if
(
empty
(
$_REQUE
ST
[
'statut'
]
))
if
(
!
GETPO
ST
(
'statut'
))
{
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentities
(
"CloseAs"
))
.
'</div>'
;
$_REQUEST
[
'action'
]
=
'statut'
;
...
...
@@ -964,8 +965,8 @@ $companystatic=new Societe($db);
$now
=
dol_now
();
$id
=
$_REQUEST
[
'id'
]
?
$_REQUEST
[
'id'
]
:
$_REQUE
ST
[
'id'
]
;
$ref
=
$_REQUE
ST
[
'ref'
]
;
$id
=
GETPO
ST
(
'id'
)
;
$ref
=
GETPO
ST
(
'ref'
)
;
if
(
$id
>
0
||
!
empty
(
$ref
))
{
...
...
This diff is collapsed.
Click to expand it.
htdocs/lib/doleditor.class.php
+
8
−
5
View file @
10ded212
...
...
@@ -68,12 +68,11 @@ class DolEditor
$this
->
tool
=
'fckeditor'
;
// By default
// Check fckeditor is ok
if
(
$this
->
tool
==
'fckeditor'
&&
(
empty
(
$conf
->
fckeditor
->
enabled
)
||
!
$okforextandededitor
))
if
(
$this
->
tool
==
'fckeditor'
&&
(
empty
(
$conf
->
fckeditor
->
enabled
)
||
!
$okforextandededitor
||
$conf
->
global
->
MAIN_USE_CKEDITOR
))
{
$this
->
tool
=
'textarea'
;
}
if
(
$this
->
tool
==
'fckeditor'
)
{
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/fckeditor/fckeditor.php"
);
...
...
@@ -120,6 +119,8 @@ class DolEditor
*/
function
Create
()
{
global
$conf
;
$found
=
0
;
if
(
$this
->
tool
==
'fckeditor'
)
...
...
@@ -130,7 +131,9 @@ class DolEditor
if
(
$this
->
tool
==
'textarea'
)
{
$found
=
1
;
print
'<textarea id="'
.
$this
->
htmlname
.
'" name="'
.
$this
->
htmlname
.
'" rows="'
.
$this
->
rows
.
'" cols="'
.
$this
->
cols
.
'" class="flat">'
;
$cssclass
=
'flat'
;
if
(
$conf
->
global
->
MAIN_USE_CKEDITOR
)
$cssclass
=
'ckeditor'
;
print
'<textarea id="'
.
$this
->
htmlname
.
'" name="'
.
$this
->
htmlname
.
'" rows="'
.
$this
->
rows
.
'" cols="'
.
$this
->
cols
.
'" class="'
.
$cssclass
.
'">'
;
print
$this
->
content
;
print
'</textarea>'
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/main.inc.php
+
6
−
0
View file @
10ded212
...
...
@@ -886,6 +886,12 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
print
'<script type="text/javascript" src="'
.
DOL_URL_ROOT
.
'/includes/jquery/plugins/layout/jquery.layout-latest'
.
$ext
.
'"></script>'
.
"
\n
"
;
}
// CKEditor
if
(
$conf
->
global
->
MAIN_USE_CKEDITOR
&&
defined
(
'REQUIRE_CKEDITOR'
))
{
print
'<script type="text/javascript" src="'
.
DOL_URL_ROOT
.
'/includes/ckeditor/ckeditor.js"></script>'
.
"
\n
"
;
}
}
// Output module javascript
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment