Changeset:
c6135653693f
https://sourceforge.net/p/mrbs/hg-code/ci/c6135653693f46bb6eacf14f27cd451686db3f18
Author:
Campbell Morrison <[email protected]>
Date:
Thu Jan 28 20:19:10 2016 +0000
Log message:
Made the JavaScript code handling mandatory fields on the edit_entry page a
little bit more generic.
diffstat:
web/js/edit_entry.js.php | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r c69ce45d85b8 -r c6135653693f web/js/edit_entry.js.php
--- a/web/js/edit_entry.js.php Thu Jan 28 09:46:48 2016 +0000
+++ b/web/js/edit_entry.js.php Thu Jan 28 20:19:10 2016 +0000
@@ -239,22 +239,20 @@
var field, label;
<?php
// First of all create a property in the vocab object for each of the
mandatory
- // fields. These will be, potentially, some of the standard fields and
any other fields
- // defined by the config variable $is_mandatory_field
+ // fields. The name and rooms field are implicitly mandatory.
?>
validationMessages.vocab = {};
validationMessages.vocab['name'] = '';
- validationMessages.vocab['description'] = '';
validationMessages.vocab['rooms'] = '';
- validationMessages.vocab['type'] = '';
<?php
foreach ($is_mandatory_field as $key => $value)
{
list($table, $fieldname) = explode('.', $key, 2);
if ($table == 'entry')
{
+ $prefix = (in_array($fieldname, $standard_fields['entry'])) ? '' :
VAR_PREFIX;
?>
- validationMessages.vocab['<?php echo escape_js(VAR_PREFIX . $fieldname)
?>'] = '';
+ validationMessages.vocab['<?php echo escape_js($prefix . $fieldname)
?>'] = '';
<?php
}
}
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits