Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The words “Submit page” on the top of a node creation form always bothered me. “Create %node-type” is so much better imo. If an existing node is edited, the string isn’t shown but the node’s title is used.
The same goes for “Submit” as button label. With this patch, the label changes to “Save” if the node already exists (thus the user is editing it) and to “Create” if it’s a new node.
Comment | File | Size | Author |
---|---|---|---|
#13 | node_submit_create-100636-13.patch | 1.05 KB | cburschka |
#6 | node-submit-create_1.patch | 1.56 KB | webchick |
#4 | node-submit-create_0.patch | 1.68 KB | webchick |
node-submit-create.patch | 1.27 KB | kkaefer | |
Comments
Comment #1
StevenPatzComment #2
kkaefer CreditAttribution: kkaefer commentedSpatz4000: String freeze issues that change interface strings are considered critical.
Also see http://drupal.org/node/100641.
Comment #3
m3avrck CreditAttribution: m3avrck commentedLooks good to me -- I really like this change, makes a lot more sense usability wise IMO and I already implement a "hack" on a bunch of my sites to do the same.
Comment #4
webchickNice patch. I made one small addition which was to change the title when editing a node from "node title" to "Editing node title"
Comment #5
webchickAlso, bumped critical to normal because Dries doesn't want string freeze patches as critical.
Comment #6
webchickre-roll with "Editing" changed to "Edit" and theme_placeholder around the node title, per kkaefer.
Comment #7
kkaefer CreditAttribution: kkaefer commentedSweet.
Comment #8
Chris Johnson CreditAttribution: Chris Johnson commentedLooks good to me. RTBC, in my view.
Comment #9
RobRoy CreditAttribution: RobRoy commentedWell let's RTBC this puppy. Should we include something in the update docs for any funky modules that check the $_POST['op'] == t('Submit') (now $form_values['op'])?
Comment #10
Steven CreditAttribution: Steven commentedSee my comment at http://drupal.org/node/100641 . I think 'create' as a title is good, but as a submit button is confusing.
Comment #11
hass CreditAttribution: hass commentedsubscribe
Comment #12
Gábor HojtsyPlease reroll against Drupal 6 taking Steven's comments into account.
Comment #13
cburschkaI presume that if #100641 takes care of the form buttons, this patch can limit itself to changing the page title?
Rerolled for 6.x on the above premise. This changes the "new node" title to "Create %type" and the "editing" title to "Edit %title".
Comment #14
hass CreditAttribution: hass commentedi think you should use
Edit @title
and not%title
Comment #15
hass CreditAttribution: hass commentedadditional the older patches contain a third line your patch is missing!?
Comment #16
kkaefer CreditAttribution: kkaefer commentedhass: No, the variable prefixes are correct. "Create @name" results in something like "Create story" whereas "Edit %title" results in "Edit An interesting story". (Note the theme placeholder). Also, the third line was not in the very first patch and falls into the area of http://drupal.org/node/100641.
Comment #17
Gábor HojtsyCommitted to Drupal 6.x-dev!
Comment #18
hass CreditAttribution: hass commentedBut if we'd like italic text, why is this not done for "Create story", too? shouldn't it be in sync?
Comment #19
keith.smith CreditAttribution: keith.smith commentedThe patch at http://drupal.org/node/89196, awaiting reviews, adds the content type name in italics in the description, if not in the exact string your referring to.
Comment #20
Gábor HojtsyWe use placeholders mostly for values, which break the flow of your reading. If you have a node titled "New employees", then "Edit /New emloyees/" looks better then "Edit New employees". Node type names however are quite controllable.
Comment #21
kkaefer CreditAttribution: kkaefer commentedContent types aren't considered user submitted text (although they could be, just not for regular users) while the title of a node is clearly user-submitted and thus italic to indicate that.
Comment #22
cburschkaOr to put it differently, "Create page" is a proper sentence as it stands as you are indeed creating a page, but "Edit this is my test node" isn't. It sounds confusing until you remember to read it as "Edit 'this is my test node'" or "Edit this is my test node", because what you are editing isn't a this is my test node, but a page titled "this is my test node". ;)
(I hope the above paragraph is readable...)
Comment #23
(not verified) CreditAttribution: commented