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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
1d2ee5f5
Commit
1d2ee5f5
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Add cancel button on note edit
parent
4736f078
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/societe/socnote.php
+49
-45
49 additions, 45 deletions
htdocs/societe/socnote.php
with
49 additions
and
45 deletions
htdocs/societe/socnote.php
+
49
−
45
View file @
1d2ee5f5
...
...
@@ -23,7 +23,7 @@
* \file htdocs/societe/socnote.php
* \brief Tab for notes on third party
* \ingroup societe
* \version $Id$
* \version $Id
: socnote.php,v 1.22 2011/07/13 16:24:57 eldy Exp
$
*/
require
(
"../main.inc.php"
);
...
...
@@ -44,13 +44,13 @@ $result = restrictedArea($user, 'societe', $socid);
* Actions
*/
if
(
$action
==
'add'
)
if
(
$action
==
'add'
&&
!
GETPOST
(
'cancel'
)
)
{
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"societe SET note='"
.
$db
->
escape
(
$_POST
[
"note"
])
.
"' WHERE rowid="
.
$_POST
[
"socid"
];
$result
=
$db
->
query
(
$sql
);
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"societe SET note='"
.
$db
->
escape
(
$_POST
[
"note"
])
.
"' WHERE rowid="
.
$_POST
[
"socid"
];
$result
=
$db
->
query
(
$sql
);
$_GET
[
"socid"
]
=
$_POST
[
"socid"
];
// Pour retour sur fiche
$socid
=
$_GET
[
"socid"
];
$_GET
[
"socid"
]
=
$_POST
[
"socid"
];
// Pour retour sur fiche
$socid
=
$_GET
[
"socid"
];
}
...
...
@@ -70,25 +70,25 @@ if ($socid > 0)
$societe
=
new
Societe
(
$db
,
$socid
);
$societe
->
fetch
(
$socid
);
/*
* Affichage onglets
*/
/*
* Affichage onglets
*/
if
(
$conf
->
notification
->
enabled
)
$langs
->
load
(
"mails"
);
$head
=
societe_prepare_head
(
$societe
);
$head
=
societe_prepare_head
(
$societe
);
dol_fiche_head
(
$head
,
'note'
,
$langs
->
trans
(
"ThirdParty"
),
0
,
'company'
);
dol_fiche_head
(
$head
,
'note'
,
$langs
->
trans
(
"ThirdParty"
),
0
,
'company'
);
print
"<form method=
\"
post
\"
action=
\"
"
.
DOL_URL_ROOT
.
"/societe/socnote.php
\"
>"
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
"<form method=
\"
post
\"
action=
\"
"
.
DOL_URL_ROOT
.
"/societe/socnote.php
\"
>"
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<table class="border" width="100%">'
;
print
'<table class="border" width="100%">'
;
print
'<tr><td width="20%">'
.
$langs
->
trans
(
'ThirdPartyName'
)
.
'</td>'
;
print
'<td colspan="3">'
;
print
$form
->
showrefnav
(
$societe
,
'socid'
,
''
,(
$user
->
societe_id
?
0
:
1
),
'rowid'
,
'nom'
);
print
'</td></tr>'
;
print
'<tr><td width="20%">'
.
$langs
->
trans
(
'ThirdPartyName'
)
.
'</td>'
;
print
'<td colspan="3">'
;
print
$form
->
showrefnav
(
$societe
,
'socid'
,
''
,(
$user
->
societe_id
?
0
:
1
),
'rowid'
,
'nom'
);
print
'</td></tr>'
;
if
(
!
empty
(
$conf
->
global
->
SOCIETE_USEPREFIX
))
// Old not used prefix field
{
...
...
@@ -113,32 +113,36 @@ if ($socid > 0)
print
'</td></tr>'
;
}
print
'<tr><td valign="top">'
.
$langs
->
trans
(
"Note"
)
.
'</td>'
;
print
'<td valign="top">'
;
if
(
$action
==
'edit'
&&
$user
->
rights
->
societe
->
creer
)
{
print
"<input type=
\"
hidden
\"
name=
\"
action
\"
value=
\"
add
\"
>"
;
print
"<input type=
\"
hidden
\"
name=
\"
socid
\"
value=
\"
"
.
$societe
->
id
.
"
\"
>"
;
// Editeur wysiwyg
require_once
(
DOL_DOCUMENT_ROOT
.
"/lib/doleditor.class.php"
);
$doleditor
=
new
DolEditor
(
'note'
,
$societe
->
note
,
''
,
360
,
'dolibarr_notes'
,
'In'
,
true
,
false
,
$conf
->
fckeditor
->
enabled
&&
$conf
->
global
->
FCKEDITOR_ENABLE_SOCIETE
,
20
,
70
);
$doleditor
->
Create
();
}
else
{
print
dol_textishtml
(
$societe
->
note
)
?
$societe
->
note
:
dol_nl2br
(
$societe
->
note
,
1
,
true
);
}
print
"</td></tr>"
;
if
(
$action
==
'edit'
)
{
print
'<tr><td colspan="2" align="center"><input type="submit" class="button" value="'
.
$langs
->
trans
(
"Save"
)
.
'"></td></tr>'
;
}
print
"</table>"
;
print
'</form>'
;
print
'<tr><td valign="top">'
.
$langs
->
trans
(
"Note"
)
.
'</td>'
;
print
'<td valign="top">'
;
if
(
$action
==
'edit'
&&
$user
->
rights
->
societe
->
creer
)
{
print
"<input type=
\"
hidden
\"
name=
\"
action
\"
value=
\"
add
\"
>"
;
print
"<input type=
\"
hidden
\"
name=
\"
socid
\"
value=
\"
"
.
$societe
->
id
.
"
\"
>"
;
// Editeur wysiwyg
require_once
(
DOL_DOCUMENT_ROOT
.
"/lib/doleditor.class.php"
);
$doleditor
=
new
DolEditor
(
'note'
,
$societe
->
note
,
''
,
360
,
'dolibarr_notes'
,
'In'
,
true
,
false
,
$conf
->
fckeditor
->
enabled
&&
$conf
->
global
->
FCKEDITOR_ENABLE_SOCIETE
,
20
,
70
);
$doleditor
->
Create
();
}
else
{
print
dol_textishtml
(
$societe
->
note
)
?
$societe
->
note
:
dol_nl2br
(
$societe
->
note
,
1
,
true
);
}
print
"</td></tr>"
;
if
(
$action
==
'edit'
)
{
print
'<tr><td colspan="2" align="center">'
;
print
'<input type="submit" class="button" name="save" value="'
.
$langs
->
trans
(
"Save"
)
.
'">'
;
print
' '
;
print
'<input type="submit" class="button" name="cancel" value="'
.
$langs
->
trans
(
"Cancel"
)
.
'">'
;
print
'</td></tr>'
;
}
print
"</table>"
;
print
'</form>'
;
}
print
'</div>'
;
...
...
@@ -163,5 +167,5 @@ if ($action != 'edit')
$db
->
close
();
llxFooter
(
'$Date$ - $Revision$'
);
llxFooter
(
'$Date
: 2011/07/13 16:24:57
$ - $Revision
: 1.22
$'
);
?>
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