The Simple Help Field module adds a new field to the standard Drupal form fields to be used in help fields, description of requirements and usage examples. This new field should be used via Form API following the example below:

$form['simple_help_field_example'] = array(
  '#type' => 'simple_help',
  '#simple_help_title' => 'Title (Optional)',
  '#value' => 'The text you want here',
);

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/cebasqueira/2844288.git simple_help_field
cd simple_help_field

Comments

cebasqueira created an issue. See original summary.

cebasqueira’s picture

Issue summary: View changes
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

satyam upadhyay’s picture

Status: Needs review » Needs work

Hi cebasqueira,

  1. I have done manual review of your module and found some warnings and notice on your code like https://www.screencast.com/t/vDpWAnVC0nGy
  2. Add this line '#markup' => (!empty($element['#simple_help_title'])) ? '' . $element['#simple_help_title'] . '
    ' . $element['#value'] : '',
    instead of this '#markup' => (!empty($element['#simple_help_title'])) ? '' . $element['#simple_help_title'] . '
    ' . $element['#value'] : $element['#value'],
    on line 48 of your module file

Regards
Satyam

cebasqueira’s picture

Hi Satyam Upadhyay,

I fix the notices and warning!

Thanks!

cebasqueira’s picture

Status: Needs work » Needs review
sajiniantony’s picture

Status: Needs review » Needs work

Hello,

In the install file line no:12.
Do not use t() or st() in installation phase hooks, use $t = get_t() to retrieve the appropriate localization function name.

cebasqueira’s picture

Hi sajiniantony

I'll make the proposed change.

Thanks my friend

cebasqueira’s picture

sajiniantony

Proposed changes commited

cebasqueira’s picture

Status: Needs work » Needs review
cebasqueira’s picture

visabhishek’s picture

Issue tags: -PAreview: review bonus

No reviews from you listed in the issue summary, So removing PAReview: review bonus tag. Please check https://www.drupal.org/node/1975228

rajat4u’s picture

Hi,

File simple_help_field.module :-

1.Line 48,67, etc
we can do documentation for variables used in function.

2. Line 48
we can remove $form_state, $complete_form (Unused)

3. line 271
we can remove empty line.

rajat4u’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

@rajat.dkte: those are nice tips but on their own surely not application blockers. Anything else that you found or should this be RTBC instead?

arkener’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

The use of the variable "simple_help_field_title" currently allows XSS if no title is given for the field. This can be tested by added the following value to the simple_help_field_title field:
<script>alert('XSS');</script>
and creating a field without a title:

$form['simple_help_field_example'] = array(
  '#type' => 'simple_help',
  '#simple_help_theme' => 'simple-help-field-yellow', // Optional.
  '#value' => 'The text you want here',
  '#collapsible' => TRUE, // Optional, default TRUE.
  '#collapsed' => TRUE, // Optional, default FALSE.
);
cebasqueira’s picture

Status: Needs work » Needs review

Changes fixed! Needs review

renatog’s picture

Hi Guys!

I tested and works good for me.

Regards.

renatog’s picture

Status: Needs review » Reviewed & tested by the community

+RTBC

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution!

I am going to update your account so you can opt into security advisory coverage now.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.

Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewer(s) as well.

avpaderno’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.