Network Admin: Improve width of input fields on Add New Site and Edit Site screens.

props honeysilvas.
fixes #16383.

git-svn-id: https://develop.svn.wordpress.org/trunk@30578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-11-26 19:50:20 +00:00
parent 3c37c87f39
commit 17cefe0288
3 changed files with 49 additions and 12 deletions

View File

@ -775,6 +775,30 @@ table.form-table td .updated p {
vertical-align: middle;
}
/*------------------------------------------------------------------------------
21.0 - Network Admin
------------------------------------------------------------------------------*/
.form-field #site-address {
max-width: 25em;
}
.form-field #domain {
max-width: 22em;
}
.form-field #site-title,
.form-field #admin-email,
.form-field #path,
.form-field #blog_registered,
.form-field #blog_last_updated {
max-width: 25em;
}
.form-field #path {
margin-bottom: 5px;
}
/* =Media Queries
-------------------------------------------------------------- */
@ -784,8 +808,11 @@ table.form-table td .updated p {
-webkit-appearance: none;
}
input[type=text], input[type="search"],
input[type=password], input[type="number"] {
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="number"] {
-webkit-appearance: none;
padding: 6px 10px;
}
@ -874,6 +901,7 @@ table.form-table td .updated p {
}
.form-table td input[type="text"],
.form-table td input[type="email"],
.form-table td input[type="password"],
.form-table td select,
.form-table td textarea,
@ -976,10 +1004,17 @@ table.form-table td .updated p {
padding: 0;
line-height: 2;
}
.form-field #domain {
max-width: none;
}
}
@media only screen and (max-width: 768px) {
.form-field input,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field select,
.form-field textarea {
width: 99%;
}

View File

@ -126,7 +126,7 @@ if ( ! empty( $messages ) ) {
<?php if ( $is_main_site ) { ?>
<td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
<?php } else { ?>
<td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td>
<td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" /></td>
<?php } ?>
</tr>
<tr class="form-field form-required">
@ -137,19 +137,21 @@ if ( ! empty( $messages ) ) {
} else {
switch_to_blog( $id );
?>
<td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" size="40" style="margin-bottom:5px;" />
<br /><input type="checkbox" style="width:20px;" name="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></td>
<td>
<input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />
<label><input type="checkbox" name="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>
</td>
<?php
restore_current_blog();
} ?>
</tr>
<tr class="form-field">
<th scope="row"><?php _ex( 'Registered', 'site' ) ?></th>
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" size="40" /></td>
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" /></td>
</tr>
<tr class="form-field">
<th scope="row"><?php _e( 'Last Updated' ); ?></th>
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td>
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" /></td>
</tr>
<?php
$attribute_fields = array( 'public' => __( 'Public' ) );

View File

@ -130,9 +130,9 @@ if ( ! empty( $messages ) ) {
<th scope="row"><?php _e( 'Site Address' ) ?></th>
<td>
<?php if ( is_subdomain_install() ) { ?>
<input name="blog[domain]" type="text" class="regular-text" title="<?php esc_attr_e( 'Domain' ) ?>"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
<input name="blog[domain]" type="text" class="regular-text" id="site-address" title="<?php esc_attr_e( 'Domain' ) ?>"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
<?php } else {
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" id="site-address" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
<?php }
echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
?>
@ -140,11 +140,11 @@ if ( ! empty( $messages ) ) {
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Site Title' ) ?></th>
<td><input name="blog[title]" type="text" class="regular-text" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Admin Email' ) ?></th>
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" data-autocomplete-type="search" data-autocomplete-field="user_email" title="<?php esc_attr_e( 'Email' ) ?>"/></td>
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" title="<?php esc_attr_e( 'Email' ) ?>"/></td>
</tr>
<tr class="form-field">
<td colspan="2"><?php _e( 'A new user will be created if the above email address is not in the database.' ) ?><br /><?php _e( 'The username and password will be mailed to this email address.' ) ?></td>