Skip to content

Commit 17cefe0

Browse files
committed
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
1 parent 3c37c87 commit 17cefe0

3 files changed

Lines changed: 49 additions & 12 deletions

File tree

src/wp-admin/css/forms.css

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,30 @@ table.form-table td .updated p {
775775
vertical-align: middle;
776776
}
777777

778+
/*------------------------------------------------------------------------------
779+
21.0 - Network Admin
780+
------------------------------------------------------------------------------*/
781+
782+
.form-field #site-address {
783+
max-width: 25em;
784+
}
785+
786+
.form-field #domain {
787+
max-width: 22em;
788+
}
789+
790+
.form-field #site-title,
791+
.form-field #admin-email,
792+
.form-field #path,
793+
.form-field #blog_registered,
794+
.form-field #blog_last_updated {
795+
max-width: 25em;
796+
}
797+
798+
.form-field #path {
799+
margin-bottom: 5px;
800+
}
801+
778802
/* =Media Queries
779803
-------------------------------------------------------------- */
780804

@@ -784,8 +808,11 @@ table.form-table td .updated p {
784808
-webkit-appearance: none;
785809
}
786810

787-
input[type=text], input[type="search"],
788-
input[type=password], input[type="number"] {
811+
input[type="text"],
812+
input[type="email"],
813+
input[type="search"],
814+
input[type="password"],
815+
input[type="number"] {
789816
-webkit-appearance: none;
790817
padding: 6px 10px;
791818
}
@@ -874,6 +901,7 @@ table.form-table td .updated p {
874901
}
875902

876903
.form-table td input[type="text"],
904+
.form-table td input[type="email"],
877905
.form-table td input[type="password"],
878906
.form-table td select,
879907
.form-table td textarea,
@@ -976,10 +1004,17 @@ table.form-table td .updated p {
9761004
padding: 0;
9771005
line-height: 2;
9781006
}
1007+
1008+
.form-field #domain {
1009+
max-width: none;
1010+
}
9791011
}
9801012

9811013
@media only screen and (max-width: 768px) {
982-
.form-field input,
1014+
.form-field input[type="text"],
1015+
.form-field input[type="email"],
1016+
.form-field input[type="password"],
1017+
.form-field select,
9831018
.form-field textarea {
9841019
width: 99%;
9851020
}

src/wp-admin/network/site-info.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<?php if ( $is_main_site ) { ?>
127127
<td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
128128
<?php } else { ?>
129-
<td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" size="33" /></td>
129+
<td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" /></td>
130130
<?php } ?>
131131
</tr>
132132
<tr class="form-field form-required">
@@ -137,19 +137,21 @@
137137
} else {
138138
switch_to_blog( $id );
139139
?>
140-
<td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" size="40" style="margin-bottom:5px;" />
141-
<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>
140+
<td>
141+
<input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />
142+
<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>
143+
</td>
142144
<?php
143145
restore_current_blog();
144146
} ?>
145147
</tr>
146148
<tr class="form-field">
147149
<th scope="row"><?php _ex( 'Registered', 'site' ) ?></th>
148-
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" size="40" /></td>
150+
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" /></td>
149151
</tr>
150152
<tr class="form-field">
151153
<th scope="row"><?php _e( 'Last Updated' ); ?></th>
152-
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td>
154+
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" /></td>
153155
</tr>
154156
<?php
155157
$attribute_fields = array( 'public' => __( 'Public' ) );

src/wp-admin/network/site-new.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,21 @@
130130
<th scope="row"><?php _e( 'Site Address' ) ?></th>
131131
<td>
132132
<?php if ( is_subdomain_install() ) { ?>
133-
<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>
133+
<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>
134134
<?php } else {
135-
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
135+
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' ) ?>"/>
136136
<?php }
137137
echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
138138
?>
139139
</td>
140140
</tr>
141141
<tr class="form-field form-required">
142142
<th scope="row"><?php _e( 'Site Title' ) ?></th>
143-
<td><input name="blog[title]" type="text" class="regular-text" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
143+
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
144144
</tr>
145145
<tr class="form-field form-required">
146146
<th scope="row"><?php _e( 'Admin Email' ) ?></th>
147-
<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>
147+
<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>
148148
</tr>
149149
<tr class="form-field">
150150
<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>

0 commit comments

Comments
 (0)