Skip to content

Commit

Permalink
HTML/CSS for account profile edit page
Browse files Browse the repository at this point in the history
Refactor the code to use "1.3-style" layout with form-container div and
fieldset, instead of html table

Use 'required' CSS class for mandatory fields display instead of
hardcoded '*' with span.
  • Loading branch information
dregad committed Dec 20, 2015
1 parent d1c565d commit 5675f36
Showing 1 changed file with 67 additions and 54 deletions.
121 changes: 67 additions & 54 deletions account_prof_edit_page.php
Expand Up @@ -79,62 +79,75 @@

<?php # Edit Profile Form BEGIN ?>
<br />
<div>
<div class="form-container">

<h2><?php echo lang_get( 'edit_profile_title' ) ?></h2>
<div class="right">
<?php
if( !profile_is_global( $f_profile_id ) ) {
print_account_menu();
}
?>
</div>

<form method="post" action="account_prof_update.php">
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="update" />
<table class="width75" cellspacing="1">
<tr>
<td class="form-title">
<input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />
<?php echo lang_get( 'edit_profile_title' ) ?>
</td>
<td class="right">
<?php
if( !profile_is_global( $f_profile_id ) ) {
print_account_menu();
}
?>
</td>
</tr>
<tr class="row-1">
<th class="category" width="25%">
<span class="required">*</span><?php echo lang_get( 'platform' ) ?>
</th>
<td width="75%">
<input type="text" name="platform" size="32" maxlength="32" value="<?php echo string_attribute( $v_platform ) ?>" />
</td>
</tr>
<tr class="row-2">
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os' ) ?>
</th>
<td>
<input type="text" name="os" size="32" maxlength="32" value="<?php echo string_attribute( $v_os ) ?>" />
</td>
</tr>
<tr class="row-1">
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os_version' ) ?>
</th>
<td>
<input type="text" name="os_build" size="16" maxlength="16" value="<?php echo string_attribute( $v_os_build ) ?>" />
</td>
</tr>
<tr class="row-2">
<th class="category">
<?php echo lang_get( 'additional_description' ) ?>
</th>
<td>
<textarea name="description" cols="60" rows="8"><?php echo string_textarea( $v_description ) ?></textarea>
</td>
</tr>
<tr>
<td class="center" colspan="2">

<fieldset>
<?php echo form_security_field( 'profile_update' )?>

<input type="hidden" name="action" value="update" />
<input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />

<div class="field-container">
<label for="platform" class="required">
<span><?php echo lang_get( 'platform' ) ?></span>
</label>
<span class="input">
<input type="text" name="platform" size="32" maxlength="32"
value="<?php echo string_attribute( $v_platform ) ?>" />
</span>
<span class="label-style"></span>
</div>

<div class="field-container">
<label for="os" class="required">
<span><?php echo lang_get( 'os' ) ?></span>
</label>
<span class="input">
<input type="text" name="os" size="32" maxlength="32"
value="<?php echo string_attribute( $v_os ) ?>" />
</span>
<span class="label-style"></span>
</div>

<div class="field-container">
<label for="os_version" class="required">
<span><?php echo lang_get( 'os_version' ) ?></span>
</label>
<span class="input">
<input type="text" name="os_build" size="32" maxlength="32"
value="<?php echo string_attribute( $v_os_build ) ?>" />
</span>
<span class="label-style"></span>
</div>

<div class="field-container">
<label for="description" class="required">
<span><?php echo lang_get( 'additional_description' ) ?></span>
</label>
<span class="textarea">
<textarea name="description" cols="60" rows="8"><?php
echo string_textarea( $v_description );
?></textarea>
</span>
<span class="label-style"></span>
</div>

<div class="submit-button">
<input type="submit" class="button" value="<?php echo lang_get( 'update_profile_button' ) ?>" />
</td>
</tr>
</table>
</div>

</fieldset>
</form>
</div>
<?php
Expand Down

0 comments on commit 5675f36

Please sign in to comment.