Fixed the attributes list and edition form
This commit is contained in:
parent
f919b88f58
commit
977630f995
3 changed files with 15 additions and 14 deletions
|
@ -250,15 +250,7 @@ function storm_attribute_list_filter(&$form_state, $filterdesc = 'Filter') {
|
||||||
$form['filter']['group3'] = array(
|
$form['filter']['group3'] = array(
|
||||||
'#type' => 'markup',
|
'#type' => 'markup',
|
||||||
'#theme' => 'storm_form_group',
|
'#theme' => 'storm_form_group',
|
||||||
);
|
'#attributes' => array('class' => 'formgroup-submit'),
|
||||||
|
|
||||||
$form['filter']['group3']['itemsperpage'] = array(
|
|
||||||
'#type' => 'textfield',
|
|
||||||
'#title' => t('Items'),
|
|
||||||
'#size' => 10,
|
|
||||||
'#default_value' => $itemsperpage,
|
|
||||||
'#prefix' => '<div class="container-inline">',
|
|
||||||
'#suffix' => '</div>',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['filter']['group3']['submit'] = array(
|
$form['filter']['group3']['submit'] = array(
|
||||||
|
@ -273,6 +265,15 @@ function storm_attribute_list_filter(&$form_state, $filterdesc = 'Filter') {
|
||||||
'#submit' => array('storm_attribute_list_filter_reset'),
|
'#submit' => array('storm_attribute_list_filter_reset'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$form['filter']['group3']['itemsperpage'] = array(
|
||||||
|
'#type' => 'textfield',
|
||||||
|
'#title' => t('Items'),
|
||||||
|
'#size' => 10,
|
||||||
|
'#default_value' => $itemsperpage,
|
||||||
|
'#prefix' => '<div class="container-inline">',
|
||||||
|
'#suffix' => '</div>',
|
||||||
|
);
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -661,7 +661,7 @@ function storm_menu() {
|
||||||
'title' => 'Edit an attribute',
|
'title' => 'Edit an attribute',
|
||||||
'description' => 'SuiteDesk attributes',
|
'description' => 'SuiteDesk attributes',
|
||||||
'page callback' => 'drupal_get_form',
|
'page callback' => 'drupal_get_form',
|
||||||
'page arguments' => array('storm_attribute_edit', 3),
|
'page arguments' => array('storm_attribute_edit', 2),
|
||||||
'access arguments' => array('Storm: access administration pages'),
|
'access arguments' => array('Storm: access administration pages'),
|
||||||
'file' => 'storm.admin.inc',
|
'file' => 'storm.admin.inc',
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_CALLBACK,
|
||||||
|
@ -671,7 +671,7 @@ function storm_menu() {
|
||||||
'title' => 'Delete an attribute',
|
'title' => 'Delete an attribute',
|
||||||
'description' => 'SuiteDesk attributes',
|
'description' => 'SuiteDesk attributes',
|
||||||
'page callback' => 'drupal_get_form',
|
'page callback' => 'drupal_get_form',
|
||||||
'page arguments' => array('storm_attribute_delete', 3),
|
'page arguments' => array('storm_attribute_delete', 2),
|
||||||
'access arguments' => array('Storm: access administration pages'),
|
'access arguments' => array('Storm: access administration pages'),
|
||||||
'file' => 'storm.admin.inc',
|
'file' => 'storm.admin.inc',
|
||||||
'type' => MENU_CALLBACK,
|
'type' => MENU_CALLBACK,
|
||||||
|
|
|
@ -15,7 +15,7 @@ function theme_storm_form_group($form) {
|
||||||
}
|
}
|
||||||
$rows[] = array('data' => $row, 'class' => 'formgroup');
|
$rows[] = array('data' => $row, 'class' => 'formgroup');
|
||||||
$class = 'formgroup' . (!empty($form['#attributes']['class']) ? ' ' . $form['#attributes']['class'] : '');
|
$class = 'formgroup' . (!empty($form['#attributes']['class']) ? ' ' . $form['#attributes']['class'] : '');
|
||||||
|
|
||||||
if (!empty($form['#title'])) {
|
if (!empty($form['#title'])) {
|
||||||
$output .= '<fieldset class="group-storm-fieldset collapsible collapsed">';
|
$output .= '<fieldset class="group-storm-fieldset collapsible collapsed">';
|
||||||
$output .= '<legend>' . $form['#title'] . '</legend>';
|
$output .= '<legend>' . $form['#title'] . '</legend>';
|
||||||
|
@ -97,7 +97,7 @@ function theme_storm_view_item($label, $value) {
|
||||||
global $language;
|
global $language;
|
||||||
|
|
||||||
if (!empty($label)) {
|
if (!empty($label)) {
|
||||||
$o = '<div class="label"><span class="label">' . $label . ':</span></div>';
|
$o = '<div class="label"><span class="label">' . $label . ':</span></div>';
|
||||||
}
|
}
|
||||||
if (empty($value) || (preg_match('/^<a href="(.*)"><\/a>$/i', $value))) { /*
|
if (empty($value) || (preg_match('/^<a href="(.*)"><\/a>$/i', $value))) { /*
|
||||||
|| ($value == '<a href="http://"></a>')
|
|| ($value == '<a href="http://"></a>')
|
||||||
|
@ -473,7 +473,7 @@ function theme_storm_attribute_list($form) {
|
||||||
$ischecked = '';
|
$ischecked = '';
|
||||||
}
|
}
|
||||||
$domain_name = 'attribute_default_'. str_replace(' ', '|', $domain);
|
$domain_name = 'attribute_default_'. str_replace(' ', '|', $domain);
|
||||||
$default_ctl = '<input type="radio" name="'. $domain_name .'" value="'. $key .'" '. $ischecked .'"/>';
|
$default_ctl = '<input type="radio" name="'. $domain_name .'" value="'. $key .'" '. $ischecked .'/>';
|
||||||
$data = array(
|
$data = array(
|
||||||
$domain,
|
$domain,
|
||||||
check_markup(drupal_render($form['attributes'][$key]['attribute_akey_'. $key])),
|
check_markup(drupal_render($form['attributes'][$key]['attribute_akey_'. $key])),
|
||||||
|
|
Reference in a new issue