added rfe #740: Thingy Pre-Text
This commit is contained in:
parent
0b21273065
commit
9e2ec505c0
7 changed files with 54 additions and 7 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
- Fixed a limit bug in the asset discovery service.
|
- Fixed a limit bug in the asset discovery service.
|
||||||
- Fixed #8853: link to manageWorkflows is broken
|
- Fixed #8853: link to manageWorkflows is broken
|
||||||
- Fixed #8890: meta_loop in post form not working (United Knowledge)
|
- Fixed #8890: meta_loop in post form not working (United Knowledge)
|
||||||
|
- rfe #740: Thingy Pre-Text (SDH Consulting Group)
|
||||||
|
|
||||||
7.6.1
|
7.6.1
|
||||||
- changed: the list of extensions for the export system to pass through
|
- changed: the list of extensions for the export system to pass through
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -30,6 +30,7 @@ my $session = start(); # this line required
|
||||||
|
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
repairManageWorkflows($session);
|
repairManageWorkflows($session);
|
||||||
|
addPreTextToThingyFields($session);
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,6 +56,13 @@ sub repairManageWorkflows {
|
||||||
print "DONE!\n" unless $quiet;
|
print "DONE!\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub addPreTextToThingyFields {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdding a pre-text property to Thingy fields... " unless $quiet;
|
||||||
|
$session->db->write('ALTER TABLE `Thingy_fields` ADD pretext varchar(255)');
|
||||||
|
print "DONE!\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -634,7 +634,13 @@ sub getEditFieldForm {
|
||||||
});
|
});
|
||||||
$f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_defaultValue_module",$defaultValueForm,
|
$f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_defaultValue_module",$defaultValueForm,
|
||||||
$i18n->get('default value label'),$i18n->get('default value description')));
|
$i18n->get('default value label'),$i18n->get('default value description')));
|
||||||
|
|
||||||
|
$f->text(
|
||||||
|
-name=>"pretext",
|
||||||
|
-value=>$field->{pretext},
|
||||||
|
-label=>$i18n->get('pretext label'),
|
||||||
|
-hoverHelp=>$i18n->get('pretext description'),
|
||||||
|
);
|
||||||
$f->text(
|
$f->text(
|
||||||
-name=>"subtext",
|
-name=>"subtext",
|
||||||
-value=>$field->{subtext},
|
-value=>$field->{subtext},
|
||||||
|
|
@ -1603,6 +1609,9 @@ sub www_editThing {
|
||||||
else{
|
else{
|
||||||
$formElement = $self->getFormElement($field);
|
$formElement = $self->getFormElement($field);
|
||||||
}
|
}
|
||||||
|
if ($field->{pretext}){
|
||||||
|
$formElement = '<span class="formPretext">'.$field->{pretext}.'</span><br />'.$formElement;
|
||||||
|
}
|
||||||
if ($field->{subtext}){
|
if ($field->{subtext}){
|
||||||
$formElement .= '<br /><span class="formSubtext">'.$field->{subtext}.'</span>';
|
$formElement .= '<br /><span class="formSubtext">'.$field->{subtext}.'</span>';
|
||||||
}
|
}
|
||||||
|
|
@ -1997,6 +2006,7 @@ sub www_editFieldSave {
|
||||||
fieldType=>$fieldType,
|
fieldType=>$fieldType,
|
||||||
defaultValue=>$defaultValue,
|
defaultValue=>$defaultValue,
|
||||||
possibleValues=>$self->session->form->process("possibleValues"),
|
possibleValues=>$self->session->form->process("possibleValues"),
|
||||||
|
pretext=>$self->session->form->process("pretext"),
|
||||||
subtext=>$self->session->form->process("subtext"),
|
subtext=>$self->session->form->process("subtext"),
|
||||||
status=>$self->session->form->process("status"),
|
status=>$self->session->form->process("status"),
|
||||||
size=>$self->session->form->process("size"),
|
size=>$self->session->form->process("size"),
|
||||||
|
|
@ -2030,6 +2040,9 @@ sub www_editFieldSave {
|
||||||
else{
|
else{
|
||||||
$formElement = $self->getFormElement(\%properties);
|
$formElement = $self->getFormElement(\%properties);
|
||||||
}
|
}
|
||||||
|
if ($properties{pretext}){
|
||||||
|
$formElement = '<span class="formSubtext">'.$properties{pretext}.'</span><br />'.$formElement;
|
||||||
|
}
|
||||||
if ($properties{subtext}){
|
if ($properties{subtext}){
|
||||||
$formElement .= '<br /><span class="formSubtext">'.$properties{subtext}.'</span>';
|
$formElement .= '<br /><span class="formSubtext">'.$properties{subtext}.'</span>';
|
||||||
}
|
}
|
||||||
|
|
@ -2243,6 +2256,7 @@ sub editThingData {
|
||||||
"isHidden" => $hidden,
|
"isHidden" => $hidden,
|
||||||
"isVisible" => ($field{status} eq "visible" && !$hidden),
|
"isVisible" => ($field{status} eq "visible" && !$hidden),
|
||||||
"isRequired" => ($field{status} eq "required" && !$hidden),
|
"isRequired" => ($field{status} eq "required" && !$hidden),
|
||||||
|
"pretext" => $field{pretext},
|
||||||
"subtext" => $field{subtext},
|
"subtext" => $field{subtext},
|
||||||
);
|
);
|
||||||
push(@field_loop, { map {("field_".$_ => $fieldProperties{$_})} keys(%fieldProperties) });
|
push(@field_loop, { map {("field_".$_ => $fieldProperties{$_})} keys(%fieldProperties) });
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ our $HELP = {
|
||||||
{ 'name' => 'field_name' },
|
{ 'name' => 'field_name' },
|
||||||
{ 'name' => 'field_value' },
|
{ 'name' => 'field_value' },
|
||||||
{ 'name' => 'field_subtext' },
|
{ 'name' => 'field_subtext' },
|
||||||
|
{ 'name' => 'field_pretext' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ 'name' => 'listOfThings',
|
{ 'name' => 'listOfThings',
|
||||||
|
|
|
||||||
|
|
@ -464,15 +464,28 @@ this field using a hash, then the default value has to be a key in that hash, an
|
||||||
lastUpdated => 1031514049
|
lastUpdated => 1031514049
|
||||||
},
|
},
|
||||||
|
|
||||||
'subtext description' => {
|
'subtext description' => {
|
||||||
message => q|An extension of the label, this is additional information such as a description of what should go in the field or optional instructions for the field.|,
|
message => q|An extension of the label, this is additional information such as a description of what should
|
||||||
lastUpdated => 1133811301,
|
go in the field or optional instructions for the field. It will be displayed below/after the form element.|,
|
||||||
|
lastUpdated => 1224518799,
|
||||||
|
},
|
||||||
|
|
||||||
|
'pretext label' => {
|
||||||
|
message => q|Pre-text|,
|
||||||
|
lastUpdated => 1224518799,
|
||||||
|
},
|
||||||
|
|
||||||
|
'pretext description' => {
|
||||||
|
message => q|An extra extension of the label, this is additional information such as a description of what should
|
||||||
|
go in the field or optional instructions for the field. It will be displayed above/before the form element.|,
|
||||||
|
lastUpdated => 1224518799,
|
||||||
},
|
},
|
||||||
|
|
||||||
'fieldstatus hidden label' => {
|
'fieldstatus hidden label' => {
|
||||||
message => q|Hidden|,
|
message => q|Hidden|,
|
||||||
lastUpdated => 1031514049
|
lastUpdated => 1031514049
|
||||||
},
|
},
|
||||||
|
|
||||||
'fieldstatus visible label' => {
|
'fieldstatus visible label' => {
|
||||||
message => q|Visible|,
|
message => q|Visible|,
|
||||||
lastUpdated => 1031514049
|
lastUpdated => 1031514049
|
||||||
|
|
@ -812,9 +825,16 @@ field.|,
|
||||||
lastUpdated => 1104630516,
|
lastUpdated => 1104630516,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'field_pretext' => {
|
||||||
|
message => q|An extra description of the field so that users know what to put in the field. To be
|
||||||
|
displayed above/before the form element.|,
|
||||||
|
lastUpdated => 1224518799,
|
||||||
|
},
|
||||||
|
|
||||||
'field_subtext' => {
|
'field_subtext' => {
|
||||||
message => q|A description of the field so that users know what to put in the field.|,
|
message => q|A description of the field so that users know what to put in the field. To be displayed
|
||||||
lastUpdated => 1104630516,
|
below/after the form element.|,
|
||||||
|
lastUpdated => 1224518799,
|
||||||
},
|
},
|
||||||
|
|
||||||
'form_start' => {
|
'form_start' => {
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,7 @@ li.list1 {
|
||||||
border:1px solid #7EA6B2;
|
border:1px solid #7EA6B2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.formPretext {
|
||||||
|
font-family: helvetica, arial;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue