Skip to content

Commit

Permalink
finalize basic bootstrap usage for the main zmi forms in dtml
Browse files Browse the repository at this point in the history
  • Loading branch information
jhinghaus authored and dwt committed Jun 12, 2018
1 parent a4c9904 commit 2f0947b
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 141 deletions.
69 changes: 27 additions & 42 deletions src/OFS/dtml/documentAdd.dtml
@@ -1,5 +1,7 @@
<dtml-var manage_page_header>

<main>

<dtml-var "manage_form_title(this(), _,
form_title='Add DTML Document'
)">
Expand All @@ -13,56 +15,39 @@ and does not call methods on its container object.
</p>

<p class="form-help">
You may create a new DTML Document using the form below.
You may create a new DTML Document 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="addDTMLDocument" method="post" enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
<form action="addDTMLDocument" method="post" enctype="multipart/form-data" class="zmi-dtml">
<div class="form-group row">
<label for="id" class="form-label col-sm-3 col-md-2">
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">
</label>
<input id="id" class="form-control col-sm-9 col-md-6" type="text" name="id" size="40" />
</div>
<div class="form-group row">
<label for="title" class="form-label col-sm-3 col-md-2">
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">
</label>
<input id="type" class="form-control col-sm-9 col-md-6" type="text" name="title" size="40" />
</div>
<div class="form-group row">
<label for="file-data" class="form-label col-sm-3 col-md-2">
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"
</label>
<input id="file-data" class="form-control-file col-sm-9 col-md-6" type="file" 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-primary" type="submit" name="submit"
value=" Add and Edit " />
</div>
</td>
</tr>
</table>
</div>

</form>

</main>

<dtml-var manage_page_footer>
92 changes: 35 additions & 57 deletions src/OFS/dtml/documentEdit.dtml
@@ -1,82 +1,60 @@
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<main>

<p class="form-help">
You may edit the source for this document using the form below. You
You may edit the source for this document using the form below. You
may also upload the source for this document from a local file. Click
the <em>browse</em> button to select a local file to upload.
</p>

<form action="manage_edit" method="post">
<table cellpadding="2" cellspacing="0" width="100%" border="0">
<form action="manage_edit" method="post" class="zmi-dtml zmi-edit">

<dtml-with keyword_args mapping>
<tr>
<td align="left" valign="top">
<div class="form-optional">
<div class="form-group row">
<label for="title" class="form-label col-sm-2">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" value="<dtml-if
title>&dtml-title;</dtml-if>">
</td>
</tr>
</label>

<tr>
<td align="left" valign="top" colspan="2">
<textarea name="data:text" wrap="off" style="width: 100%;"
<input id="title" class="form-control col-sm-10 col-md-7" type="text" name="title" size="40" value="<dtml-if
title>&dtml-title;</dtml-if>">
</div>
<div class="form-group">
<textarea id="content" class="form-control zmi-code col-sm-12" name="data:text" wrap="off" style="width: 100%;"
rows="20"><dtml-var __str__></textarea>
</td>
</tr>
</div>
</dtml-with>

<tr>
<td align="left" valign="top" colspan="2">
<div class="form-element">
<dtml-if wl_isLocked>
<em>Locked</em>
<dtml-else>
<input class="form-element" type="submit" name="SUBMIT" value="Save Changes">
</dtml-if>
</div>
</td>
</tr>
</table>
</form>

<form action="manage_upload" method="post" enctype="multipart/form-data">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
File &nbsp;
</div>
</td>
<td align="left" valign="top">
<input type="file" name="file" size="25" value="">
</td>
</tr>
<tr>
<td></td>
<td align="left" valign="top">
<div class="form-element">
<div class="controls">
<dtml-if wl_isLocked>
<em>Locked</em>
<dtml-else>
<input class="form-element" type="submit" value="Upload File">
<input class="btn btn-primary" type="submit" name="SUBMIT" value="Save Changes">
</dtml-if>
</div>
</td>
</tr>
</table>
</form>

<dtml-var manage_page_footer>




</form>

<form action="manage_upload" method="post" enctype="multipart/form-data" class="zmi-upload mt-5">
<div class="form-group row">
<label for="file-data" class="col-sm-3 col-md-2" class="form-label">
File
</label>
<div class="col-sm-9 col-md-6">
<input id="file-data" class="form-control-file" type="file" name="file" size="25" value="">
</div>
</div>
<div class="controls">
<dtml-if wl_isLocked>
<em>Locked</em>
<dtml-else>
<input class="btn btn-primary" type="submit" value="Upload File">
</dtml-if>
</div>
</form>

</main>

<dtml-var manage_page_footer>
2 changes: 1 addition & 1 deletion src/OFS/dtml/fileEdit.dtml
Expand Up @@ -11,7 +11,7 @@ file. You may also edit the file content directly if the content is a
text type and small enough to be edited in a text area.
</p>

<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post" enctype="multipart/form-data" class="zmi-file zmi-metadata">
<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post" enctype="multipart/form-data" class="zmi-file zmi-edit">

<div class="form-group row">
<label for="title" class="form-label col-sm-3 col-md-2">
Expand Down
49 changes: 15 additions & 34 deletions src/OFS/dtml/imageAdd.dtml
Expand Up @@ -13,48 +13,29 @@ Select a file to upload from your local computer by clicking the

<form action="manage_add&dtml-Kind;" method="post"
enctype="multipart/form-data" class="zmi-image">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<label for="id" class="form-label">
<div class="form-group row">
<label for="id" class="form-label col-sm-3 col-md-2">
Id
</label>
</td>
<td align="left" valign="top">
<input type="text" class="form-control" name="id" id="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<label for="title" class="form-label">
<input type="text" class="form-control col-sm-9 col-md-6" name="id" id="id" size="40" />
</div>
<div class="form-group row">
<label for="title" class="form-label col-sm-3 col-md-2">
Title
</label>
</td>
<td align="left" valign="top">
<input type="text" class="form-control" name="title" id="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<label for="file" class="form-label">
<input type="text" class="form-control col-sm-9 col-md-6" name="title" id="title" size="40" />
</div>
<div class="form-group row">
<label for="file" class="form-label col-sm-3 col-md-2">
File
</label>
</td>
<td align="left" valign="top">
<input type="file" class="form-control-file" name="file" id="file" size="25" value="" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input type="file" class="form-control-file col-sm-9 col-md-6" name="file" id="file" size="25" value="" />
</div>
<div class="controls">
<input class="form-element btn btn-primary" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</div>

</form>

</main>
Expand Down
12 changes: 6 additions & 6 deletions src/OFS/dtml/methodAdd.dtml
Expand Up @@ -24,16 +24,16 @@ You may create a new DTML Method object using the form below.
<form action="addDTMLMethod" method="post" enctype="multipart/form-data" class="zmi-add zmi-dtmlmethod">

<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" />
<label for="id" class="form-label col-sm-3 col-md-2">Id</label>
<input type="text" class="form-control col-sm-9 col-md-6" 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" />
<label for="title" class="form-label col-sm-3 col-md-2">Title</label>
<input type="text" class="form-control col-sm-9 col-md-6" 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="" />
<label for="file" class="form-label col-sm-3 col-md-2">File</label>
<input type="file" id="file" class="form-control-file col-sm-9 col-md-6" name="file:string" size="25" value="" />
</div>
<div class="controls">
<input class="btn btn-primary" type="submit" name="submit" value=" Add " />
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/renameForm.dtml
Expand Up @@ -33,7 +33,7 @@

<dtml-else>

<div class="alert alert-warning" role="alter">
<div class="alert alert-warning" role="alert">
You must select an item to rename.
</div>
<a href="manage_main" class="btn btn-primary">Ok</a>
Expand Down

0 comments on commit 2f0947b

Please sign in to comment.