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
3c87e1e2
Commit
3c87e1e2
authored
11 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: no required class for not mandatory fields
parent
ef2f8ea6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/core/tpl/admin_extrafields_add.tpl.php
+10
-10
10 additions, 10 deletions
htdocs/core/tpl/admin_extrafields_add.tpl.php
htdocs/core/tpl/admin_extrafields_edit.tpl.php
+4
-4
4 additions, 4 deletions
htdocs/core/tpl/admin_extrafields_edit.tpl.php
with
14 additions
and
14 deletions
htdocs/core/tpl/admin_extrafields_add.tpl.php
+
10
−
10
View file @
3c87e1e2
...
...
@@ -31,14 +31,14 @@
{
print
'jQuery("#value_choice").hide();'
;
}
if
(
GETPOST
(
'type'
)
==
"separate"
)
{
print
"jQuery('#size, #unique, #required, #default_value').val('').attr('disabled','disabled');"
;
print
'jQuery("#value_choice").hide();'
;
}
?>
if
(
type
==
'
date
'
)
{
size
.
val
(
''
).
attr
(
'
disabled
'
,
'
disabled
'
);
unique
.
removeAttr
(
'
disabled
'
,
'
disabled
'
);
jQuery
(
"
#value_choice
"
).
hide
();
}
else
if
(
type
==
'
datetime
'
)
{
size
.
val
(
''
).
attr
(
'
disabled
'
,
'
disabled
'
);
unique
.
removeAttr
(
'
disabled
'
,
'
disabled
'
);
jQuery
(
"
#value_choice
"
).
hide
();
}
else
if
(
type
==
'
double
'
)
{
size
.
val
(
'
24,8
'
).
removeAttr
(
'
disabled
'
);
unique
.
removeAttr
(
'
disabled
'
,
'
disabled
'
);
jQuery
(
"
#value_choice
"
).
hide
();
}
...
...
@@ -67,17 +67,19 @@
<input
type=
"hidden"
name=
"rowid"
value=
"
<?php
echo
$rowid
?>
"
>
<table
summary=
"listofattributes"
class=
"border centpercent"
>
<!-- Label -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Label"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"label"
size=
"40"
value=
"
<?php
echo
GETPOST
(
'label'
);
?>
"
></td></tr>
<!-- Code -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"AttributeCode"
);
?>
(
<?php
echo
$langs
->
trans
(
"AlphaNumOnlyCharsAndNoSpace"
);
?>
)
</td><td
class=
"valeur"
><input
type=
"text"
name=
"attrname"
id=
"attrname"
size=
"10"
value=
"
<?php
echo
GETPOST
(
'attrname'
);
?>
"
></td></tr>
<!-- Type -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Type"
);
?>
</td><td
class=
"valeur"
>
<?php
print
$form
->
selectarray
(
'type'
,
$type2label
,
GETPOST
(
'type'
));
?>
</td></tr>
<!-- Size -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Size"
);
?>
</td><td
class=
"valeur"
><input
id=
"size"
type=
"text"
name=
"size"
size=
"5"
value=
"
<?php
echo
(
GETPOST
(
'size'
)
?
GETPOST
(
'size'
)
:
''
);
?>
"
></td></tr>
<!-- Position -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Position"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"pos"
size=
"5"
value=
"
<?php
echo
GETPOST
(
'pos'
);
?>
"
></td></tr>
<!-- Label -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Label"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"label"
size=
"40"
value=
"
<?php
echo
GETPOST
(
'label'
);
?>
"
></td></tr>
<!-- Code -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"AttributeCode"
);
?>
(
<?php
echo
$langs
->
trans
(
"AlphaNumOnlyCharsAndNoSpace"
);
?>
)
</td><td
class=
"valeur"
><input
type=
"text"
name=
"attrname"
id=
"attrname"
size=
"10"
value=
"
<?php
echo
GETPOST
(
'attrname'
);
?>
"
></td></tr>
<!-- Value (for select list / radio/ checkbox) -->
<tr><td>
<?php
echo
$langs
->
trans
(
"Position"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"pos"
size=
"5"
value=
"
<?php
echo
GETPOST
(
'pos'
);
?>
"
></td></tr>
<!-- Default Value (for select list / radio/ checkbox) -->
<tr
id=
"value_choice"
>
<td>
...
...
@@ -95,8 +97,6 @@
</tr>
<!-- Default Value -->
<tr><td>
<?php
echo
$langs
->
trans
(
"DefaultValue"
);
?>
</td><td
class=
"valeur"
><input
id=
"default_value"
type=
"text"
name=
"default_value"
size=
"5"
value=
"
<?php
echo
(
GETPOST
(
'"default_value"'
)
?
GETPOST
(
'"default_value"'
)
:
''
);
?>
"
></td></tr>
<!-- Size -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Size"
);
?>
</td><td
class=
"valeur"
><input
id=
"size"
type=
"text"
name=
"size"
size=
"5"
value=
"
<?php
echo
(
GETPOST
(
'size'
)
?
GETPOST
(
'size'
)
:
''
);
?>
"
></td></tr>
<!-- Unique -->
<tr><td>
<?php
echo
$langs
->
trans
(
"Unique"
);
?>
</td><td
class=
"valeur"
><input
id=
"unique"
type=
"checkbox"
name=
"unique"
<?php
echo
(
GETPOST
(
'unique'
)
?
' checked="true"'
:
''
);
?>
></td></tr>
<!-- Required -->
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/tpl/admin_extrafields_edit.tpl.php
+
4
−
4
View file @
3c87e1e2
...
...
@@ -73,8 +73,6 @@ elseif ($type== 'sellist')
$param_chain
=
$paramlist
[
0
];
}
?>
<!-- Position -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Position"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"pos"
size=
"5"
value=
"
<?php
echo
$extrafields
->
attribute_pos
[
$attrname
];
?>
"
></td></tr>
<!-- Label -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Label"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"label"
size=
"40"
value=
"
<?php
echo
$extrafields
->
attribute_label
[
$attrname
];
?>
"
></td></tr>
<!-- Code -->
...
...
@@ -84,6 +82,10 @@ elseif ($type== 'sellist')
<?php
print
$type2label
[
$type
];
?>
<input
type=
"hidden"
name=
"type"
id=
"type"
value=
"
<?php
print
$type
;
?>
"
>
</td></tr>
<!-- Size -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Size"
);
?>
</td><td><input
id=
"size"
type=
"text"
name=
"size"
size=
"5"
value=
"
<?php
echo
$size
;
?>
"
></td></tr>
<!-- Position -->
<tr><td>
<?php
echo
$langs
->
trans
(
"Position"
);
?>
</td><td
class=
"valeur"
><input
type=
"text"
name=
"pos"
size=
"5"
value=
"
<?php
echo
$extrafields
->
attribute_pos
[
$attrname
];
?>
"
></td></tr>
<!-- Value (for select list / radio) -->
<?php
if
((
$type
==
'select'
)
||
(
$type
==
'sellist'
)
||
(
$type
==
'checkbox'
)
||
((
$type
==
'radio'
)))
...
...
@@ -104,8 +106,6 @@ if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') ||(($typ
<?php
}
?>
<!-- Size -->
<tr><td
class=
"fieldrequired"
>
<?php
echo
$langs
->
trans
(
"Size"
);
?>
</td><td><input
id=
"size"
type=
"text"
name=
"size"
size=
"5"
value=
"
<?php
echo
$size
;
?>
"
></td></tr>
<!-- Unique -->
<tr><td>
<?php
echo
$langs
->
trans
(
"Unique"
);
?>
</td><td
class=
"valeur"
><input
id=
"unique"
type=
"checkbox"
name=
"unique"
<?php
echo
(
$unique
?
' checked="true"'
:
''
);
?>
></td></tr>
<!-- Required -->
...
...
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