Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefill template name when creating a template. #15145

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

microposmp
Copy link
Contributor

Prefill the template name when creating a template from a content type or part definition.

Fixes: #15144

Prefill the template name when creating a template from a content type or part definition.
@@ -126,7 +126,7 @@ public ActionResult IndexFilterPOST(TemplateIndexViewModel model)
{ _optionsSearch, model.Options.Search }
});

public async Task<IActionResult> Create(bool adminTemplates = false, string returnUrl = null)
public async Task<IActionResult> Create(string name = null, bool adminTemplates = false, string returnUrl = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@microposmp which view in OC is providing the value to the new parameter?

Copy link
Contributor Author

@microposmp microposmp Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a RedirectToAction on line 234 (line number after changes in this PR) in the Edit action in the same controller if there is no existing template document available with the name parameter provided.

It's also called from the Index view (list of templates) without the name parameter.

@MikeAlhayek MikeAlhayek merged commit 4302a8d into OrchardCMS:main Jan 23, 2024
3 checks passed
Skrypt pushed a commit that referenced this pull request Jan 25, 2024
^ This is the 1st commit message:

Add GetCulture() extension method

^ This is the commit message #2:

Cleanup ISmsService (#15142)


^ This is the commit message #3:

Fix TheAdminTheme layout margin and padding (#15143)


^ This is the commit message #4:

Fix SectionDisplayDriver prefix (#15123)


^ This is the commit message #5:

Prefill template name when creating a template. (#15145)


^ This is the commit message #6:

Set the User Localization feature priority

^ This is the commit message #7:

Fix issue with default culture not selected

When currentUserCulture is null or supportedCulture doesn't contain currentUserCulture.

^ This is the commit message #8:

Update the height of the admin content (#15153)


^ This is the commit message #9:

Eliminate the anti-discovery pattern in Elasticsearch (#15134)


^ This is the commit message #10:

Renaming and cleaning up search services (#15156)


^ This is the commit message #11:

mkdocs-material 9.5.5
Skrypt added a commit that referenced this pull request Jan 25, 2024
…themes (#11243)

Cleanup ISmsService (#15142)

Fix TheAdminTheme layout margin and padding (#15143)

Fix SectionDisplayDriver prefix (#15123)

Prefill template name when creating a template. (#15145)

Set the User Localization feature priority

Fix issue with default culture not selected

When currentUserCulture is null or supportedCulture doesn't contain currentUserCulture.

Update the height of the admin content (#15153)

Eliminate the anti-discovery pattern in Elasticsearch (#15134)

Renaming and cleaning up search services (#15156)

mkdocs-material 9.5.5

User Timezone settings refresh

Originally from Hisham

revert manifest
urbanit pushed a commit to urbanit/OrchardCore that referenced this pull request Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefill Template name when creating a new template from Content Definitions
2 participants