Commit c352a1b8 authored by Evan Goldenberg's avatar Evan Goldenberg Committed by Francois Marier

usability: add pieforms support for fieldset help, and use it for resume fields

Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent fd095185
......@@ -80,13 +80,13 @@ $coverletterform = pieform(array(
'cols' => 70,
'rows' => 10,
'defaultvalue' => ((!empty($coverletter)) ? $coverletter->get('description') : null),
'help' => true,
),
'save' => array(
'type' => 'submit',
'value' => get_string('save'),
),
)
),
'help' => true,
)
)
));
......@@ -108,13 +108,13 @@ $interestsform = pieform(array(
'defaultvalue' => ((!empty($interest)) ? $interest->get('description') : null),
'cols' => 70,
'rows' => 10,
'help' => true,
),
'save' => array(
'type' => 'submit',
'value' => get_string('save'),
),
)
),
'help' => true,
)
)
));
......@@ -134,9 +134,9 @@ $contactinformationform = pieform(array(
'contactinformation' => array(
'type' => 'html',
'value' => $contactinformation_value,
'help' => true,
),
)
),
'help' => true,
)
)
));
......
......@@ -69,6 +69,16 @@ function pieform_element_fieldset(Pieform $form, $element) {/*{{{*/
else {
$result .= '>' . Pieform::hsc($element['legend']);
}
// Help icon
if (!empty($element['help'])) {
$function = $form->get_property('helpcallback');
if (function_exists($function)) {
$result .= $function($form, $element);
}
else {
$result .= '<span class="help"><a href="" title="' . Pieform::hsc($element['help']) . '" onclick="return false;">?</a></span>';
}
}
$result .= "</legend>\n";
}
......
......@@ -332,7 +332,7 @@ fieldset.collapsed table {
border: 0;
margin: 0;
}
fieldset legend a {
fieldset.collapsible legend a {
padding-left: 15px;
background: url(../images/icon_fieldset_down.gif) 2px center no-repeat;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment