Changeset 817

Show
Ignore:
Timestamp:
01/18/07 13:36:13 (2 years ago)
Author:
ben
Message:

The FOAF upload form has been moved to the bottom of the profile editing screen.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/profile/profile.class.php

    r758 r817  
    8989     
    9090            $profile_username = user_info('username', $page_owner); 
    91          
    92  
    93  
    94             $body .= "<form action=\"".url . "profile/edit.php?profile_id=".$page_owner."\" method=\"post\" enctype=\"multipart/form-data\">"; 
     91 
     92            $body .= "<form action=\"".url . "profile/edit.php?profile_id=".$page_owner."\" method=\"post\">"; 
     93     
     94            // Cycle through all defined profile detail fields and display them 
     95     
     96            if (!empty($data['profile:details']) && sizeof($data['profile:details']) > 0) { 
     97         
     98                foreach($data['profile:details'] as $field) { 
     99                    $body .= $this->editfield_display($field); 
     100                } 
     101     
     102            } 
     103     
     104            $submitMsg = __gettext("Submit details:"); 
     105            $saveProfile = __gettext("Save your profile"); 
     106            $body .= <<< END 
     107     
     108                <p align="center"> 
     109                <label> 
     110                $submitMsg 
     111                <input type="submit" name="submit" value="$saveProfile" /> 
     112                </label> 
     113                <input type="hidden" name="action" value="profile:edit" /> 
     114                <input type="hidden" name="profile_id" value="$page_owner" /> 
     115                </p> 
     116 
     117                </form> 
     118END; 
     119 
     120            $body .= "<p>&nbsp;</p><form action=\"".url . "profile/edit.php?profile_id=".$page_owner."\" method=\"post\" enctype=\"multipart/form-data\">"; 
    95121            $body .= "<p>" . __gettext("You can import some profile data by uploading a FOAF file here:") . "</p>"; 
    96122            $body .=templates_draw(array( 
     
    107133                </form> 
    108134         
    109 END; 
    110             $body .= "<p>" .__gettext("Or you can fill in your profile directly below:") . "</p>"; 
    111             $body .= "<form action=\"".url . "profile/edit.php?profile_id=".$page_owner."\" method=\"post\">"; 
    112      
    113             // Cycle through all defined profile detail fields and display them 
    114      
    115             if (!empty($data['profile:details']) && sizeof($data['profile:details']) > 0) { 
    116          
    117                 foreach($data['profile:details'] as $field) { 
    118                     $body .= $this->editfield_display($field); 
    119                 } 
    120      
    121             } 
    122      
    123             $submitMsg = __gettext("Submit details:"); 
    124             $saveProfile = __gettext("Save your profile"); 
    125             $body .= <<< END 
    126      
    127                 <p align="center"> 
    128                 <label> 
    129                 $submitMsg 
    130                 <input type="submit" name="submit" value="$saveProfile" /> 
    131                 </label> 
    132                 <input type="hidden" name="action" value="profile:edit" /> 
    133                 <input type="hidden" name="profile_id" value="$page_owner" /> 
    134                 </p> 
    135  
    136                 </form> 
    137135END; 
    138136