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(
|
||||
'#type' => 'markup',
|
||||
'#theme' => 'storm_form_group',
|
||||
);
|
||||
|
||||
$form['filter']['group3']['itemsperpage'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Items'),
|
||||
'#size' => 10,
|
||||
'#default_value' => $itemsperpage,
|
||||
'#prefix' => '<div class="container-inline">',
|
||||
'#suffix' => '</div>',
|
||||
'#attributes' => array('class' => 'formgroup-submit'),
|
||||
);
|
||||
|
||||
$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'),
|
||||
);
|
||||
|
||||
$form['filter']['group3']['itemsperpage'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Items'),
|
||||
'#size' => 10,
|
||||
'#default_value' => $itemsperpage,
|
||||
'#prefix' => '<div class="container-inline">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ function storm_menu() {
|
|||
'title' => 'Edit an attribute',
|
||||
'description' => 'SuiteDesk attributes',
|
||||
'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'),
|
||||
'file' => 'storm.admin.inc',
|
||||
'type' => MENU_CALLBACK,
|
||||
|
@ -671,7 +671,7 @@ function storm_menu() {
|
|||
'title' => 'Delete an attribute',
|
||||
'description' => 'SuiteDesk attributes',
|
||||
'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'),
|
||||
'file' => 'storm.admin.inc',
|
||||
'type' => MENU_CALLBACK,
|
||||
|
|
|
@ -15,7 +15,7 @@ function theme_storm_form_group($form) {
|
|||
}
|
||||
$rows[] = array('data' => $row, 'class' => 'formgroup');
|
||||
$class = 'formgroup' . (!empty($form['#attributes']['class']) ? ' ' . $form['#attributes']['class'] : '');
|
||||
|
||||
|
||||
if (!empty($form['#title'])) {
|
||||
$output .= '<fieldset class="group-storm-fieldset collapsible collapsed">';
|
||||
$output .= '<legend>' . $form['#title'] . '</legend>';
|
||||
|
@ -97,7 +97,7 @@ function theme_storm_view_item($label, $value) {
|
|||
global $language;
|
||||
|
||||
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))) { /*
|
||||
|| ($value == '<a href="http://"></a>')
|
||||
|
@ -473,7 +473,7 @@ function theme_storm_attribute_list($form) {
|
|||
$ischecked = '';
|
||||
}
|
||||
$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(
|
||||
$domain,
|
||||
check_markup(drupal_render($form['attributes'][$key]['attribute_akey_'. $key])),
|
||||
|
|
Reference in a new issue