First stab at better options pages. WIP.

git-svn-id: http://svn.automattic.com/wordpress/trunk@9343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-10-25 19:55:56 +00:00
parent c21aa4f3cf
commit 5f968cda2b
3 changed files with 29 additions and 27 deletions

View File

@ -54,34 +54,29 @@ include('./admin-header.php');
<form method="post" action="options.php">
<?php settings_fields('general'); ?>
<p class="submit submit-top">
<input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
</p>
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="blogname"><?php _e('Blog Title') ?></label></th>
<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="45" /></td>
</tr>
<tr valign="top">
<th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
<td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" />
<br />
<?php _e('In a few words, explain what this blog is about.') ?></td>
<td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" size="45" />
<span class="setting-description"><?php _e('In a few words, explain what this blog is about.') ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="45" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
</tr>
<tr valign="top">
<th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th>
<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></td>
<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="45" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> />
<span class="setting-description"><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><label for="admin_email"><?php _e('E-mail address') ?> </label></th>
<td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" />
<br />
<?php _e('This address is used for admin purposes, like new user notification.') ?></td>
<td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="45" class="code" />
<span class="setting-description"><?php _e('This address is used for admin purposes, like new user notification.') ?></span></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('Membership') ?></th>
@ -127,10 +122,13 @@ foreach ( $offset_range as $offset ) {
}
?>
</select>
<?php _e('hours') ?><br />
<?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), gmdate(__('Y-m-d G:i:s'))); ?><br />
<?php if ($current_offset) printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, gmdate(__('Y-m-d G:i:s'), current_time('timestamp'))); ?><br />
<?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?>
<?php _e('hours') ?>
<span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), gmdate(__('Y-m-d G:i:s'))); ?></span>
<?php if ($current_offset) : ?>
<span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, gmdate(__('Y-m-d G:i:s'), current_time('timestamp'))); ?></span>
<?php endif; ?>
<br/>
<span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span>
</td>
</tr>
<tr>

View File

@ -24,23 +24,19 @@ include('admin-header.php');
<input type="hidden" name="action" value="update" />
<?php wp_nonce_field('misc-options') ?>
<p class="submit submit-top">
<input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button" />
</p>
<h3><?php _e('Uploading'); ?></h3>
<h3><?php _e('Uploading Files'); ?></h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
<td><input name="upload_path" type="text" id="upload_path" class="code" value="<?php echo attribute_escape(str_replace(ABSPATH, '', get_option('upload_path'))); ?>" size="40" />
<br />
<?php _e('Default is <code>wp-content/uploads</code>'); ?>
<span class="setting-description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files (optional)'); ?></label></th>
<th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
<td><input name="upload_url_path" type="text" id="upload_url_path" class="code" value="<?php echo attribute_escape( get_option('upload_url_path')); ?>" size="40" />
<span class="setting-description"><?php _e('Configuring this is optional by default it should be blank'); ?></span>
</td>
</tr>

View File

@ -1090,7 +1090,7 @@ html, body {
.form-table {
border-collapse: collapse;
margin-top: 1em;
margin-top: 0.5em;
width: 100%;
margin-bottom: -8px;
}
@ -1110,7 +1110,7 @@ html, body {
vertical-align: top;
text-align: left;
padding: 10px;
width: 150px;
width: 200px;
border-bottom-width: 8px;
border-bottom-style: solid;
}
@ -2779,3 +2779,11 @@ abbr.required {
border-bottom: 1px solid #626262;
}
#utc-time, #local-time {
padding-left: 25px;
font-style: italic;
}
.setting-description {
font-style: italic;
}