Commit a0d19b08 authored by Dries's avatar Dries
Browse files

- Patch #482636 by quicksketch: further clean-up of the form IDs/classes.

parent 2e0a4d26
......@@ -2610,11 +2610,7 @@ function theme_form_element($element) {
$class[] = strtr($element['#name'], array('_' => '-', '[' => '-', ']' => '')) . '-wrapper';
}
$output = '<div class="' . implode(' ', $class) . '"';
if (!empty($element['#id'])) {
$output .= ' id="' . $element['#id'] . '-wrapper"';
}
$output .= ">\n";
$output = '<div class="' . implode(' ', $class) . '">' . "\n";
$required = !empty($element['#required']) ? '<span class="form-required" title="' . $t('This field is required.') . '">*</span>' : '';
if (!empty($element['#title']) && empty($element['#form_element_skip_title'])) {
......
......@@ -38,7 +38,7 @@
html.js #edit-book-pick-book {
display: none;
}
#edit-book-bid-wrapper .description {
.form-item-book-bid-wrapper .description {
clear: both;
}
#book-admin-edit select {
......
/* $Id$ */
#edit-type-wrapper, #edit-severity-wrapper {
.form-item-type-wrapper, .form-item-severity-wrapper {
float: right;
padding-right: 0;
padding-left: .8em;
......
/* $Id$ */
#edit-type-wrapper, #edit-severity-wrapper {
.form-item-type-wrapper, .form-item-severity-wrapper {
float: left; /* LTR */
padding-right: .8em; /* LTR */
margin: 0.1em;
......
......@@ -5,7 +5,7 @@
text-decoration: line-through;
}
#edit-language-wrapper, #edit-translation-wrapper, #edit-group-wrapper {
.form-item-language-wrapper, .form-item-translation-wrapper, .form-item-group-wrapper {
float: left; /* LTR */
padding-right: .8em; /* LTR */
margin: 0.1em;
......
......@@ -4,13 +4,13 @@
Drupal.behaviors.contentTypes = {
attach: function () {
if ($('#edit-type').val() == $('#edit-name').val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_') || $('#edit-type').val() == '') {
$('#edit-type-wrapper').hide();
$('.form-item-type-wrapper').hide();
$('#edit-name').keyup(function () {
var machine = $(this).val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_');
if (machine != '_' && machine != '') {
$('#edit-type').val(machine);
$('#node-type-name-suffix').empty().append(' Machine name: ' + machine + ' [').append($('<a href="#">' + Drupal.t('Edit') + '</a>').click(function () {
$('#edit-type-wrapper').show();
$('.form-item-type-wrapper').show();
$('#node-type-name-suffix').hide();
$('#edit-name').unbind('keyup');
return false;
......
......@@ -6,11 +6,11 @@
background-repeat: no-repeat;
padding-left: 20px;
}
div#edit-openid-identifier-wrapper {
div.form-item-openid-identifier-wrapper {
display: block;
}
html.js #user-login-form div#edit-openid-identifier-wrapper,
html.js #user-login div#edit-openid-identifier-wrapper {
html.js #user-login-form div.form-item-openid-identifier-wrapper,
html.js #user-login div.form-item-openid-identifier-wrapper {
display: none;
}
html.js #user-login-form li.openid-link,
......
......@@ -3,8 +3,8 @@
Drupal.behaviors.openid = {
attach: function (context) {
var loginElements = $('#edit-name-wrapper, #edit-pass-wrapper, li.openid-link');
var openidElements = $('#edit-openid-identifier-wrapper, li.user-link');
var loginElements = $('.form-item-name-wrapper, .form-item-pass-wrapper, li.openid-link');
var openidElements = $('.form-item-openid-identifier-wrapper, li.user-link');
// This behavior attaches by ID, so is only valid once on a page.
if (!$('#edit-openid-identifier.openid-processed').size() && $('#edit-openid-identifier').val()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment