Changeset 852
- Timestamp:
- 12/07/06 04:03:24 (2 years ago)
- Files:
-
- branches/wheeljack/lib/MT/App/CMS.pm (modified) (1 diff)
- branches/wheeljack/tmpl/cms/edit_template.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/lib/MT/App/CMS.pm
r851 r852 4915 4915 } 4916 4916 4917 return $app->errtrans('The Template Name and Output File fields are required.') 4918 if $type eq 'template' && !$q->param('name') && !$q->param('outfile'); 4919 4917 4920 if ($type eq 'author') { 4918 4921 ## If we are saving an author profile, we need to do some branches/wheeljack/tmpl/cms/edit_template.tmpl
r774 r852 82 82 initDirty(); 83 83 } 84 85 function validate (f, rebuild) { 86 if (!f.name.value) { 87 alert('<MT_TRANS phrase="You must set the Template Name." escape="singlequotes">'); 88 return false; 89 } 90 else if (!f.outfile.value) { 91 alert('<MT_TRANS phrase="You must set the template Output File." escape="singlequotes">'); 92 return false; 93 } 94 else { 95 clearDirty(); 96 if (rebuild) setRebuild(f); 97 } 98 } 84 99 //--> 85 100 </script> … … 251 266 </div> 252 267 253 <input accesskey="s" type="submit" value="<MT_TRANS phrase="Save">" title="<MT_TRANS phrase="Save this template (s)">" onclick=" clearDirty()" />268 <input accesskey="s" type="submit" value="<MT_TRANS phrase="Save">" title="<MT_TRANS phrase="Save this template (s)">" onclick="return validate(this.form);" /> 254 269 <TMPL_UNLESS NAME=NEW_OBJECT> 255 270 <TMPL_UNLESS NAME=BUILD_DYNAMIC> 256 271 <TMPL_IF NAME=HAS_REBUILD> 257 272 <TMPL_IF NAME=CAN_REBUILD> 258 <input type="submit" value="<MT_TRANS phrase="Save and Rebuild">" accesskey="r" title="<MT_TRANS phrase="Save and rebuild this template (r)">" onclick=" clearDirty();setRebuild(this.form)" /></TMPL_IF>273 <input type="submit" value="<MT_TRANS phrase="Save and Rebuild">" accesskey="r" title="<MT_TRANS phrase="Save and rebuild this template (r)">" onclick="return validate(this.form, 1);" /></TMPL_IF> 259 274 </TMPL_IF> 260 275 </TMPL_UNLESS>
