Download & Extend

When cache is enabled, the default message is the name of the variable stores it

Project:Hide submit button
Version:5.x-1.0-beta1
Component:Code
Category:bug report
Priority:minor
Assigned:Optalgin
Status:closed (fixed)

Issue Summary

I raised this issue as a seperate one, taken from here

This is easily solved by changing in hide_submit_admin.inc

instead:

<?php
$form
['fieldset_message']['hide_submit_message'] = array(
   
'#type' => 'textarea',
   
'#title' => t('Default Message'),
   
'#rows' => 2,
   
'#default_value' => variable_get('hide_submit_message', HIDE_SUBMIT_DEFAULT_MESSAGE ),
  );
?>

Just hard-code the default message,

<?php
$form
['fieldset_message']['hide_submit_message'] = array(
   
'#type' => 'textarea',
   
'#title' => t('Default Message'),
   
'#rows' => 2,
   
'#default_value' => variable_get('hide_submit_message', t('Please wait...')),
  );
?>

Usually I don't like hard-coding constants, but in this case it is bearable
I can see that this method is common in many drupal modules, including core modules

I'll commit this soon

Comments

#1

Status:active» patch (to be ported)

#2

Status:patch (to be ported)» fixed

#3

Status:fixed» closed (fixed)

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

nobody click here