Skip to content

Commit

Permalink
Merge branch 'zmi-bootstrap' of https://github.com/zopefoundation/Zope
Browse files Browse the repository at this point in the history
…into zmi-bootstrap
  • Loading branch information
drfho committed May 18, 2018
2 parents 54d5ff8 + 4f75c80 commit 3677858
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 55 deletions.
73 changes: 24 additions & 49 deletions src/OFS/dtml/methodAdd.dtml
@@ -1,5 +1,7 @@
<dtml-var manage_page_header>

<main>

<dtml-var "manage_form_title(this(), _,
form_title='Add DTML Method',
)">
Expand All @@ -9,63 +11,36 @@ A DTML Method is used to hold scripting tags and text content.
It can contain HTML, XML, plain text, structured-text, etcetera.
A DTML Method can contain DTML scripting tags which operate
in the context of the DTML Method's containing object.
A DTML Method differs from a DTML Document in that it does not
A DTML Method differs from a DTML Document in that it does not
have properties and calls methods on its container object.
</p>

<p class="form-help">
You may create a new DTML Method object using the form below.
You may create a new DTML Method object using the form below.
You may also choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
</p>

<form action="addDTMLMethod" method="post" enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
File
</div>
</td>
<td align="left" valign="top">
<input type="file" name="file:string" size="25" value="" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
<input class="form-element" type="submit" name="submit"
value=" Add and Edit " />
</div>
</td>
</tr>
</table>
</form>
<form action="addDTMLMethod" method="post" enctype="multipart/form-data" class="zmi-add zmi-dtmlmethod">

<dtml-var manage_page_footer>
<div class="form-group row">
<label for="id" class="form-label col-sm-2">Id</label>
<input type="text" class="form-control col-sm-10" name="id" id="id" />
</div>
<div class="form-group row">
<label for="title" class="form-label col-sm-2">Title</label>
<input type="text" class="form-control col-sm-10" name="title" id="title" />
</div>
<div class="form-group row">
<label for="file" class="form-label col-sm-2">File</label>
<input type="file" id="file" class="form-control-file col-sm-10" name="file:string" size="25" value="" />
</div>
<div class="controls">
<input class="btn btn-primary" type="submit" name="submit" value=" Add " />
<input class="btn btn-secondary" type="submit" name="submit" value=" Add and Edit " />
</div>
</form>

</main>

<dtml-var manage_page_footer>
10 changes: 7 additions & 3 deletions src/OFS/dtml/properties.dtml
Expand Up @@ -16,7 +16,7 @@
<dtml-call "REQUEST.set('management_page_charset','UTF-8')">
<dtml-call "REQUEST.set('management_page_charset_tag','UTF-8:')">
</dtml-if>

<dtml-if "REQUEST.get('management_page_charset',None)=='UTF-8'">
<dtml-var "u' '">
</dtml-if>
Expand All @@ -25,6 +25,8 @@
<dtml-var manage_tabs>
</dtml-with>

<main>

<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post">
<dtml-if propertyMap>
<p class="form-help">
Expand Down Expand Up @@ -209,12 +211,12 @@ property values, edit the values and click &quot;Save Changes&quot;.
<td>
<input name="manage_editProperties:method"
type="submit"
class="btn btn-outline-secondary"
class="btn btn-primary"
value="Save Changes" />
<dtml-if property_extensible_schema__>
<input name="manage_delProperties:method"
type="submit"
class="btn btn-outline-danger"
class="btn btn-secondary"
value="Delete" />
</td>
<td>
Expand Down Expand Up @@ -314,4 +316,6 @@ property and click the &quot;Add&quot; button.
</form>
</dtml-if>

</main>

<dtml-var manage_page_footer>
10 changes: 7 additions & 3 deletions src/OFS/dtml/renameForm.dtml
@@ -1,16 +1,18 @@
<dtml-var manage_page_header>

<main>

<h2>Rename Items</h2>

<dtml-if expr="REQUEST.has_key('ids')">

<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post" class="zmi-rename">
<dtml-in expr="manage_CopyContainerAllItems(REQUEST)">
<div class="form-group">
<div class="form-group row">
<dtml-if cb_isMoveable>
<input type="hidden" name="ids:list" value="&dtml-getId;" />
<input class="form-control" type="text" name="new_ids:list" value="&dtml-getId;" aria-describedby="label&dtml-getId;"/>
<small class="text-muted form-text" id="label&dtml-getId;">Original name: &dtml-getId;</small>
<label for="&dtml-getId;" class="form-label col-sm-2">&dtml-getId; to:</label>
<input class="form-control col-sm-10" type="text" name="new_ids:list" value="&dtml-getId;" />
<dtml-else>
<label class="text-muted">&dtml-getId; may not be renamed.</label>
</dtml-if>
Expand Down Expand Up @@ -38,4 +40,6 @@ You must select an item to rename.

</dtml-if>

</main>

<dtml-var manage_page_footer>

0 comments on commit 3677858

Please sign in to comment.