Would it be possible to update the menu button with the name of the content type in the current selection?
I wrote this code a few years ago for a "Translate" menu where the word "Translate" was translated into the language of the current selection (i.e. selecting "Italian" would make the "Translate" button turn into a "Traduca" button) and picture the Create Content Block's button changing from "Create Content" to "Create Story Content" or something similar.
At the moment I don't know how to modify this code to display the available content types (or get the button's custom name from the Create Content Block's settings form) but I'd be willing to help if this is a feature you'd like to have.
<form name="translateForm" target="_translate" action="http://www.worldlingo.com/wl/translate" method="get">
<select onchange="document.translateForm.translateButton.value=this.options[this.selectedIndex].id;" name="wl_lp">
<option value="en-en" id="Translate">English / English</option>
<option value="en-nl" id="Vertaal">Nederlands / Dutch</option>
<option value="en-fr" id="Traduisez">Français / French</option>
<option value="en-de" id="Übersetzen Sie">Deutsch / German</option>
<option value="en-el" id="Μεταφράστε">Ελληνικά / Greek</option>
<option value="en-it" id="Traduca">Italiano / Italian</option>
<option value="en-ja" id="翻訳しなさい">日本語 / Japanese</option>
<option value="en-ko" id="번역하십시요">한국어 / Korean</option>
<option value="en-pt" id="Traduza">Português / Portuguese</option>
<option value="en-es" id="Traduzca">Español / Spanish</option>
<option value="en-ru" id="Переведите">Русский / Russian</option>
<option value="en-zh_cn" id="翻译">中文(简体) / Simplified Chinese</option>
<option value="en-zh_tw" id="翻譯">中文(繁体) / Traditional Chinese</option>
</select>
<input type="submit" value="Translate" id="translateButton">
</form>
Comments
Comment #1
Christefano-oldaccount commentedComment #2
douggreen commentedI'm already doing
onchange' => 'javascript:submit()I'm not sure why you'd want to do this.Comment #3
Christefano-oldaccount commentedMy suggestion only makes sense if we entertain the idea that having an onChange event and a submit button is perhaps a little messy and decide to remove the onChange behavior. I'm guessing this probably won't happen any time soon and that's OK, but this suggestion is related to what I brought up in #189698:
Why have a button at all if there's an onClick event? If there's going to be a button at all, why not make it a dynamic element and provide user feedback.
Anyway, I'm especially grateful that you're helping to improve the OG/non-OG content creation interface. Thanks!