Skip to content

Commit

Permalink
Discuss plugin required field not red #180
Browse files Browse the repository at this point in the history
  • Loading branch information
810 committed Oct 1, 2015
1 parent 9ecc129 commit a34ff56
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions plugins/content/kunenadiscuss/tmpl/form.php
Expand Up @@ -8,6 +8,7 @@
* @link http://www.kunena.org
**/
defined( '_JEXEC' ) or die ();
JHTML::_('behavior.formvalidator');
?>
<div id="kdiscuss-quick-post<?php echo $row->id ?>" class="kdiscuss-form">
<div class="kdiscuss-title"><?php echo JText::_('PLG_KUNENADISCUSS_DISCUSS') ?></div>
Expand All @@ -19,9 +20,23 @@
<tr>
<td valign="top">
<table>
<!-- ADDED GUEST ALERT-->
<?php if(!$this->user->exists()) : ?>
<tr>
<td></td>
</tr>
<tr>
<td>
<div class="alert alert-info"><?php echo JText::_('COM_KUNENA_GEN_GUEST'); ?></div>
</td>
</tr>
<?php endif; ?>
<!-- END ADDITION -->
<tr>
<td><span class="kdiscuss-quick-post-label"><?php echo JText::_('PLG_KUNENADISCUSS_NAME') ?></span></td>
<td><input type="text" name="name" value="<?php echo $this->name ?>" <?php if ($this->user->exists()) echo 'disabled="disabled" '; ?>/></td>
</tr>
<tr>
<td><input type="text" name="name" value="<?php echo $this->name ?>" <?php if ($this->user->exists()) echo 'disabled="disabled" '; ?> required/></td>
</tr>
<?php if(!$this->user->exists() && $this->config->askemail) : ?>
<tr>
Expand All @@ -34,7 +49,7 @@
<?php echo JText::_('PLG_KUNENADISCUSS_MESSAGE') ?></span>
</tr>
<tr>
<td colspan="2"><textarea name="message" rows="5" cols="60" class="ktext"><?php echo $this->message ?></textarea></td>
<td colspan="2"><textarea name="message" rows="5" cols="60" class="ktext" required><?php echo $this->message ?></textarea></td>
</tr>
<?php if ($this->hasCaptcha()) : ?>
<tr>
Expand All @@ -43,7 +58,7 @@
</tr>
<?php endif; ?>
<tr>
<td><input type="submit" class="kbutton" value="<?php echo JText::_('PLG_KUNENADISCUSS_SUBMIT') ?>" /></td>
<td><input type="submit" class="kbutton btn" value="<?php echo JText::_('PLG_KUNENADISCUSS_SUBMIT') ?>" /></td>
</tr>
</table>
</td>
Expand Down

3 comments on commit a34ff56

@Ruud68
Copy link
Contributor

@Ruud68 Ruud68 commented on a34ff56 Oct 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@810 just tried this fix, there are some things not okay with it (as far as I can see):

  1. the comments that I made on the forum are still in the code :) "" and ""
  2. email is not required, but that can also be deliberate: not sure what happens if you configure not to ask for email what will happen if email is required in the code #testcase
  3. layout is not correct any more, see attached image (left patched forms.php, right, current implementation)
    hope this helps!
    kunenadiscuss

@810
Copy link
Member Author

@810 810 commented on a34ff56 Oct 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Comment is ok, will change it on K4.0 plugin to joomla style
  2. That's why I haven't added req on email.
  3. Will change that

@810
Copy link
Member Author

@810 810 commented on a34ff56 Oct 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Have updated the code

Please sign in to comment.