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
722847cb
Commit
722847cb
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Add option to enable keypad (in most cases, we don't need this).
parent
e2790895
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/cashdesk/include/keypad.php
+10
-1
10 additions, 1 deletion
htdocs/cashdesk/include/keypad.php
with
10 additions
and
1 deletion
htdocs/cashdesk/include/keypad.php
+
10
−
1
View file @
722847cb
...
...
@@ -15,8 +15,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Return a string to outptu a keypad
*
* @param string $keypadname Key pad name
* @param string $formname Form name
* @return string HTML code to show a js keypad.
*/
function
genkeypad
(
$keypadname
,
$formname
)
{
if
(
empty
(
$conf
->
global
->
CASHDESK_SHOW_KEYPAD
))
return
''
;
// défine the font size of button
$btnsize
=
32
;
$sz
=
'<input type="button" id="closekeypad'
.
$keypadname
.
'" value="X" style="display:none;" onclick="closekeypad(\''
.
$keypadname
.
'\')"/>'
.
"
\n
"
;
...
...
@@ -33,7 +42,7 @@ function genkeypad($keypadname, $formname)
$sz
.
=
'<input type="button" style="font-size:'
.
$btnsize
.
'px;" value=" 1 " onclick="addvalue(\''
.
$keypadname
.
'\',\''
.
$formname
.
'\',1);"/>'
.
"
\n
"
;
$sz
.
=
'<input type="button" style="font-size:'
.
$btnsize
.
'px;" value=" 2 " onclick="addvalue(\''
.
$keypadname
.
'\',\''
.
$formname
.
'\',2);"/>'
.
"
\n
"
;
$sz
.
=
'<input type="button" style="font-size:'
.
$btnsize
.
'px;" value=" 3 " onclick="addvalue(\''
.
$keypadname
.
'\',\''
.
$formname
.
'\',3);"/><br/>'
.
"
\n
"
;
$sz
.
=
'<input type="button" style="font-size:'
.
$btnsize
.
'px;" value=" 0 " onclick="addvalue(\''
.
$keypadname
.
'\',\''
.
$formname
.
'\',0);"/>'
.
"
\n
"
;
$sz
.
=
'<input type="button" style="font-size:'
.
$btnsize
.
'px;" value="←" '
;
$sz
.
=
' onclick="document.getElementById(\''
.
$keypadname
.
'\').value=document.getElementById(\''
.
$keypadname
.
'\').value.substr(0,document.getElementById(\''
.
$keypadname
.
'\').value.length-1);modif();"/>'
.
"
\n
"
;
...
...
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