Maybe it would be nice for other users, too.

I think that a good place could be the configuration settings for 'Draggable Table'-style inside views administration area.

Comments

sevi’s picture

Status: Active » Closed (works as designed)

Write a new module for customization issues.

In your custom_module.module file you simply write

function custom_module_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'draggableviews_view_draggabletable_form_{VIEW_NAME}_{DISPLAY_ID}') {
    $form['submit']['#value'] = '{BUTTON_LABEL}';
  }
}

where you have to replace {VIEW_NAME} with the view-name, {DISPLAY_ID} with the display_id and {BUTTON_LABEL} with your custom button label.

Easy enough? :)

Greetings,
sevi

M_Z’s picture

Thank you for your instructions.

I know FAPI and I know how to change a form button value with it, but you can see in your own example that my hook_form_alter depends on two variables (VIEW_NAME and DISPLAY_ID). Each time I change one of them I have to adjust my hook_form_alter callback.

My idea was to put the 'Save' button text into the configuration settings where I can already find a lot of options in the 'Defaults: Style options: Draggable Table Settings' section. Then there is no need to adjust my customized button text if one of the above variables is changing.
But I can live with your suggestion. Thanks again.

I wanted to open another issue for a feature request, but after reading http://drupal.org/node/551522 I don't think that there is an easy solution: I use a draggable view as panel pane (with Panels 3). In the view I set AJAX to 'yes'. But as far as I can see there is no AJAX functionality when I click the draggable view 'Save' button. That means there is always a complete page request and not only a AJAX request which only updates my view pane, right?

Thank you in advance. Great module!

sevi’s picture

My idea was to put the 'Save' button text into the configuration settings where I can already find a lot of options in the 'Defaults: Style options: Draggable Table Settings' section.

You're right, that's actually a great idea. I don't have time at the moment but I put it on top of my todo list :)

That means there is always a complete page request and not only a AJAX request which only updates my view pane, right?

Right. Such a ajax request sounds very useful too. Another line on my todo list.

Greetings,
sevi

sevi’s picture

Just committed to 6--3 branch: #605206: Make Save-button text customizable

M_Z’s picture

Thank you very much!

And your description of this option ( '#description' => t('Make the workflow more intuitive for the user.')) is a good explanation of my intention with this feature request.

sevi’s picture

Status: Closed (works as designed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.