Edit Registration Form - Terms os Service (ToS) - Joomla! Forum - community, help and support


hello guyz,
i'm working on joomla 2.5 , i'm looking best solution.

what want do:
i want add terms of use or terms os service (tos), user proceed after clicking it.

as found out after enabling build-in plug-in: user - profile has options , additional
fields registration. can enable, disable them or make them required. @ tos must
select existing article , link redirecting it, appear @ registration form.
but user make account without accepting tos.
i found solution hard way, it's not optimum

what did do:
i enabled tos form user - profile plugin copy genarated code , disabled it.
then in components\com_users\views\registration\tmpl\default.php (there registration form generated)
i added code after second(and last) "<?php endforeach;?>":

code: select all

<fieldset><dl>
   <dt>
      <label id="jform_profile_tos-lbl" for="jform_profile_tos" class="hastip required" title="terms of service::agree terms of service">
      <a class="modal" title="" href="/index.php/terms" rel="{handler: 'iframe', size: {x:800, y:500}}">terms of service:</a><span class="star">&#160;*</span></label>
   </dt>
   
      <input type="radio" id="jform_profile_tos0" name="jform[profile][tos]" value="1" onclick="proceed()"/>
      <label for="jform_profile_tos0">agree</label>
   
<dl></fieldset>


as see have changed href tos article , put link page made terms of use.

code: select all

href="/index.php/terms"

also put function call in radio button.

code: select all

onclick="proceed()"


at top of file before form put code tha enable/disable registration button:

code: select all

<script language="javascript">
   function proceed() {
      if(document.getelementbyid("jform_profile_tos0").checked){
         document.getelementbyid("sbm").disabled=false;
      }
      else{
         document.getelementbyid("sbm").disabled=true;
      }
   }
</script>


then made sure the registration button disabled. changing code this:

code: select all

<button type="submit" disabled id="sbm" class="validate">


i cant find out created had add proceed().
i spent lots of hour trying make work right nothing happened.
any suggestions???

files should take are:
components\com_users\views\registration\tmpl\default.php
components\com_users\models\forms\registration.xml
components\com_users\models\registration.php
plugins\user\profile\profile.php
plugins\user\profile\fields\tos.php

at tos.php there link created input radio button?






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support