Skip to content

make it mandatory to select a user before adding a user note #64

Closed
wants to merge 2 commits into from

5 participants

@carson3511

Added some code to make it mandatory to select a user before a user note can be created. Currently the user note can be created without selecting a user and associating them with the note.

@infograf768
Joomla! member

Please create a tracker on joomlacode for this to be tested.

@realityking
Joomla! member
  1. Please don't use JParameter. It will be dropped in 3.0.
  2. Wouldn't adding required="true" to the XML definition of the user field have the same effect?
  3. I'm not sure what user notes are meant to be used for. Couldn't you need notes that don't always have users assigned to them?
@elinw elinw commented on the diff Jan 3, 2012
components/com_users/views/registration/view.html.php
@@ -55,6 +57,31 @@ public function display($tpl = null)
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
$this->prepareDocument();
+
+
+ /******** Customzation by joomlashowroom on 27-12-11 **************/
@elinw
elinw added a note Jan 3, 2012

Hi Mike you need to clean this part up since we don't put in lines like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@elinw elinw commented on the diff Jan 3, 2012
components/com_users/views/registration/view.html.php
+ if($user_plugins[$key]->name == "profile") {
+ $pluginParams = new JParameter( $user_plugins[$key]->params);
+ $user_plugins[$key]->params = $pluginParams;
+ //echo $user_plugins[$key]->params->get('profile-require_tos_page','');
+ $link = 'index.php?option=com_content&view=article&layout=modal&tmpl=component&id=' . $user_plugins[$key]->params->get('profile-require_tos_page','');
+
+ // Load the modal behavior script.
+ JHtml::_('behavior.modal', 'a.modal_article');
+ $html = ' <a class="modal_article" title="' . JText::_('JLIB_FORM_CHANGE_USER') . '"' . ' href="' . $link . '"'
+ . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}"> Terms of service </a>';
+ }
+ }
+ $this->article_id = $html;
+ //echo "<pre>"; print_r($user_plugins); exit;
+ // end
+ /******** END ******/
@elinw
elinw added a note Jan 3, 2012

this line too. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@elinw
elinw commented Jul 7, 2013

Any update on this? Would be great to get some code for this.

@phproberto
Joomla! member

I'm closing this as it's not mergeable and 2 years old. Feel free to open if you update it and are still interested in get it merged.

Thanks for contributing.

@phproberto phproberto closed this Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.